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.
Expected Debate: For-Molnar: Its better! Against: No its not, its totally unfair. For: No, its a fair scheduler, and its better! Against: Nuh-uh! Your a liar*hits him* For: I'm telling Linus!
"Hold! What you are doing to us is wrong! Why do you do this thing?"
Don't you mean "processor"?
I doubt any of us could tell the difference. Storm in a tea cup.
When Nerds Attack 3: The Nerdening.
New process scheduler? Not processor.
It's been beaten to death everywhere else already.
Some improvements have been identified for 2.6.24
I know its not easy getting info on wireless chips, but time would be better spent working on something like that. Just look at all the live CD's out there and how many can connect to wifi? Ubuntu and not much else. (note to self- take wifi chip developers out to strip club and get them drunk next time they are in town)
Nerd Attack 2: Electric Boogaloo
.... and call it a day.
That was a very entertaining read. I love it when strong personalities squabble, and egos collide. Open Source is Fun!
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.
That was quite a round robin way to do it...
I was not entertained. What a bunch of babies.
And find out which ones better.
Although they mention improvements and the like, it seems like "Flamewar involving Linux Process Scheduler personalities +BONUS shreds of Linux Process Scheduler Goodness" would be much more appropriate.
Well, we've got to get boners for something, and girls are too elusive.
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.
the upper management of slashdot is such a bunch of losers. we know. i wish they'd start thinning out the herd and get some real talent in here.
The big user-visible difference are improved fairness and interactivity. If you have multiple tasks sharing a cpu, the amount of cpu time allocated to each task is better regulated.
Also, nice levels are more predictable. In general, decreasing the nice level by one means that the task gets 1.25 times as much cpu. This means that a nice -19 task gets approximately 50x the cpu time as a nice 20 task.
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.
today is spelling optional day.
Let's just hope Roman Zippel does not throw the towel like Con Kolivas just because everyone thinks Ingo Molnar's scheduler math is always the best to back him.
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").
Real world benchmarks will decide.
You are being MICROattacked, from various angles, in a SOFT manner.
They're passionate alright. Passionate about preventing anyone outside the inner clique from touching "their" kernel.
It means that, once the dust settles, we'll get a superior product. ...by making it clear that anyone who has a superior idea will be told to fuck off, and have their idea reimplemented badly by someone pretending it was theirs.
as Linus says 'May the best code win!'What staggering hypocricy.
back when the scheduler issue first popped up there were a few suggestions about developing a method to preset nice levels for software - IE, kphone & skype could be niced to -10 & most daemons to 10 with a start rather than having to reset them after launch with 'renice'. The advantage of that is that launching with preset negative nice numbers could be done by anyone rather than only by the superuser. That would show some benefits for interactive/latency sensative software without creating any problems for software that doesn't report a need - they would still default to 0.
-Emacs vs. vi
-Reiderfs vs. ext3 (obsolete)
-GPLv3 vs GPLv2
-GPL vs BSD
and now:
Scheduler wars!
It may be time for Linux development to split. One fork will focus on stable code that works like a UNIX, and the other in forging new boundaries. I think the FreeBSD developers did something simple.
There is a good reason for this. When you want to make something stable, you want to take proven ideas and refine them so you can make guarantees.
But for our hacker souls, and our inner adventurers, we also need something that is determined to break new ground and make no guarantees. The CFS is being justified by performance, or administrative reasons, but why not focus instead on the real reason we'd like to see it happen?
It's a cool idea to play with.
We're primates. Play is how we learn and invent. Keep pushing upward, making the code do new things and taking on new challenges, because the hacker spirit is play. That playfulness has brought us most of our thinking outside the box, good inventions. Keep it up. Aim for the stars.
technical writing / development
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
Interesting question!
You know, its funny, but, OSS people, and the academic world in general, since they work for peanuts, if not free, are really big into having their names attached to things that they did.
I wonder how much of a troll it would be, if one were to make a math book that took out all the names of all the people, renamed everything based on descriptive terminology, and just made some part of science a faceless API, like so much a Windows SDK reference or C# help.
This is my sig.
On a server, you want the different server tasks to have fair access (usually, this isn't always the case) to the processor so that all the server stuff can go on smoothly.
On a personal workstation, however, an interactive user doesn't necessarily want all the programs to have fair access... we typically would like to have what we're concentrating on currently to be more responsive (have potentially unfair access) or else we may see dropped frames, stuttering music, or the like because the scheduler is trying to be fair to applications that aren't interactive with the console user.
This is the battle that was going on... one claims that Linux process scheduling methodologies were being swayed too far by the interests of admin for servers and this was compromising the single-user in front of a desktop experience.
What probably needs to happen is to have multiple schedulers or, at least, one where you can set the behaviour at runtime to be either more fair (server type machine) or more responsive to user tasks (desktop type machine).
FP!
Knowledge is power. Knowledge shared is power lost.
No, I'm New Here.
Damn, why is no one laughing?
09 F9 11 02 9D 74 E3 5B D8 41 56 C5 63 56 88 C0
45 5F E1 04 22 CA 29 C4 93 3F 95 05 2B 79 2A B2
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?
Hello. My name is Ingo Molnar. You killed my scheduler. Prepare to die.
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.
not a programmer here, but it seems people are trying to ... PROGRAM a shedular, get it?
... do magic.
... :)
program a schedular here
that is like asking a calculator "2+2=?" please?
i honestly think a shedular is magic. and like magic it means,
we should KNOW the outcome before we start processing.
that said, we shounldn't ASK the CPU to tell us how to shedule,
which we obviously ARE.
we need to take a step back, like 2 meter, look at the computer and
say "HEY, i know who you work", then
im sure in a serially processing computer, there's a magic question/combo
with build-in into CPU instructions we can get a "live pulse" running for
a Operating system
that Ingo takes the work/ideas of others about the scheduler and presents his own implementation without proper reconnaisance or collaboration.
As the main responsable of the kernel, don't you think that something has to be done? At the current state I (as a developer) would not try to contribute to such a personally 'monopolized' project, that's sad.
What's in a sig?
Indeed. Mind you, if we could get it work better 'everywhere', maybe some people would be *gasp* prepared to pay for it.
I know, chicken and egg, but if there was a larger user base, perhaps there would be more room and resources for - as many people are suggesting here - different schedulers, for example.
You're very bitter about something, aren't you?
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 scheduler will be obsolete almost before it gets out the door. I'm waiting for the Utterly Completely Fair Scheduler (thought I might wait for the Totally Utterly Completely Fair Scheduler).
Guess the scheduler issue should be important... and the debate about what's the best scheduler may be fascinating tough... But wtf sometimes seems to me that people spends lots of time doin' things just because they don't have anything more interesting to do? ... duh.
That wasn't completely fair, you know
Boffoonery - downloadable Comedy Benefit for Bletchley Park
I'm no expert I'm afraid but I'll let I'll share with you what I know. The Linux I/O scheduler (which I believe turned up some time in the 2.6 era) is somewhat separate from the CPU scheduler (although there is a link in priority and timeslices). Thus it was always possible to drag a process doing I/O down by having something else perform enough disk I/O, especially if you are the root user. If you can make a system swap that will hurt things even more (and that's a form of I/O).
The thing to remember is that servicing certain types of I/O need not necessarily use up much CPU time. If a device is capable of doing DMA it will need comparatively little time from the CPU to be serviced (bigger transfers can happen while the CPU is off doing other things as opposed to have the device generating interrupts all the time that the CPU has to service before any more data is transferred because some temporary buffer is full and needs moving). Additionally, certain network drivers are able to do NAPI which can reduce CPU load during heavy transfers. The way that Linux handles interrupts (which have a top and bottom "half") allows the bottom half to happen in a process context (so the heavier part of the processing counts towards a process's timeslice). This is touched upon in on Robert Love's MMCSS entry. However, if you have an important process's I/O queued up behind something less important (and the low priority task is able to generate enough a big enough request for I/O on its timeslice) then the important processes may appear to go slower (effectively its latency will go up due to having to be passed over because its I/O isn't ready) despite having more CPU time assuming the hardware can't satisfy all the requests for I/O quickly enough (imagine big writes to a slow disk with deep queues and the task needing acknowledgement all the data made it to disk).
Depending on which I/O scheduler you picked and your hardware you may be able to alleviate this problem but that's not to say that things can't be improved (or that no one is complaining about the problem).
In short I would imagine the new CPU scheduler impact would be marginal improvement on I/O performance or latency under I/O load. If it was OK before it should still be OK (but bear in mind in memory virus scanning is a special case that I would imagine would make any OS go slower).
One slightly annoying thing is that the current fix involves using sysctl to switch back (at least partially) to the old scheduler mechanism!
Is that's true?
Are we making a 'new' scheduler that under some circumtances reverts to the old one?. If that's true, please why not try to learn a little form the BSD code/people? It seems they already have-it right.
What's in a sig?
Naah, only the dispatcher should in the kernel. The ordering of the processor queue (scheduler) can be delegated to a process outside the kernel.
Aphorisms don't fix code. (Bart Smaalders)