Con Kolivas Returns, With a Desktop-Oriented Linux Scheduler 333
myvirtualid writes "Con Kolivas has done what he swore never to do: returned to the Linux kernel and written a new — and, according to him — waaay better scheduler for the desktop environment. In fact, BFS appears to outperform existing schedulers right up until one hits a 16-CPU machine, at which point he guesses performance would degrade somewhat. According to Kolivas, BFS 'was designed to be forward looking only, make the most of lower spec machines, and not scale to massive hardware. i.e. [sic] it is a desktop orientated scheduler, with extremely low latencies for excellent interactivity by design rather than 'calculated,' with rigid fairness, nice priority distribution and extreme scalability within normal load levels.'"
BFS is the Brain Fuck Scheduler. (Score:5, Interesting)
Why would the summary omit this precious bit of information?
Re:BFS is the Brain Fuck Scheduler. (Score:5, Informative)
from the dare-not-speak-its-name dept.
Re:BFS is the Brain Fuck Scheduler. (Score:5, Funny)
Another one for the Geeks-are-great-at-naming-things wall.
Re: (Score:3, Interesting)
Another one for the Geeks-are-great-at-naming-things wall.
All the TLAs are taken anyway. As always, you'll have to look at the context.
great news (Score:5, Interesting)
Great news :-) Now, will the kernel people with Mr. Torvalds at their head, restart the whole debate on pluggable schedulers. Since his scheduler, as he says, degrades beyond 16 CPUs, better options already exists for servers where I am guessing CFS is used. So, he may be back, but the road ahead is still as steep?
Re:great news (Score:5, Insightful)
I think that's only going to be a good thing, because IMO the arguments against pluggable schedulers are weak. "we need the few people working on this to just make the core better for ALL CASES" is about the most valid i've heard, but linux is too broadly applied to force it to meet all cases. realtime, embedded, servers, desktop: i just don't think one scheduler can be shoehorned to maximize performance for all those. You wind up with a crippled scheduler that really only achieves maximum performance in at most one of those four domains. And the question of there being enough developer minds working on it? you can bet that more commercial enterprise will start throwing money at it when they can customize it for their domain.
It's like the dynamic syscall argument in a way. without dynamic syscalls, the argument goes, all the 'fringe functionality' people have to think harder and have to integrate their stuff into the current syscalls/drivers/subsystems. (apologies ingo) however, without dynamic syscalls, all the "middle of the road" functionality people like hardware manufacturers, are unwilling to release drivers that they essentially have to ask customers to compile as a supported option.
Both, IMO are cases of cutting off your leg to spite your foot.
Re: (Score:2)
I agree. Linux is too large (in the classic meaning of the english word) to run on a single scheduler. But then again, what is a _single_ scheduler? If it means a facility that can plug and unplug schedulers at runtime, let us say switch between CFS (or something even more server oriented) and BFS as it detects server-desktop border patterns, then I guess both Mr. Torvalds and Mr. Kolivas are happy. And users are happy too. The rigid unexplained reason that "we only need ONE scheduler, period." however puts
Re:great news (Score:5, Insightful)
I think anyone who cares and knows anything about this debate is hoping Linus sees the light and allows work to begin on pluggable schedulers. There are no definitive arguments against having pluggable schedulers, and plenty of formidable ones for them. I never really understood Linus' handling of Con in the past, I really hope that, this time round, the new BFS is given a fair assessment, and if it's found to be better under desktop use patterns, adopted for use in desktop distros.
The idea that the Nokia N900 smartphone uses the same process scheduler as my now-dated laptop as well as my 8 core server is just silly.
Re:great news (Score:5, Interesting)
Re: (Score:3, Insightful)
Linus Torvalds has, for once, made pretty clear arguments against it. Various philosophical ones etc. but also several solid technical ones
See this email [lkml.org] and this one [lkml.org].
The grandparent's statement that "here are no definitive arguments against having pluggable schedulers" glosses over the fact that Linus' argume
Re: (Score:3, Informative)
Alternatively, maybe pluggability would have to be done with self modifying code which left no indirection in place?
No. In most modern CPU architectures, schedulers are implemented by handling a timer interrupt. The address for the handling code is put in the interrupt vector table during kernel start-up. For implementing pluggable-scheduling, all you need to do is to change the contents of the interrupt vector table. Once that is done, scheduling happens the same way as when there's only a single scheduler. So no. It doesn't require self modifying code and it's not a performance overhead to have pluggable schedulers.
Re:great news (Score:5, Interesting)
OOh. I've just seen the 'thought for the day' at the bottom of the page:
"One size fits all": Doesn't fit anyone.
Even the gods of slashdot are getting in on the debate.
Re:great news (Score:5, Interesting)
I never really understood Linus' handling of Con in the past
Linux kernel development is all about "playing well with others": a very important part of the process is being able to handle criticism constructively and fix the problems it addresses, or show that it is wrong; that's the way progress is made. You need to do this again and again and again. Most criticism is very technical and can be quite insightful, but can also be strong and relentless -- people will point out every single little flaw, and possible flaws, and unclear points, and whitespace inconsistencies, and... To be a successful linux developer you need to be able to deal with this constructively, and the more important and core the area you're dealing with, the more important this becomes.
The impression I've gotten from reading various past "Con threads", is that while he tries in the beginning, Con doesn't deal well with this process; he can't keep his ego submerged, gets frustrated, and everything (perhaps including Con himself last time I read one of these threads) ends up unravelling. The same thing has derailed other big projects too (i.e., reiser4, when Reiser himself was still involved).
It's a shame when this happens, but basically the process is more important that specific pieces of technology -- technology can be replaced, but the process is what makes linux as good as it is.
Re:great news (Score:5, Informative)
Agreed; Con seems not to be able to work well in the process.
e.g. Ingo ran a bunch of benchmarks on BFS and made a long post to LKML explaining his results, that, while critical of its performance on a series of benchmarks, bent over backwards to be very polite in tone, with things like:
First and foremost, let me say that i'm happy that you are hacking the Linux scheduler again. It's perhaps proof that hacking the scheduler is one of the most addictive things on the planet ;-) ...
General interactivity of BFS seemed good to me - except for the pipe test when there was significant lag over a minute. I think it's some starvation bug, not an inherent design property of BFS, so i'm looking forward to re-test it with the fix. ...
I hope to be able to work with you on this, please dont hesitate sending patches if you wish - and we'll also be following BFS for good ideas and code to adopt to mainline.
And Con responded with a very defensive and confrontational tone:
I'm not interested in a long protracted discussion about this since I'm too busy to live linux the way full time developers do, so I'll keep it short, and perhaps you'll understand my intent better if the FAQ wasn't clear enough.
Do you know what a normal desktop PC looks like? No, a more realistic question based on what you chose to benchmark to prove your point would be: Do you know what normal people actually do on them?
Feel free to treat the question as rhetorical.
Full exchange here:
http://thread.gmane.org/gmane.linux.kernel/886319 [gmane.org]
Re: (Score:3, Informative)
For desktop use, I doubt many users *care* whether or not they drop some percentage of throughput on interactive apps, if it means that processes actually run "properly" (eg, video playback, gaming, audio processing, etc).
ingo benchmarking some abstract processes that no desktop user would actually run day to day merely reinforces con's point.
Yes, con may have come off as a bit of an arse, but given his previous "do not contact me regarding kernel matters" posting to LKML, only to
Re: (Score:3, Insightful)
Well, he has a point.
So what? If you have a point, but you're being a dick about it, people are far less likely to notice. And given Ingo at least *tried* to be civil, the least Con could do is return the favour, rather than immediately becoming an offensive asshole. For example, he could've responded with:
"Well, recall, the purpose of the scheduler is to enhance desktop performance. Thus, I've designed it to favour low latency over high throughput, and as a result, it's not really surprising that, in
Re: (Score:2)
Does it even need to be a run-time option? A single installation will always run on the same hardware, more or less, so what's the point? Just make it a compile-time setting. Distros can decide which scheduler is right for them, or offer a choice of kernels with either one or the other.
Re: (Score:3, Interesting)
While I'm here, why does the summary [sic] i.e. It is a contraction of 2 words and perfectly acceptable. And in case they were worried about repetition with the following words " it is ", i.e. means "that is" as in "that is to say" used with a pause in normal speech. You have to read the precedi
Re: (Score:3, Informative)
...why does the summary [sic] i.e
Because the 'i' should have been capitalized since it was the beginning of a new sentence. Had Kolivas written "hardware, i.e." there would be no sic.
Re: (Score:3, Insightful)
The sic is in the wrong spot.
It reads "it is a desktop orientated scheduler". Note the topic subject is "desktop oriented scheduler".
It should read "it is a desktop orientated (sic.) scheduler.
Re: (Score:3, Funny)
The sic is forward looking...
- Peder
Re: (Score:2)
but linux is too broadly applied to force it to meet all cases. realtime, embedded, servers, desktop: i just don't think one scheduler can be shoehorned to maximize performance for all those.
I thought scalability was the main strength of Linux as an OS. Perhaps it's time we did the same with the kernel. Just as you don't need CUPS if you don't have a printer, you don't need a scheduler scaling to 2^32 CPUs for a laptop.
Glory! (Score:5, Interesting)
May I be the first to say "amen"? I've been very dissatisfied with the 2.6 kernel and its schedulers on the desktop, CFS in particular. CFS seems entirely braindead for desktop use compared to the older schedulers in 2.4 and yes, even 2.2.
A desktop machine needs to be, first and foremost, responsive. If it isn't, it's comparable to the cursor freezing and input taking several seconds to appear: on today's hardware, one might start to think "hey, did it freeze on me?" - completely unacceptable.
Maybe it can be chalked up to the non-priority of X and video at the kernel level; I don't know. Whatever it is, it used to be better, on very pathetic (133MHz) hardware, while doing a lot more (and when such hardware was not all that powerful anymore, as well).
My question is: is it in the kernel tree yet? Is this that 2.6.31 scheduler change I heard about earlier yesterday, or is it something Completely Different?
Oh yeah, and which other scheduler's, if any, did this guy write?
Re:Glory! (Score:5, Interesting)
Are you looking at getting this into mainline?
LOL.
No really, are you?
LOL.
Really really, are you?
No. They would be crazy to use this scheduler anyway since it won't scale to
their 4096 cpu machines. The only way is to rewrite it to work that way, or
to have more than one scheduler in the kernel. I don't want to do the former,
and mainline doesn't want to do the latter. Besides, apparently I'm a bad
maintainer, which makes sense since for some reason I seem to want to have
a career, a life, raise a family with kids and have hobbies, all of which
have nothing to do with linux.
Re:Glory! (Score:5, Insightful)
No. They would be crazy to use this scheduler anyway since it won't scale to
their 4096 cpu machines. The only way is to rewrite it to work that way, or
to have more than one scheduler in the kernel. I don't want to do the former,
and mainline doesn't want to do the latter. Besides, apparently I'm a bad
maintainer, which makes sense since for some reason I seem to want to have
a career, a life, raise a family with kids and have hobbies, all of which
have nothing to do with linux.
Which is not to say that it might not find it's way into the Ubuntu Desktop mainline patchset, for example. Sure it might not make sense for the mainline kernel, but it surely makes sense for a user focused distro like Ubuntu - they already have patched base and server kernels, so why not a genuine desktop targeted kernel?
Re:Glory! (Score:5, Informative)
What is that? You don't have the choice of scheduler in your kernel? I'm using the Zen sources [zen-sources.org], and I get to choose between least half a dozen schedulers, including other settings. I am certain that this scheduler will make it into that patchset, and that I will enable it, as soon as zen-sources-2.6.31 get installed on my system.
After all this is Linux! Not some one-company-one-kernel monoculture!
Re: (Score:2)
Re: (Score:2)
The only way is to rewrite it to work that way, or
to have more than one scheduler in the kernel. I don't want to do the former,
and mainline doesn't want to do the latter.
Who gives a fuck about mainline? If it's good, people will use it. And if more people use this than the default one, perhaps it's time to rethink some things.
Re:Glory! (Score:5, Informative)
No, and probably won't ever be, though perhaps some ideas will be borrowed.
From his FAQ:
The "bad maintainer" part is referring to bad blood over the adoption of Ingo Molnar's CFS [kerneltrap.org] over Kolivas's own RSDL, in particular at least one LKML poster suggesting that, all else being equal, it'd be better to merge Molnar's code, as he was more likely to be a reliable maintainer (Molnar's more tied into the workings of the mainline kernel development/merging/etc.).
Re: (Score:3, Interesting)
The "bad maintainer" part is referring to bad blood over the adoption of Ingo Molnar's CFS [kerneltrap.org] over Kolivas's own RSDL
Yeah but Con just didn't give the impression that he intended to be around to support his code. He is an anaesthetist. Software is a hobby which he could give up whenever he wants to. I think that is very different from somebody who is doing software for their career.
Re:Glory! (Score:5, Informative)
Yeah, that makes sense, but he seems to have taken it personally. It sounds like part of it stems from his feeling [lkml.org] that Molnar unnecessarily wrote a replacement using his ideas and got credit for it, instead of helping out to turn one of Kolivas's fair-scheduling proposals into something that could be merged. Though from what I can tell Molnar's replies are all pretty friendly, and he seemed keen to provide appropriate credit.
Re:Glory! (Score:5, Insightful)
The whole point is moot. Relying on a single maintainer is just plain stupid. "All things being equal" they should choose the code which OTHER people can maintain easier.
Re: (Score:2)
If they really wanted maintainability they would have changed to microkernel architecture years ago.
Obviously.. That's why Hurd [gnu.org] is so successful.
Re: (Score:3, Interesting)
Hurd is not unsuccessful because it is a microkernel, it is unsuccessful because it is run by perfectionists. Every time they get something quite good, they realise that a complete rewrite could make it even better and they throw away a lot of good code.
Xen seems to be doing quite well as a microkernel, but until everyone is using multiprocessor machines there is a performance penalty for using a microkernel. When everyone is using multicore, they still have the disadvantage that monolithic kernels have
Re: (Score:2)
Software is a hobby which he could give up whenever he wants to.
You realize this is how most of the linux world works right?
I am not sure it is how the kernel developers work. Think about it: it is likely that Con Kolivas has never once used an operating system other than windows in his working environment. He uses linux at home, in his spare time. He may never have seen Linux used in a large scale production environment.
Re: (Score:2, Insightful)
Re: (Score:2)
You're making too much out of it.
The whole idea of Linux is that you can hack it.
Con is actually doing science; he developed a theory of operation, wrote a kernel around it and now it's possible for others to develop more ideas and
Re: (Score:3, Insightful)
I haven't tested this scheduler. However, during Con's previous scheduler effort, sound skipped in ZSNES under mainline kernel, and didn't skip under Con's scheduler, in ident
Re:Glory! (Score:5, Informative)
Oh yeah, and which other scheduler's, if any, did this guy write?
SD scheduler [kerneltrap.org]
Re:Glory! (Score:5, Insightful)
I wonder what BeOS had, that was so good. I mean, was it a scheduler thing? Or was it the pervasive multithreadedness that the OS almost forced upon the developers? Whatever it is, it worked like black magic: BeOS would always listen to the user input, no matter what the heck it was doing in the background, no matter what insane load was on the CPU - your mouseclicks were always reacted upon immediately, your drags were always reacted upon immediately, your typing, resizing, brushstrokes, midi-signals, whatever, always, under any circumstance, were immediately and smoothly followed by the correct response.
I was hoping Windows 2000 would achieve that, then I was hoping Windows XP would achieve that, then I was hoping some of the newer 2.6 kernels in Linux coupled with innovations in X would achieve that - but I was always deeply, utterly disappointed. Then I kinda hoped Vista would get somewhat close to what BeOS did. Oh yeah, now that was a hope decisively smashed.
Re: (Score:2)
It is certainly a good thing - instant response (as far as the user is concerned, since "instant" is relative here). I have never used BeOS, and have to wonder - how was its "race-to-complete" task performance? If everything in the system was so catered to response timings but (concurrent) task performance suffered (in a pre-emptive multitasking OS, every task shares time with others, at least the CPU scheduler), then the user is not happy either. He/she wants instant response AND switft audio/video encodin
Re: (Score:2)
Re:Glory! (Score:5, Insightful)
No normal user cares about their video encoding being 2 seconds slower (over a 3 hour process) because they wanted to answer their email. If that's really important to you, you are probably doing your video encode overnight or during some time when nobody's using the computer, anyway, and then it doesn't matter.
Instant response is *always*, *always* more important than all other tasks. Always. One of the many, many things BeOS got right.
Re: (Score:2)
I was hoping Windows 2000 would achieve that, then I was hoping Windows XP would achieve that, then I was hoping some of the newer 2.6 kernels in Linux coupled with innovations in X would achieve that - but I was always deeply, utterly disappointed. Then I kinda hoped Vista would get somewhat close to what BeOS did. Oh yeah, now that was a hope decisively smashed.
Yup, but apparently Microsoft 'listened' to the screams of outrage, hate and despair that the users of Vista cried out, and changed things in W7 t
Re:Glory! (Score:4, Interesting)
Anyway, Windows has had 2 schedulers for ages - you can select desktop or server style processing (and cache strategy) since NT4.
That's not two schedulers, it's just some tunables. See pages 391 to 444 of Windows Internals, 5th Edition (or comparable pages in earlier editions). For instance, on Vista the default quantum is two clock intervals (a "clock interval" is usually about 10 to 15 ms), while on Windows Server it's twelve clock intervals. Similarly, on desktops an extra boost is given to the currently focused application. You can adjust this at runtime in the GUI on Vista under Advanced System Settings -> Advanced -> Performance -> Settings -> Advanced (yes, apparently scheduler adjustments are very advanced in Microsoft's view). It can be controlled with slightly more granularity with the registry key HKLM\SYSTEM\CurrentControlSet\Control\PriorityControl\Win32PrioritySeparation (a six-bit bitfield).
Linux currently offers scheduler tunables both at compile-time and runtime. Try ls /proc/sys/kernel/sched_*. It has more than Windows, apparently. I expect there are some compile-time options too, but I'm not an expert in anything related to kernels or systems programming.
Re: (Score:3, Informative)
That's not two schedulers, it's just some tunables. See pages 391 to 444 of Windows Internals, 5th Edition (or comparable pages in earlier editions).
I'd mod you informative, given that this is Linus's preferred option this is an important distinction
Re: (Score:2)
According to the latest Ars Technica article about Snow Leopard, BeOS had used threads for everything and it didn't worked out quite well in the end unfortunately...
How so? Technically, BeOS as a user-friendly and responsive desktop environment, is still unbeaten. It tanked in marketshare, but that had nothing to do with using threads with everything.
Re: (Score:2, Informative)
"GCD embodies a philosophy that is at the opposite end of the spectrum from BeOS's "pervasive multithreading" design. Rather than achieving responsiveness by getting every possibl
Re:Glory! (Score:5, Informative)
The same is pretty much true of .Net's Windows.Forms. It's a bit faster than Swing, although not by much (some parts are actually slower - System.Drawing vs Java2D, for example), so it's a little more forgiving of doing work in the UI thread. It will still bite you in a non-trivial application. Of course, the framework provides absolutely no help in writing a multithreaded application, and all of the tools, examples and documentation make writing a multi-threaded application far more difficult than it should be.
Yes, and things like Control.Invoke [microsoft.com] to marshal invocations from background threads to UI, and especially BackgroundWorker [microsoft.com], which are there specifically to provide a high-level (i.e. without locks) API for worker threads, with progress reporting and cancellation, must be just figments of my imagination?
Have you actually written any WinForms code in .NET 2.0+?
*sniff* (Score:5, Funny)
Re:*sniff* (Score:4, Funny)
I smell another LKML flamewar coming....
A flamewar on the LKML? Pfffffffffffft. Impossible. Never happened, never will happen.
Linux on the Desktop/Linux on the Server (Score:3, Insightful)
Clearly, Desktop Linux and Server Linux have some things in common, but they also have different needs. I'm not intimately familiar with any kernel programming but I do have some basic understanding of how it all works and even I find it relatively easy to understand that the needs of a good and snappy desktop and those of reliable server are going to have some differences.
I think it is beyond time that some sort of kernel operating mode optimizations are enabled like this scheduler thing for desktop even if the defaults are for server.
Re: (Score:2)
I'm really wondering where that either/or comes from... I mean they are like children "I want this!" "No, I want THAT!".
Put in a configure option like grown-ups, and like any other real developer, and be done with it!
Power really corrupts. And actually, I have this configure option in my kernel, because of some nice guy -- that is none of those whiners -- is doing a high performance patchset. I did not even know that others have no choice.
Re: (Score:2)
Put in a configure option like grown-ups, and like any other real developer, and be done with it!
Even in a kernel there are many things that aren't performance sensitive, but the scheduler is not one of them. From what I understood from the kernel discussion last time, this would probably have to be #ifdefs galore. It's also not just the algorithm itself, everything that collects data for the scheduler to use also costs cycles. After all this runs 1000 times a second, it has to be as lightweight as possible.
Re:Linux on the Desktop/Linux on the Server (Score:5, Interesting)
From what I understood from the kernel discussion last time, this would probably have to be #ifdefs galore.
No, it really wouldn't. Take a look at how Xen and FreeBSD implement pluggable schedulers. Each scheduler in Xen is identified by a struct which contains pointers to its state and all of the functions related to actions the scheduler needs to take. These are called from the rest of the code (most commonly the timer interrupt handler). The total extra cost is one extra load instruction per call, which is tiny compared to the amount of work that the scheduler does. In FreeBSD, it's even simpler. The functions that implement the scheduler are declared in a header and implemented once in each scheduler's .c file(s). At compile time, you simply compile in the scheduler you want. Total run time cost is zero. FreeBSD cares about stability, so they've retained the old 4BSD scheduler all through the transition to the ULE scheduler (which, by the way, was outperforming the CFS in the last set of benchmarks I saw, although not by as large a margin as it outperformed the old Linux scheduler). This allows people operating servers that would rather sacrifice a little performance than use relatively new code to select the old one. Xen is designed for a variety of workloads, and so it has several schedulers that you can choose between.
Of course, these are only possible if the interface between the scheduler and the rest of the kernel is clean already. If it isn't, however, then you almost certainly have bigger problems than not being able to choose between two schedulers.
forward looking (Score:5, Informative)
Took me a while to figure out what "forward looking" means in this context, since "forward-looking scheduler" doesn't seem to be common terminology, and I assumed he wasn't talking about his grand forward-looking vision for schedulerdom.
Based on some previous arguments he's had, it sounds like he opposes the common heuristic of upping interactive process priority by keeping track of how long processes sleep--- processes that sleep a lot are probably I/O bound, and should get a priority boost so they can run on the (less frequent than for CPU-bound processes) occasions when they're ready. Kolivas wants schedulers to be forward-looking in the sense that they decide how to schedule without looking at process run history, by looking purely at who's ready to run, available timeslices, priorities, etc.
Welcome back Kolivas (Score:3, Funny)
Haven't run Linux as my personal OS since 2003 but I had a lot of time (pun intended) for CK's schedulers. Now a whole new generation of youngsters can finally learn what a _REAL_ LKML flamewar looks like ;-)
4096 cpu machines (Score:4, Interesting)
Are you looking at getting this into mainline?
LOL.
No really, are you?
LOL.
Really really, are you?
No. They would be crazy to use this scheduler anyway since it won't scale to their 4096 cpu machines. The only way is to rewrite it to work that way, or to have more than one scheduler in the kernel. I don't want to do the former, and mainline doesn't want to do the latter. Besides, apparently I'm a bad maintainer, which makes sense since for some reason I seem to want to have a career, a life, raise a family with kids and have hobbies, all of which have nothing to do with linux.
Reminds me of this XKCD [xkcd.com].
I don't have 4096 CPUs, good job Con Kolivas!
Re: (Score:3)
Still some grudge towards Torvalds and Molnar? From the FAQ:
Apparently Linus genuinely is growing a little more prickly in his old age. While he's still got a fair way to go to equal Theo, he apparently does have a tendency to snap and snarl at people, on occasion. You might want to look up how he treated Alan Cox in relation to the tty code in the kernel, as well.
Re:4096 cpu machines (Score:5, Insightful)
Re: (Score:3, Interesting)
You might want to look up how he treated Alan Cox in relation to the tty code in the kernel, as well.
I followed that. Linus wasn't wrong about anything and Alan was acting a tad obtuse. 2.6.32 has been delayed another week to pick another louse out of the pty code.
There was more going on than was posted on lkml. Alan has always called Linus "pinhead" and gotten away with it.
Although he has an abrasive personality with developers at times, Linus is pretty good with testers. He was very patient with me in the 1.3 cycle (including sending me patches to test) as I was debugging what would ultimately prove
Re: (Score:3, Interesting)
Well who knows, maybe instead of the elusive year of Linux on desktop, we should be expecting and applauding years of downstream personal automated-installing GNU/Linux distributions like LFS or diy-linux, which will let users to choose schedulers and what not. Not exactly something I expect to happen soon, but my feeling is GNU/Linux is being institutionalized. It is like if the trust is just not there to anything but the mainline. People assume that the majority is right here - that the maintainers of mai
Re: (Score:2)
Unfortunately, the internal interfaces of Linux kernel are constantly being modified, so maintaining an "alternative" kernel has a h
Re: (Score:3, Informative)
If Cons new scheduler is as good as he tries to paint it, build kernel and use it in thousands.
Ingo did some benchmarking. The following landed in my lkml mailbox about an hour ago:
hi Con,
I've read your BFS announcement/FAQ with great interest: ...
As can be seen in the graph BFS performed very poorly in this test:
at 8 pairs of tasks it had a runtime of 45.42 seconds - while
sched-devel finished them in 3.8 seconds.
I saw really bad interactivity in the BFS test here - the system
was starved for as long as the test ran. I stopped the tests at 8
loops - the system was unusable and i was getting IO timeouts due
to the scheduling lag:
sd 0:0:0:0: [sda] Unhandled error code
sd 0:0:0:0: [sda] Result: hostbyte=DID_OK driverbyte=DRIVER_TIMEOUT
end_request: I/O error, dev sda, sector 81949243
Aborting journal on device sda2.
ext3_abort called.
EXT3-fs error (device sda2): ext3_journal_start_sb: Detected aborted journal
Remounting filesystem read-only
I measured interactivity during this test:
$ time ssh aldebaran /bin/true
real 2m17.968s
user 0m0.009s
sys 0m0.003s
A single command took more than 2 minutes. ...
(Lots of text elided) Apparently he did a lot of benchmarking and BFS didn't fare very well. Ah well.
I hope this time Con takes him on. Competition Is Good and concentration on desktop interactivity is certainly high on my wishlist of desired optimizations.
He ain't kidding. (Score:5, Insightful)
CFS can't even cope with a CPU-bound application [foldingforum.org].
Who here runs Linux on anything with more than 16 cores? Why should everyone else get the shitty end of the stick just because of maybe a dozen institutes with deep pockets?
Re: (Score:3, Interesting)
Re:He ain't kidding. (Score:5, Insightful)
I think what you want is not a single scheduler designed for the desktop, but one designed for server processes. That's probably the whole argument here - there isn't a single scheduler that can work efficiently for the 2 wildly different types of work a user put a machine to, but currently you don't have a choice. This is all about giving users choice of what kind of scheduler they'd like to run. You might even find that a scheduler designed for lots of CPUs (at the expense of interactivity probably) would suit you much more than the current system, especially when you buy more cores.
Re: (Score:3, Insightful)
>Who here runs Linux on anything with more than 16 cores?
Along the same lines... Who here runs their Linux *servers* with 16 or *less* cores? Probably 99.9%?
And "server" doesn't really mean anything. At work, we use Linux thin clients, so the Linux "server" is really dealing with 150 desktops, except not managing X/kb/mouse. So should it be treated like a "server" or a "desktop" for scheduling?
Re: (Score:2)
My personal server. [sun.com] A debian based distro of Gnu/Linux is much easier for me to admin than Solaris. Massively multicore is the future. I wouldn't buy any new computer with less than 16 cores/hardware threads. Well, except for laptops and embedded systems.
Re: (Score:3, Interesting)
Re: (Score:2)
Note that the thread you linked to compared schedulers based on per process CPU "usage" levels (90-95% vs 100%). Those numbers are not accurate representations of anything close for evaluating scheduling algorithms. There are many reasons for that, but let me just say that the number given there depends upon sampling and can be wildly inaccurate.
If they really wanted to test CPU gains from scheduling efficiency, they should have tested the difference in ti
16... okay for the desktop for 12 months (Score:5, Interesting)
16 sounds like a ridiculously high number for a desktop but is it?
Already we have 4 core processes which have "soft" additional threads (Intel's HT for instance) and some people already have dual CPU desktop machines meaning they are already at the 16 CPU limit.
Roll on 12-18 months and we'll be seeing 8 core CPUs with 8 soft-cores as coming in on top end desktops. Roll forwards 3 years and you'll be seeing 32 core CPUs with 32 soft-cores which is where the scheduler breaks down.
So the problem here is that this is a brilliant optimisation for today and for pieces like the netbook market but won't be good for the desktop market long term.
With Linux looking to be strong in the netbook market however it does say that having a more efficient scheduler for that market would be a better idea than just optimising everything for the server side.
Re: (Score:2)
[...] So the problem here is that this is a brilliant optimisation for today and for pieces like the netbook market but won't be good for the desktop market long term. [...]
How is this a problem? The scheduler supposedly (I did not test it) works well for the current situation, so it should be looked into and used if it holds up to its promises. And when the technical progress renders it outdated, it should be discarded and replaced with something better.
I would rather have a better scheduler right now and switch again in three years than put up with one which works suboptimal now and may or may not run better on future hardware.
Re: (Score:2)
16 is very high for a desktop system. The majority of "desktop" systems are now laptops. I doubt you're going to see 16+ cores in a laptop anytime soon. Very few people are buying desktops these days and the few people who actually need a desktop system with 16+ cores are probably going to have entirely different workloads from the average user.
Re: (Score:3, Insightful)
16 probably isn't very far off. The ARM Cortex A9, which is starting to ship into handhelds and mobile phones, scales to 4 cores. The A10 will probably handle 16, so expect to see handheld computers with 16 cores in the next couple of years. Of course, when you're on battery power, you'll probably want to turn a few of these off, so the scheduler has to decide not just which jobs to run, but how many cores to enable at any given time. This is a really difficult problem (you can read some interesting pap
AMD has 6 core right now and 12 in 2Q10 (Score:2)
AMD has 6 core right now and 12 in 2Q10. Intel and AMD will have 16 core by end of 2010 or early 2011. They are designed to run in multi-socket systems.
Re: (Score:2)
Everyone considers the netbook market. Why won't anyone think of the mobile phones?!
Re:16... okay for the desktop for 12 months (Score:4, Insightful)
I guess you didn't read TFA:
In the meantime if you care about CPU utilization and latency then use this. Tomorrow will take care of itself. It's not like if you buy one computer or graphics card, or build one kernel, that you're tied to it for the rest of your life. You use this year what's available and update when the situation warrants it.
GIT repository? (Score:2)
The FAQ:
Sorry, it's not the right tool for me so it's not worth me investing the time
in setting one up.
C'mon Con. DSCM is a great way to distribute forks of software. If you don't like git (I don't) there is a mercurial mirror [kernel.org] of the linux kernel available and hosting a repository is dead easy. There are plenty of free options anyway. Or ask me.
Pluggable schedulers need to come back (Score:2)
I only care about 200-800MHz single core ARM performance. When I do have a dual-core ARM, I'm only running Linux on one core in that situation. Not only am I am evil bastard that doesn't cared about desktop performance, like those nasty server-oriented kernel maintainers, I also don't care about server performance!
That said I think I like his scheduler for embedded. I may have to try the patch out at work and see how many apps and drivers choke because it exposes their races.
I could do without his emotional
Erm... (Score:2)
Why have you put an editorial "sic" in there? "i.e." is perfectly valid in the context in which it was used, it's an abbreviation of the Latin, "id est", or "that is".
The quote, if read in a manner expanding the abbreviation, would read "...and not scale to massive hardware. That is, it is a desktop orientated scheduler..." I would probably have changed the full stop after "hardware" to a semicolon, but that's me.
Re: (Score:2)
Because either the 'i' should have been capitalized since "hardware" was followed by a period, or the period following "hardware" should have been a comma.
Since neither construction was used, the paragraph as written did not follow the conventional rules of grammar, therefore, the sic was required.
I also could have written "[hardware, i.e.,]", but that wouldn't have led to so many fruitful side discussions.
One thing Con has always made me wonder... (Score:2)
...is how many other scenarios there, have been, where someone had code for the kernel which was better than the default, but which got arbitrarily rejected by Linus out of hand. This might be a high profile case, but I'll be money that it's probably nowhere close to having been the only one.
The benevolent dictator model, when it works, is a good thing. However, Linus, like all of us, is human, and he's also been working on the kernel for a long time now.
There would have to have been times when he has mad
Kudos Con (Score:4, Interesting)
Welcome back Con! I wonder how long it is before Ingo "Kudos Con" Molnar rips of the new design? The kernel team has developed a very bad case of "not invented here." http://kerneltrap.org/node/8059 [kerneltrap.org]
Re: (Score:2)
Uh, a few machines have eight cores. Core2Duo is doing OK, but really, the heat problem is not actually going away in any way shape or form.
Re:Cool, but what does that spec mean? (Score:5, Informative)
He means something different by it--- that the scheduler should only look forward, not look back to per-process history in making its scheduling decisions. A common hack/heuristic to improve interactive performance is to boost the priority of processes that sleep a lot, since CPU-bound jobs sleep rarely, while interactive processes sleep a lot. Kolivas think that's a hack that obscures the real problems with interactive performance, and leads to unpredictable performance since it doesn't fix the underlying issues. So wants to design schedulers with good interactive performance that make decisions based purely on the current set of running processes and priorities, and the upcoming timeslices.
Re: (Score:2)
I think he means "forward looking" in the sense that scheduler does not collect samples from anything that already happened, it only makes decisions on what happens immediately after.
Re: (Score:3, Interesting)
I've yet to be impressed by any of them, for any use, with any hardware.
I've yet to be impressed by your comment, which contains no reason for your opinion.
Care to give us some examples of your uses & hardware?
Re: (Score:2)
I've yet to be impressed by your comment, which contains no reason for your opinion. Care to give us some examples of your uses & hardware?
From looking at his posting history, I would say it's because Linux is GPL. He seems to have an axe or three to grind...
Re: (Score:3, Funny)
Re: (Score:2)
Don't know about freebsd but I have had many linux systems lock up with a runaway process. Never happened to me on netbsd.
Re: (Score:3, Informative)
Re: (Score:2)
I am not sure what you are trying to paint here. If you have four cores, and do a compilation through 4 jobs, the compilation will race to complete and optimally should load all cores (especially since you explicitly told it to do it 4-way). Also, compilation is not all that I/O bound, it is more CPU bound. Anyways, I think I missed the meaning of your post entirely. Explain please... :-)
Re: (Score:2)
Re: (Score:2)
Ok, I get it now. Will take time to process :-)
P.S. Compilers are getting more and more intelligent these days, and intelligence comes at the price of CPU cycles, so it would be more observant to say that indeed even with modern hardware, compilers developing in parallel, they still are keeping up to remain CPU-bound? But you are of course right about C compilers (which is what kernel stuff is built with), these develop much slower (lack of necessity, really) and thus the hardware has outran their needs by
Re: (Score:3, Informative)
Compiling with SSD vs. mechanical HD:
http://anandtech.com/storage/showdoc.aspx?i=3631&p=25 [anandtech.com]
Compiling is CPU bound.
Re: (Score:3, Insightful)
During testing (on the Windows platform!) I guess it's safe to assume that everything was handled by filesystem cache.
The comparisation with compiling the kernel on Linux on a machine with not too much RAM doesn't stand.
Re: (Score:3, Informative)
Also, compilation is not all that I/O bound, it is more CPU bound.
Depends a lot on what you're compiling. A typical program on OS X, for example, begins with #import <Cocoa/Cocoa.h>. This includes a header which brings in around a hundred other headers for a total of about 3MB of preprocessed source. Most of the time you'll be using a precompiled header for this, but you still often get a spike of read activity at the start of a compilation, then a CPU-bound chunk, then a write-bound part as it generates the object code. This is why, when you use -j, you are rec
Re:Who cares? (Score:4, Informative)
Re: (Score:2)
And the fact that BFS isn't even able to properly schedule n+1 lightly-cpu-bound processes certainly doesn't talk in it's favor.
But it's true; I haven't tested the code yet, and miracles could exist, but his analysis isn't confidence inspiring - to say the least.