jeffr_tech ([info]jeffr_tech) wrote,

More subjective scheduler tests.

So I've just installed fedora core 7 on my laptop so I can do a side by side comparison of scheduler performance. The test I like to do with ULE is to make -j64 kernel while playing a dvd with mplayer and browsing the web. I have verified that make -j64 in the base directory of the linux kernel gets the load average up to the same level. The actual source involved matters little. Both systems are using a gcc 4.x compiler. The laptop is an IBM T42 with a 1.8ghz PentiumM,2 gigabytes of ram, and a 7200 rpm drive.

With the FreeBSD 7.0 configured without debugging options INVARIANTS and WITNESS, but with SCHED_ULE, I get no skipping or glitching of any kind.

With the O(1) scheduler in the default fedora core 7 kernel I get intermittent skipping but it's generally pretty tolerable.

I installed a 2.6.23-pre7 kernel built with 'make defconfig'. Feel free to suggest configuration options that may be relevant. At -j64 the ui was basically unusable. At -j4 it skipped more than the older kernel using -j64. It is my understanding that this is using the CFS scheduler.

I must say that in general the linux experience was very good. The installer was easy enough, although neither it or the installed system seemed to detect my atheros wireless card. I didn't care to futz with it so I just plugged it into my switch directly. It sure looked pretty otherwise. Maybe I'll try PC-BSD when they update to 7.0.

The issue with CFS is that the simple algorithm works very well as long as your interactive tasks consume less cpu in proportion to the other tasks. So for example mplayer takes 10% of the cpu playing a dvd on my machine. If you have 9 cpu hogs and mplayer running, without any information other than runtime or %cpu you can't distinguish between them.

Whether this is an important workload or not is subject to debate.

  • Post a new comment

    Error

    Your reply will be screened

    Your IP address will be recorded 

  • 46 comments

[info]danfe

September 20 2007, 10:09:18 UTC 4 years ago

Speaking of fair scheduling, I wonder whether CFS or any other recent Linux schedulers (and ULE, of course) take into account task hardware activity (e.g. mouse and keyboard). I'm under impression this is what most gamers (both under Linux and FreeBSD) complain to date: performance is sluggish compared to Windows, where it's much smoother on the same hardware.

I've been thinking of instrumenting Quake II source with high-precision time counters to get "process heartbeat distribution" that can be statistically comparable to Linux'/Windows' case. I yet need to instrument (KTR'ace) the kernels as well, as I'm not sure if my timing results would be of any significant help without such instrumentation.

Feel free to correct me if I'm wrong. Thanks.

[info]jeffr_tech

September 20 2007, 10:30:35 UTC 4 years ago

I had not heard of that complaint. FreeBSD actually gives a very high static priority to threads sleeping waiting for input from devices like this. The priority is lowered aAfter the thread services the device, but the thread is not immediately switched out in favor of other higher-priority threads. This has been around in BSD since well before FreeBSD started.

Is it possible to run quake 2 or 3 on bsd? I don't know. It might be interesting to try. I don't know if I need a hardware accelerated driver even?

There are other issues that may effect this. How frequently the mouse is sampled, for example. Games may also benefit from higher hz rates and more precise timers. There may also be some effect because the games are really designed and optimized for windows even if they may work on unix.

[info]danfe

4 years ago

[info]lvchanel

1 year ago

[info]katiebipef

3 years ago

[info]nakliyat

1 year ago

Anonymous

September 20 2007, 10:24:59 UTC 4 years ago

Desktop scheduling

I couldn't understand the logic behind a fair scheduler being better for a desktop (desktop scheduling should be unfair by nature), so I asked about it in LKML (http://lkml.org/lkml/2007/6/22/406).

The consensus was that the scheduler should not make decisions regarding which tasks should have more CPU time than others. That should be done via nice levels.

Of course, this sounded strange to me: you can't expect desktop users to renice their tasks according to their needs. It should be done automatically somehow. They said that distributions or application programmers should take care of using the right nice level for each application. As I'm no expert I accepted this explanation, but I see (think) you don't agree much with it and my feeling is that your approach is better.

[info]jeffr_tech

September 20 2007, 10:40:23 UTC 4 years ago

Re: Desktop scheduling

I generally dislike nice. I really only see utility in using nice +20 as a pseudo idle priority thing. In most cases users are not going to change tunables and static allocations are almost never going to scale properly. This is the same reason I argued against any kind of threshold/watermark based memory allocation schemes. I favor adaptive algorithms wherever possible.

The ULE algorithm is simple, efficient, and has few edge cases where it's not likely to do what you want. It has some tunables available via sysctl but I consider those more for development experiments than for users. However, if the interactivity algorithm isn't doing what you want, you can disable it with a sysctl and use static nice values.

The only really inconvenient edge case is when the task you'd like to be interactive is a cpu hog and you have a number of other cpu hogs running. However, the scheduler is not omnipotent. In this case tricks like boosting the priority of foreground windowing applications are reasonable but we fortunately have not had to resort to that.

[info]evan

September 29 2007, 17:56:04 UTC 4 years ago

Saw this, thought you'd be interested:
http://mail-index.netbsd.org/tech-kern/2007/09/28/0014.html

Anonymous

September 29 2007, 21:10:46 UTC 4 years ago

Interesting, thanks!

One strange thing is that in Jeff's tests both FreeBSD and Linux peaked at the same number of threads as cores the system had (8 in his case). But in this one, while FreeBSD has a similar behavior (except a small fall after 4 threads), Linux behaves very differently. At 4 tps its performance is very low. It then equals FreeBSD at 7 tps and peaks at about 14 tps in a 4 core box. NetBSD performs only slightly higher than FreeBSD at 4 tps but then peaks at 7 tps. Strange.

Another thing that seems clear is that when a test is run on the system that the developer is using to develop a particular feature the behavior is perfect. Not strange since all the bottlenecks found in that setup have been solved. But then you test in different hardware and the behavior can change dramatically. Here's probably where Linux takes advantage of a broad base of testers. In a particular setup/hardware it might not perform as well as others, but its behavior across many different setups is quite good.

[info]jeffr_tech

4 years ago

Anonymous

4 years ago

[info]jeffr_tech

4 years ago

[info]alidalyjog

3 years ago

[info]jeffr_tech

October 1 2007, 23:59:56 UTC 4 years ago

We just reproduced better numbers than this on an older 4x 500mhz pIII xeon. So I think he must've had some debugging enabled. It's impressive that their numbers are this good given how early their SMP project is.

Anonymous

October 15 2007, 16:27:47 UTC 4 years ago

Great work

Jeff - I am sitting at a pre-release 7 machine with SCHED_ULE complied in. Running many Gnome apps. Very, very nice.
Thanks for all your hard work.


Arjen

[info]feihongjin

August 17 2010, 02:14:28 UTC 1 year ago

The data is compared with replica watches other bottles from the cellars of the chateaux.fake watches Any difference will indicate the wine fake rolex is a forgery.Spanish scientists invented a contraption replica rolex called the Electronic Tongue. It is a pocket-sized probe that uses chemical sensors breitling to measure a wine’s characteristics.The tongue, which measures 5cm, gives a read-out of statistical data ontag heuer sweetness, saltiness, bitterness and acidity.

[info]feihongjin

August 17 2010, 02:21:32 UTC 1 year ago

It still takes a wise shopper to replica handbags find just the right type of replica designer handbags which are perfectly louis vuitton trendy, yet are still of good quality and extremely affordable.gucci handbags If you’ve ever seen an episode of "Sex and the City" or "Ugly Betty", gucci you would already have an idea about why creating a fashion statement chanel handbags is as important for women as sports are for men.But do you really need to wholesale handbags shell out hundreds or even thousands of dollars just to get the latest bag designed by the House of Gucci?

[info]hardson3

October 13 2010, 14:57:13 UTC 1 year ago

cheap watches

Hello friend:
Welcome to http://www.b2cwatches.com We support you the best quality and the lowest price.Such as:
Replica Watches
Fake Watches
Watch Replica
Replica Swiss Watches
Cheap Watches
ladies watch
Wholesale replica watches
Luxury Watches
mens watch
Free Shipping watch
Replica Audemars Piguet Watches
Replica Cartier Watches
Replica Chanel Watches
Replica Chopard Watches
Replica Concord Watches
Replica Corum Watches
Replica Tag-Heuer Watches
Replica A Lange & Sohne Watches
Replica Breitling Watches
Replica Bvlgari Watches
Replica IWC Watches
Replica Longines Watches
Replica Omega Watches
Replica Oris Watches
Replica Panerai Watches
Replica Patek Philippe Watches
Replica Porsche Design Watches
Replica Rolex Watches
Replica Vacheron Constantin Watches
------------------------------------------------------------------------------------------------------------------
http://www.b2cwatches.com/
http://www.b2cwatches.com/aigner-watches-c-379.html
http://www.b2cwatches.com/bell-ross-watches-c-88.html
http://www.b2cwatches.com/breitling-watches-c-83.html
http://www.b2cwatches.com/cartier-watches-c-59.html
http://www.b2cwatches.com/chanel-watches-c-194.html
http://www.b2cwatches.com/chopard-watches-c-187.html
http://www.b2cwatches.com/concord-watches-saratoga-c-135_136.html
http://www.b2cwatches.com/corum-watches-c-259.html
http://www.b2cwatches.com/dior-watches-c-256.html
http://www.b2cwatches.com/with-black-dial-men-p-1595.html
http://www.b2cwatches.com/tag-heuer-watches-c-121.html
http://www.b2cwatches.com/a-lange-sohne-watches-c-72.html
http://www.b2cwatches.com/breitling-watches-c-83.html
http://www.b2cwatches.com/bvlgari-watches-c-53.html
http://www.b2cwatches.com/iwc-watches-c-96.html
http://www.b2cwatches.com/longines-watches-c-282.html
http://www.b2cwatches.com/omega-watches-c-79.html
http://www.b2cwatches.com/oris-watches-c-210.html
http://www.b2cwatches.com/panerai-watches-c-81.html
http://www.b2cwatches.com/patek-philippe-watches-c-77.html
http://www.b2cwatches.com/porsche-design-watches-c-116.html
http://www.b2cwatches.com/rolex-datejusts-watches-c-49.html
http://www.b2cwatches.com/vacheron-constantin-watches-c-99.html

[info]yj2133011

November 30 2010, 13:06:49 UTC 1 year ago

Other factors wedding choice: the Mermaid Sweetheart Satin Wedding DressMermaid Sweetheart Taffeta Wedding Dress need to note that to use a long tail trailing wedding or short Mermaid Taffeta Organdie Wedding DressMermaid Taffeta Tulle Wedding Dress tail, often subject to external environmental factors. If an Mermaid Taffeta Wedding DressMermaid Taffeta Wedding Dress outdoor wedding, there are good looking tail; flower girl to be older, but otherwise there is no effort to pick Mermaid V neck Sash Satin Lace Wedding DressOne Shoulder Chiffon Prom Dressup the tail for the bride, or even trip over

[info]replicalvbags

December 9 2010, 01:35:08 UTC 1 year ago

replicabags

Givenchy handbags
Gucci handbags
Jimmy Choo handbags

[info]pjswb2005

December 15 2010, 06:53:52 UTC 1 year ago

This is a really good read for me, Must admit that you are one of the best bloggers I ever saw.Thanks for posting this informative article.
hermes handbags Coach handbags hermes birkin handbags hermes purses discount hermes handbags hermes kelly handbags hermes lindy handbags hermes wallets hermes birkin bags burberry handbags hermes handbag coach handbags

[info]kadirboz

January 8 2011, 19:22:25 UTC 1 year ago

harbiden iyiymiş

Tek tek havayolu şirketlerinin sayfalarına girmenize gerek yok uçak bileti satın almak istiyorsanız sitemizi ziyaret ediniz.

[info]biletchi

January 26 2011, 20:25:11 UTC 1 year ago

uçak biletleri -
tatil

[info]Robertiq

March 20 2011, 17:01:56 UTC 1 year ago

nee

Evden eve nakliyat (http://www.istanbulevdeneve.com)

[info]ahmet_sansar

March 26 2011, 17:22:40 UTC 1 year ago

repli

Mucize hap altın çilek ile kilo verin.
Ağrılarınız mı var ? orjin krem ile ağrılara son verin.
Kilo vermek zor mu altın çilek form seti ile çok kolay.
Sigaradan bıktım leş gibi kokuyoruz ya tütüne son ile buna son ver.
Create an Account
Forgot your login or password?
Facebook Twitter More login options
English • Español • Deutsch • Русский…