Linked by Thom Holwerda on Tue 10th Jul 2007 21:57 UTC, submitted by maverick
Linux The Linux kernel process scheduler, as you know it, has been completely ripped out and replaced with a completely new one called Completely Fair Scheduler. How fair it will be, remains to be seen. Here's what its original creator Ingo Molnar says: "80% Of CFS's design can be summed up in a single sentence: CFS basically models an 'ideal, precise multi-tasking CPU' on real hardware." Learn more about the new scheduler from the CFS design document.
Thread beginning with comment 254401
To read all comments associated with this story, please click here.
CK's SD vs Ingo's CFS
by hechacker1 on Wed 11th Jul 2007 00:16 UTC
hechacker1
Member since:
2005-08-01

I've been using SD when it first made its appearance as RSDL. Con Kolivas showed that a completely fair scheduler really provides the best experience for all workloads... No more "hand tuning" for specific cases like the old mainline scheduler.

To date: SD is still better at some workloads (absolutely fair compared to CFS) especially when it comes to OpenGL/beryl/compiz/gaming/music workloads.

SD has a higher context switch rate (due to array switching) but has "smoother" performance (yes, that is a metric that Ingo uses too). CFS doesn't have array switching artifacts since it uses a rbtree (no arrays) which leads to lower context switches. In theory, CFS is better, but in practice SD is my favorite.

I've tested each version of SD and CFS since there inception, and SD has been consistently ahead in terms of "smoothness" and fps while doing compiz/totem/mplayer/xmms/muine torture testing.

Unfortunately CK got some cold treatment by Ingo and other Kernel developers (including Linus). Ingo essentially took CK's idea, made a worse copy (not as fair), and has been bug fixing it since the beginning. Each version adds more "hand tuning" to make up for its unfair nature; such as the many "granularity" kernel interfaces in /proc/sys/kernel. SD only has one interface in /proc/sys/kernel, rr_interval.

Meanwhile SD has been stable at 1.00 for a long time now. As far as I'm concerned, SD is the reference, and CFS is trying to match it. SD could probably be further improved with many micro-optimizations, only if CK had the will.

Ingo also took CK's IDLEPRIO and IDLE_BATCH and implemented them.

I'm not saying anything is wrong with using GPL'd code and trying to improve on it, but CK was shut down early on, and now Ingo is free to implement his version after the fact.

CK has now released his final ever release of CK 2.6.22-ck1. I believe he is tired of this BS. So you see I'm forced to use CFS because it has Linus' blessing and is now on the fast track for mainline. Sigh.

CFSv19 is finally matching SD for most workloads, but I can still manage to starve X and compiz during normal usage. Overall however, CFS is a major improvement to the old mainline scheduler which was inherently unfair.

Edited 2007-07-11 00:20

RE: CK's SD vs Ingo's CFS
by sbergman27 on Wed 11th Jul 2007 00:39 in reply to "CK's SD vs Ingo's CFS"
sbergman27 Member since:
2005-07-24

"""
Unfortunately CK got some cold treatment by Ingo and other Kernel developers (including Linus).
"""

Not to take sides. But do you mean this cold treatment?

http://lwn.net/Articles/226963/

Reply Parent Bookmark Score: 5

RE[2]: CK's SD vs Ingo's CFS
by hechacker1 on Wed 11th Jul 2007 01:03 in reply to "RE: CK's SD vs Ingo's CFS"
hechacker1 Member since:
2005-08-01

That argument was for RSDL v.31 when renicing X to -10 helped out Xorg a lot in gaining more CPU time for itself (to improve user experience under load).

Now realize that Ingo also now supports renicing X to -10. He even made a patch for the kernel to do it automatically (i'm current using that patch with CFSv19).

It's precisely that kind of doublespeak that got CK upset. me too. Since then renicing to -10 isn't required, but still recommended (more so for CFS than SD in their current versions).

I did actual benchmarks for each version of SD vs CFS under the same conditions. All priorities at default 0... and SD won.

Linus was simply complaining because more people were willing to give CFS a try and post benchmark results (mostly highlighting problems with fairness compared to SD), while SD benchmark results were much less publicized. Probably because numbers weren't needed, it simply felt "smoother".. CK did try calling for more people to post benchmarks, but by then SD was basically wrote off from getting into mainline.

Edited 2007-07-11 01:06

Reply Parent Bookmark Score: 4

RE[2]: CK's SD vs Ingo's CFS
by Redeeman on Wed 11th Jul 2007 08:45 in reply to "RE: CK's SD vs Ingo's CFS"
Redeeman Member since:
2006-03-23

you do not understand the circumstances of this, those people were complaining about the fairness, he wanted X to provide the responsiveness it requires like 50% cpu to do, while as much other stuff, getting their fair share of cpu, which simply leaves less for X.

totally fair, but not what he wanted, and not how default did.

Reply Parent Bookmark Score: 1