Debating the Linux Process Scheduler
An anonymous reader writes "The Linux 2.6.23 kernel is expected around the end of the month, and will be the first to include Ingo Molnar's much debated rewrite of the process scheduler called the Completely Fair Scheduler. In another Linux kernel mailing list thread one more developer is complaining about Molnar and his new code. However, according to KernelTrap a number of other Linux developers have stood up to defend Molnar and call into question the motives of the complaints. It will be interesting to see how the new processor really performs when the 2.6.23 kernel is released."
Is someone who does understand the differences able to explain, in non-kernel-developer terms, what the big differences will be for the average user, developer or administrator? I mean, I'd love to discuss it, but first of all I'd want to know what we're discussing.
We used to have a Bill of Rights. Now, with the rights gone, all we have left is the bill.
I doubt any of us could tell the difference. Storm in a tea cup.
When Nerds Attack 3: The Nerdening.
Another CFS flamewar within 2 weeks of the last slashdot article on it.
http://linux.slashdot.org/article.pl?sid=07/09/01/1853228
And yet the most important performance bugs in the kernel haven't had any updates.
http://bugzilla.kernel.org/show_bug.cgi?id=7372
http://bugzilla.kernel.org/show_bug.cgi?id=8636
I do not understand the fixation on CPU scheduling when there are so many other things that need attention. [Heck, if disk IO performance is so broken, I certainly don't have the guts to try out the new firewire code in 2.6.22 as well and add another variable into my life.]
More importantly, if there are more than one Scheduler, and if someone could tell the difference, why isn't s/he using the ALTERNATE Scheduler and compiling their own custom, tweaked and totally tuned kernel?
Seriously, most people aren't going to notice, and those that do notice, ought to be able to compile their own kernel, and ought to do exactly that. This is nothing short of an esoteric discussion and shouldn't extend beyond kernel developers. Most people don't know, and don't care which scheduler is implemented.
I'm one of those somewhere between caring and not. I only care about the supposed differences in approach to scheduling, and quite frankly, from what little I understand, the various schemes to scheduling have their advantages and disadvantages. I seriously doubt that ONE is better in all circumstances compared to all the others.
Agent K: A *person* is smart. People are dumb, stupid, panicky animals, and you know it.
Have you considered the fact that different people work on different areas of the kernel? The people that work on the scheduler generally have very little to do with hardware drivers.
If Microsoft or Apple were more open with regards to their kernel development, I'm pretty sure issues like this would be posted here on slashdot - regardless of a favored OS.
I know they've changed the model of development for the kernel, but how many new schedulers have we gone through between 2.4 and 2.6 now? Maybe it is just me, but the scheduler seems like a pretty important piece of the kernel.... Ripping it out every 6 months and calling it "stable" seems a bit off to me.
Oh well. I guess I'm just getting cranky in my "old" age.
The more you know, the less you understand.
Why not having the possibility to choose the sheduler ? What about a modular kernel sheduler, so everyone will be happy.
Ceci n'est pas une Signature !
For example, ReactOS had a flamewar regarding the "stolen code from Windows", and it was nearly identical. There was this obsessive guy that got fed up over nothing just because his pride as a person was hurt. In the end he was just misinterpreting stuff. The other guy tried to be calm and understanding, but it didn't work.
In the end, it's just about one thing: Some developers, no matter how high their IQ is, are too full of themselves because they have a stupid complex and a low self-esteem.
Maybe to you. To me all the flaming and arguing, over a change that will not--apparently--have much of an effect upon the average user, means that the kernel developers are passionate about what they do. It means that, once the dust settles, we'll get a superior product. Maybe if the developers in Microsoft were this passionate Windows would be as good as GNU/Linux.
If you're not entertained by this you don't have to read the stories, just apt-get upgrade and enjoy the software. This is the way things work in the world of Free software, as Linus says: 'May the best code win!' If you want a kernel developed by boring, outsourced workers: choose Microsoft.
I'm going to transform myself into a mighty hawk. Either that or I'll just go and work at Dixons, haven't decided yet.
Does anybody know what kind of scheduler BEOS used before it's demise? I seem to recall it ran circles around other OS's at the time when it came to multitasking multimedia.
I know its not easy getting info on wireless chips, but time would be better spent working on something like that.
I'll ignore for a moment the fact that you're essentially making the same argument as "Why aren't all scientists (from solid-state physicists to cognitive neuroscientists) working on a cure for cancer instead of [perceived frivolous research in the news]?" You're ignoring the different kinds of expertise that go into a complex field of work like kernel development.
Instead, I'm just going to focus on your assertion that support for a few more wireless chipsets than the abundant choices we have today is more important than fixing problems in the most central and fundamental task of the kernel -- a task that even the most minimalist microkernels consider necessary to put into the microkernel.
This is simply hogwash. Scheduling affects every single part of the system, and it's a major factor in the perceived and real performance of a system. Fixes to the scheduler will affect how a user enjoys their system over the entire life of the system whereas a missing wireless driver affects them once -- at purchase time.
Furthermore, not all Linux systems have wireless networking. Adding more wireless drivers is going to be useless in nearly all server and most embedded uses. You seem to be under the mistaken impression that the purpose of Linux is to provide a good desktop or laptop experience. There are considerably more application domains that Linux operates in.
And frankly...
Just look at all the live CD's out there and how many can connect to wifi? Ubuntu and not much else.
This is not the kernel developers' problem. They've provided the functionality as evidenced by the fact that Ubuntu can do it. This is up to the distro developers to work on. Again, you make the mistake of assuming that all developers are equal and interchangeable and that they all have the same responsibilities in bringing the product to you, the unpaying customer.
If it's for-profit but free, you're not the customer -- you're the product (e.g., the Slashdot Beta's "audience").
There isn't much more important work for a kernel than improving performance under load. They could probably do better by focusing on I/O scheduling than CPU scheduling. My CPU spends an inordinate amount of time waiting for IO. But kernel performance is of the utmost importance to kernel developers. What does it matter if it runs on your hardware if it doesn't run well?
Give me Classic Slashdot or give me death!
Maybe I missed them, but where were all of the Slashdot articles about the ULE 2 and ULE 3 FreeBSD schedulers? From all the benchmarks I've seen, they make the Linux scheduler look embarrassingly antiquated (performance characteristics matching the 4BSD scheduler that ULE was originally designed to replace).
I am TheRaven on Soylent News
One way to cause dramatic performance problems on a Windows machine is to simply write a program that accesses lots of files. Performing a network backup with the Windows Networking API is a good example of this. Windows responds by fetching the files from disk and using system memory as a cache. In the process, the working set of programs running on the computer is paged out. The result is that low-priority activities can dramatically slow down potentially important activities on the computer. A good example of this is doing a network backup or a background virus scan on a Windows computer while trying to do any foreground activity (like browsing the web or using Microsoft Word).
So far, in my experience, Linux seems pretty immune to these priority inversions. Will the new scheduling algorithms allow low-priority processes to cause priority inversions by abusing non-processor resources like the network or disk drives?
The discussion is not as bad as it sounds (almost normal for LKML!), it's just that Roman wants to talk about the maths and Ingo works with patches... as Willy Tarreau pointed out "I know for sure that the common language here on LKML is patches".
Beyond the heated discussion with Roman Zippel, there are still a few workloads which can trigger regressions, one of which I found running some unit tests.
This is covered in this thread, and although there is now a version of CFS which does not exhibit the problem (see graph of combo3-yield patch) it is not the one that is meant to be merged in 2.6.23 (these patches are 2.6.24 material) so Ingo is getting me to test patches until this regression can be solved.
One slightly annoying thing is that the current fix involves using sysctl to switch back (at least partially) to the old scheduler mechanism!
TODO: 753) write sig.
Since only Root should be able to perform a systemwide install & consequentially have access to the 'loader', Root would be determining the runlevel, but any user can use it. If the program were installed locally by a non-Root user, then it wouldn't be able to access the 'loader' to configure it & would run normally at nice 0.
The current model, limits any normal user to nice 0 and above, with everything defaulting to 0. Lets face it, most daemons aren't time sensative enough to require a nice of 0 - the 10mS difference in mounting the CD is totally overwhelmed by the 2 seconds it takes the tray to close & the disk to spin up anyway - a perfect candidate for a nice of 10.
On the other side of the coin, dropping Skype or Kphone into nice 0 is bad. As audio systems, pretty much any delay is a recipee for poor audio quality. They need control when they need it - not 10mS later. The same with GUIs, because they directly interact with people, they need to have the snappy response of a negative nice program - not as negative as multimedia, but better than the baseline.
As I started reading the comments on here I noticed that many were quick to down Ingo for his transgressions and its quite obvious from the comments that no one has bothered to read the exchange on LKML in order to become familiar with what is going on. I have read it, I have 0 bias for either Zippel or Molnar and I can say without any reservation that Zippel is a wank and Molnar is borderline saintly.
A recap of what I have read and understood about the entire situation:
Ultimately I think Zippel is purposefully trying to provoke Molnar throughout all of this. His wild accusations are nothing more than games that he is playing, the guy has a chip on his shoulder and if Linux was my toy, I would have blocked him from the mailing lists.
I guess articles on the FreeBSD schedulers are either not being submitted or are being rejected. It's a shame either way. I don't use BSD (for no particular reason) but I'd still very much like to hear about what's going on there.
Do you have any better hostages?
This is where priority levels, or "nice", come in. They allow the user to tell the computer which stuff should be preferred/unpreferred, and how much.
Unfortunately, some people insist that the scheduler should guesstimate the priorities by itself, rather than depending on the user's judgement; since the scheduler can't read the mind of the user, such guesstimating (or "heuristic") scheduler frequently guesses wrong, leading to performance problems. What's even worse is that the constantly changing "dynamic priority" for every program can easily lead to temporary high latency, which in turn leads to audio/video skips and unresponsive system.
A totally fair scheduler will give each process CPU time according to their nice level, without trying to guesstimate. Con Kolivas came up with such a design (the Staircase Deadline scheduler), after which Ingo Molnar wrote a similar design (the CFS) based on the SD which then got accepted into the kernel. Con wasn't happy about this and quit kernel development altogether, which is unfortunate since the "-ck" patchset maintained by him was/is a huge improvement over the vanilla kernel.
Forget magic. Any technology distinguishable from divine power is insufficiently advanced.
Boffoonery - downloadable Comedy Benefit for Bletchley Park