LWN: Comments on "BFS vs. mainline scheduler benchmarks and measurements" https://lwn.net/Articles/351058/ This is a special feed containing comments posted to the individual LWN article titled "BFS vs. mainline scheduler benchmarks and measurements". en-us Sun, 31 Aug 2025 23:09:19 +0000 Sun, 31 Aug 2025 23:09:19 +0000 https://www.rssboard.org/rss-specification lwn@lwn.net BFS vs. mainline scheduler benchmarks and measurements https://lwn.net/Articles/391283/ https://lwn.net/Articles/391283/ vonbrand <p> Way back when I confiscated a dual Pentium Pro (200MHz) to use as a desktop machine for use in a class I was teaching... the machine was <em>old</em> already (I actually canibalized two of them to get a working one). Tue, 08 Jun 2010 13:22:51 +0000 worse than it should be https://lwn.net/Articles/353091/ https://lwn.net/Articles/353091/ oak <div class="FormattedComment"> Put Firefox to a container group of its own and set a limit on the active <br> pages it can have?<br> <p> </div> Wed, 16 Sep 2009 20:06:48 +0000 pluggable schedulers vs. tunable schedulers https://lwn.net/Articles/352357/ https://lwn.net/Articles/352357/ paragw <div class="FormattedComment"> Surely one single tunable (I want the desktop scheduler for example in the case of PlugSched) is better (i.e. less complex) from user standpoint rather than having to figure out say 5 complex numerical things such as granularity and what not? <br> <p> Or do we have one single tunable for CFS that converts it into desktop friendly? If it does have such a knob then the next and most important question is how well does it work for desktops. From the reports I think we are still some way from claiming excellent "automatic" interactivity for desktops. Note that I am excluding the nicing games and making the user do a complex dance of figuring out how to make his/her desktop interactive. I am sure you agree that does not work well.<br> <p> To your point, if we have to have one tunable for the CFS scheduler to make it desktop friendly - essentially a single knob (like sched=desktop in the PlugSched case) it is easy to see how that would fail to work satisfactorily for all desktop workloads. For one thing unless the user messes with nice levels of each process that he/she opens, minimizes or closes or brings to foreground (that is out of question from usability standpoint) the scheduler has no way to distinguish the foreground process from a background one, it has no way of distinguishing mplayer from dekstop window manager from some system daemon going bad and eating CPU.<br> <p> For another, the scheduler seems to have no reliable way to know what processes it needs to favor. Window manager and the process of the foreground window need to be registered with the scheduler as foreground processes, each minimized window needs to be registered with scheduler as background. Then as long as the window manager and the process owning the foreground window are not runnable everyone else gets CPU. Multimedia applications need to be registered with the scheduler as such - automatically, so that Mplayer always gets CPU when it needs it, even favoring it over the window manager and other process of another foreground window if there is only one available CPU. Until this co-ordination happens I think we will be away from achieving great desktop interactivity which works for most desktop workloads.<br> <p> Then the question would be that do we want to put all this "only needed on desktop" complexity into the completely fair scheduler or do we want to keep both separate. That is sort of a secondary question - the first question is how do we get the desktop to hint the scheduler as to which processes the user is actively interacting with, which ones are the ones he/she is likely to interact with (minimized windows) and then the scheduler favoring those accordingly - that ought to solve the interactivity problems in an automatic fashion.<br> <p> [ Windows has this notion of distinguishing between "Programs" (which are running desktop applications) and background services (things without desktop interaction) and in its default configuration on the desktop it favors "Programs" and on Servers it favors "Background services" (Web Server service for e.g.). And it certainly helps interactivity. It can do this because it can distinguish between what is a desktop application and which is foreground or background and what is a non-desktop, background application.]<br> </div> Sat, 12 Sep 2009 18:48:16 +0000 pluggable schedulers vs. tunable schedulers https://lwn.net/Articles/352364/ https://lwn.net/Articles/352364/ khc <div class="FormattedComment"> I already have a compile time way to select scheduler:<br> <p> patch -p1 &lt; 2.6.31-sched-bfs-211.patch<br> <p> </div> Sat, 12 Sep 2009 18:31:58 +0000 pluggable schedulers vs. tunable schedulers https://lwn.net/Articles/352350/ https://lwn.net/Articles/352350/ mingo <p> What i believe you are missing relates to the very first question i asked: wouldnt it be better if a scheduler had nice runtime tunables that achieved the same? <p> Your original answer was (in part and way up in the discussion): <p> <i> If we had a nice modular scheduler interface that allows us to load a scheduler at runtime or choose which scheduler to use at boot time or runtime that would solve the complexity problem and it will work well for the workloads it was designed for. As a bonus I will not have to make decisions on values of tunables - we can make the particular scheduler implementation make reasonable assumptions for the workload it was servicing. </i> <p> What you are missing is that 'boot time' or 'build time' schedulers (i.e. what PlugSched did in essence) are build time / boot time tunables. A complex one but still a knob as far as the user is concerned. <p> Furthermore they are <i>worse</i> tunables than nice runtime tunables. They inconvenience the user and they inconvenince the distro. Flipping to another scheduler would force a reboot. Why do that? <p> For example, it does not allow the example i suggested: to run Firefox under BFS while Thunderbird under another scheduler. <p> So build-time/boot-time pluggable schedulers have various clear usage disadvantages and there are also have various things they cannot do. <p> So <i>if</i> you want tunability then i cannot understand why you are arguing for the technically worse solution - for a build time or boot time solution - versus a nice runtime solution. <p> Sat, 12 Sep 2009 15:28:25 +0000 pluggable schedulers vs. tunable schedulers https://lwn.net/Articles/352341/ https://lwn.net/Articles/352341/ paragw <div class="FormattedComment"> I don't really understand it when you say "think through the technical issues involved [ in designing pluggable schedulers ] not being trivial" since you already mentioned PlugSched did just that prior to CFS.<br> <p> It might be a terminology difference that is getting in the way - when I say "pluggable" I imply choice more than anything else. In other words it would be perfectly OK for the scheduler to be selectable only at compile and boot time and not at runtime just like PlugSched was.<br> <p> We are advertising a completely fair scheduler that will do all things (ponies included ;) for everybody but no one has so far explained, HOW fundamentally, on the conceptual level, on the design level are we going to ensure that when resources get scarce (2CPU cores, 130 runnable processes - most CPU heavy jobs and one mplayer doing video and other doing audio encoding) we make sure we give enough, continuous CPU share to mplayer and the audio encoder and the whole desktop as such so it feels fluid to the user without the user having to play the nice games.<br> <p> Making it even simpler, asking the same question differently - what logic in the current scheduler will hand out the most resources to mplayer, the audio encoding process and the desktop window manager (switching between windows needs to be fluid as well) when user is interacting with them? You can say the scheduler will be completely fair and give an equal chunk to every process but desktop users get pissed if that means mplayer is going to skip - not enough CPUs and lot of processes to run.<br> <p> In other words - if I hand out $100 to a charity and ask them to be completely fair while distributing the amount to everyone equally and 200 people turn up for help - the charity did the fair thing and gave out 50c to everyone without considering the fact that 3 people out of the 200 badly needed at least 2$ so they could not only eat but also buy their pill and stay alive, that would be an unfair result at the end. So the charity has to have some notion of bias to the most needy and for that it needs to figure who are the most needy.<br> <p> The point I am trying to make is we need to have a scheduler that is both completely fair (server workloads) and desktop friendly and these conflicting objectives can only be met by having 2 different user selectable schedulers. The desktop scheduler can get into the details of foreground and background Xorg and non-Xorg, multimedia vs. non-multimedia processes and fight hard to keep the desktop fluid without bothering about the background jobs taking longer or bothering about scaling to 1024 CPUs. The CFS scheduler can stay fair and moderately interactive and scalable as it is and server people can select it.<br> <p> So again why do we not want to bring PlugSched back and have user select BFS or CFS or DS (Desktop Scheduler) (at compile or boot time)? If we do want CFS to do everything while being fair - I don't think we have explained on paper how it would ensure desktop interactivity without having a notion of what constitutes the desktop. We have to question the CFS goals/design/implementation if we are to go by the reports that after substantial development interactivity issues with CFS still remain. (Please don't say the nice word - I have explained already that it doesn't work well practically.) If it turns out that it is hard to meet conflicting goals well or if it turns out we need to add more complexity to CFS to meet those conflicting goals even in "most" workloads - it is still prudent to ask why not just have 2 different schedulers each with one, non-conflicting goal?<br> </div> Sat, 12 Sep 2009 14:44:03 +0000 pluggable schedulers vs. tunable schedulers https://lwn.net/Articles/352322/ https://lwn.net/Articles/352322/ nix <div class="FormattedComment"> But you still have to figure out which processes get their priorities <br> decided by which 'schedulers' (it is not very useful to jump into a Linux <br> discussion assuming that the terminology used is that of some other <br> kernel's development community, btw).<br> <p> </div> Sat, 12 Sep 2009 12:24:20 +0000 pluggable schedulers vs. tunable schedulers https://lwn.net/Articles/352308/ https://lwn.net/Articles/352308/ mingo <p> <i> Let me repeat - in Solaris, schedulers are the parts of code that calculate priorities. They don't do other things - specifically, they don't switch threads. You don't have to schedule them in any way - just switch threads conforming to the priorities calculated by the schedulers. </i> <p> That's not pluggable schedulers. It's <i>one</i> scheduler with some flexibility in calculating priorities. The mainline Linux scheduler has something like that too btw: we have 'scheduling classes' attached to each process. See include/linux/sched.h::struct sched_class. <p> <i> And if you don't like this approach, you could still do what FreeBSD has been doing for several years now - implement schedulers changeable at compile time. </i> <p> It's not about me 'liking' anything. My point is that i've yet to see a workable model for pluggable schedulers. (I doubt that one can exist - but i have an open mind about it and i'm willing to be surprised.) <p> Compile-time is not a real pluggable scheduler concept: which would be multiple schedulers acting _at once_. See the example i cited: that you can set Firefox to BFS one and Thunderbird to CFS. <p> Compile-time (plus boot time) schedulers is what the PlugSched patches did for years. <p> Sat, 12 Sep 2009 09:00:41 +0000 pluggable schedulers vs. tunable schedulers https://lwn.net/Articles/352306/ https://lwn.net/Articles/352306/ trasz <div class="FormattedComment"> Let me repeat - in Solaris, schedulers are the parts of code that calculate priorities. They don't do other things - specifically, they don't switch threads. You don't have to schedule them in any way - just switch threads conforming to the priorities calculated by the schedulers.<br> <p> And if you don't like this approach, you could still do what FreeBSD has been doing for several years now - implement schedulers changeable at compile time.<br> <p> </div> Sat, 12 Sep 2009 08:46:18 +0000 pluggable schedulers vs. tunable schedulers https://lwn.net/Articles/352305/ https://lwn.net/Articles/352305/ mingo <p> That does not answer the fundamental questions though. <p> Who schedules the schedulers? What happens if multiple tasks are on the same CPU with different 'schedulers' attached to them? For example a Firefox process scheduled by BFS and Thunderbird scheduled by CFS. How would it behave on the same CPU for it to make sense? <p> Really, i wish people who are suggesting 'pluggable schedulers!!!' spent five minutes thinking through the technical issues involved. They are not trivial. <p> Programming the kernel isnt like LEGO where you can combine bricks physically and have a nice fire station in addition to your police car ;-) <p> Sat, 12 Sep 2009 08:37:59 +0000 pluggable schedulers vs. tunable schedulers https://lwn.net/Articles/352300/ https://lwn.net/Articles/352300/ trasz <div class="FormattedComment"> Just do what Solaris does - schedulers are pieces of code that calculate thread priorities. This way you can assign different schedulers to different processes.<br> <p> </div> Sat, 12 Sep 2009 07:50:09 +0000 Morton's Fork https://lwn.net/Articles/352096/ https://lwn.net/Articles/352096/ Spudd86 <div class="FormattedComment"> Ingo mention that he does test exactly this on low end machines further up<br> </div> Fri, 11 Sep 2009 01:51:21 +0000 BFS vs. mainline scheduler benchmarks and measurements https://lwn.net/Articles/352069/ https://lwn.net/Articles/352069/ efexis <div class="FormattedComment"> This I believe is something that was more of an issue than it is now, so CPU's can ramp up their speed much quicker than they could've done before. One problem was for example that higher CPU speeds requires higher volts which can cause delays with the CPU stalling while the voltage steps up. Now instead the voltage will be pushed up a split moment before the frequency is ramped up, so there's no stall. Otherwise, it's all down to the CPU, with different models taking different amounts of time to change frequency, it can make sense to jump to the highest frequency when the usage goes up and then slow it down if needed (such as the ondemand governor does) or scale it up step by step. You want to try set a lower watermark where responsiveness is important, so CPU's always running at say twice the speed that you need it, so you always have room to move into while you wait for the cpu to speed up (eg, when load goes from 50% to 80%, the CPU speeds up to bring the load back down to 50%. Only if loads reaches 100% have you not sped up quickly enough). Of course if you wish to conserve more power, you run the CPU at speeds closer to load. In Linux, there're many tuneables for you to play with to get the responses you wish (/sys/devices/system/cpu/cpu?/cpufreq/&lt;governor&gt;). To see what's available on the Windows platform, there's a free download you can find by googling rmclock that proper spoils you for configuration options. There's no one rule that has to fit all, during boot up the kernel will test transition speeds and set defaults accordingly.<br> </div> Thu, 10 Sep 2009 22:23:14 +0000 Does the kernel scheduler even matter??? https://lwn.net/Articles/352041/ https://lwn.net/Articles/352041/ ajb <div class="FormattedComment"> The scheduler could still help more under conditions of VM stress. For example, on my netbook, which thrashes when you run firefox + anything, I literally run killall -STOP firefox-bin; killall -CONT other-app when I want to switch between them. This is a lot more convenient than quitting and restarting each app, which otherwise I would have to do. I imagine there might be some less manual way to achieve the same thing by building some more smarts into the scheduler/VM to achieve the same effect. Possibly with help from userspace.<br> </div> Thu, 10 Sep 2009 20:54:40 +0000 BFS vs. mainline scheduler benchmarks and measurements https://lwn.net/Articles/352032/ https://lwn.net/Articles/352032/ i3839 <div class="FormattedComment"> I'll try to send a patch against tip later this week, not feeling too well at the moment.<br> <p> </div> Thu, 10 Sep 2009 19:35:12 +0000 pluggable schedulers vs. tunable schedulers https://lwn.net/Articles/351890/ https://lwn.net/Articles/351890/ paragw <div class="FormattedComment"> [ Warning - long winded thoughtlets follow ]<br> <p> About the plugsched - since it was a boot time selectable it could do what I was proposing just not at runtime (which is no big deal really). And I wasn't suggesting mixing schedulers per CPU. My thought was to have one CPU scheduler exactly as we have it today - either selectable at boot time or based on how much complex it would be to implement, at runtime.<br> <p> If we talk about CFS as it is in mainline - I think its objective of being completely fair is a noble one on paper but does not work well on desktops with workloads that demand interactivity bias in favor of only a certain set of apps. Like many people have reported CFS causes movie skips and does worse than BFS for interactivity. I am not saying the problems with CFS are 100% due to it being completely fair by design but it is not hard to imagine it will try to be fair to all tasks and that in itself will not be enough for mplayer to keep running the movie without skips if there are enough processes and not enough CPUs. If it favored running mplayer it would not be completely fair unless we also started renicing the processes - which if you think of it, is fundamentally broken from usability standpoint unless it was made fully automatic which in turn is impossible without user involvement. (Desktop user is simply not going to renice every desktop process he works on and then one has to select what gets more interactivity bonus apart from Xorg - now the browser, later the mail client, etc. you get the idea. I explain more problems with nice a little further down.)<br> <p> Now if we think about the CPU(s) as a finite resource - if people start running more tasks than there are CPUs it becomes clear that a bunch of tasks have to be scheduled less frequently and given less time slice than a bunch of other tasks if we are to maintain interactivity. (In Windows for example - one can set a scheduler switch that either favors foreground tasks (desktop workload) or background (server) tasks.)<br> <p> So if we were to do something like build a scheduler with only goal of latency for interactive processes - we then would not have to worry about throughput in that scheduler. I.e. no conflicting goals, so less complexity and better results. Then one can think of a per process flag which Xorg and its clients can set that tells the desktop scheduler when the process window is foreground and interactive (when it is the topmost window or when a window needs user input) and the scheduler will ensure that it meets its goal of giving that process enough CPU resources to keep it running smoothly. This would solve the ugly problem of making the scheduler guess which process is interactive/needs user input or needs to be given interactivity boost so that the desktop feels responsive for the user. In my opinion making a scheduler with conflicting goals also making it guess processes to give interactivity boost simply does not work as the scheduler doesn't have enough data to know for sure what process needs the most interactivity at any given point of time - at least it is not straight forward to make that guess reliably every time, without any hint from the applications themselves.<br> <p> Similarly for servers we could simplify CFS to make sure it remains completely fair and goes after throughput and latency comes second.<br> <p> The benefit of having two schedulers is that of course users can choose one that does what they need - interactivity or fairness. So if someone complains my desktop is jerky when I run make -j128 kernel build, we can tell them to use the desktop scheduler and stop worrying about kernel build times if they are also going to play a movie at the same time. And for people needing fairness they can go with CFS and we can tell them to stop complaining about desktop jerkiness when running kernel builds as long as it is not anomalously jerky -i.e. not completely fair per goal. <br> <p> We then also keep complexity in each scheduler to minimum without penalizing server workloads with interactivity logic and desktop workloads with fairness logic. <br> <p> In short the point I am trying to make is that doing all things in one scheduler as we do it today, without any notion of what process needs user interaction or what process needs to be boosted in order to make the user feel the desktop is more interactive - it is never going to be a 100% success for all parties. (Correct me if I am wrong but I don't think we have any separate treatment for multimedia applications - they are just another process from the scheduler's PoV and it fails when there are also other 128 runnable processes that need to run on vastly less than 128 CPUs). Which means that the scheduler needs to be biased to the apps user cares most about - and nice does not work as long as it is a static, one time, user controlled thing. I don't want my browser to be nice -10 all the times - if it is minimized and not being used I want it to be nice +5 and instead have mplayer in the foreground nice'd to -5. Who decides what amount of nice in relation to other nice'd processes is sufficient so mplayer plays without skipping? We need something absolute there unlike nice - if a multimedia application is playing in the foreground - it gets all resources that it needs no matter what - that IMHO is the key to making the desktop users happy.<br> <p> <p> <p> </div> Thu, 10 Sep 2009 11:57:05 +0000 BFS vs. mainline scheduler benchmarks and measurements https://lwn.net/Articles/351887/ https://lwn.net/Articles/351887/ mingo <p> It shouldnt have too big cost unless you are really RAM constrained. (read running: a 32 MB system or so) So it's a nice tool if you want to see a general categorization of latency sources in your system. <p> latencytop is certainly useful enough so that several distributions enable it by default. It has size impact on task struct but otherwise the runtime cost should be near zero. <p> Thu, 10 Sep 2009 09:56:18 +0000 BFS vs. mainline scheduler benchmarks and measurements https://lwn.net/Articles/351885/ https://lwn.net/Articles/351885/ mingo Thanks for testing it. It would be helpful (to keep reply latency low ;-) to move this to email and Cc: lkml. <p> You can test the latest upstream scheduler development tree via: <p> <a href=http://people.redhat.com/mingo/tip.git/README>http://people.redhat.com/mingo/tip.git/README </a> <p> Thu, 10 Sep 2009 09:53:40 +0000 Interactive benchmarks https://lwn.net/Articles/351884/ https://lwn.net/Articles/351884/ man_ls More to the point: even when one side proposed invalid benchmarks, the other side was not able to come up with anything better. (And no, "beat them at their own benchmarks" is not a valid excuse; we are talking about engineering, not about marketing.) Thu, 10 Sep 2009 09:52:38 +0000 pluggable schedulers vs. tunable schedulers https://lwn.net/Articles/351882/ https://lwn.net/Articles/351882/ mingo <p> Note that what you propose is not what has been proposed on lkml under 'pluggable schedulers' before - that effort (PlugSched) was a build time / boot time scheduler selection approach. <p> Your model raises a whole category of new problems. For example under what model would you mix these pluggable schedulers on the same CPU? Add a scheduler of schedulers? Or can a CPU have only one pluggable scheduler defined at a time? <p> Also, how is this different from having per workload parameters in a single scheduler? (other than being inherently more complex to implement) <p> Thu, 10 Sep 2009 09:50:24 +0000 BFS vs. mainline scheduler benchmarks and measurements https://lwn.net/Articles/351819/ https://lwn.net/Articles/351819/ jamesh <div class="FormattedComment"> In the pipe test, neither process is going to be able to fill the pipe buffer. Each process blocks on the other doing alternating reads and writes on the pipes with pretty much no work in between.<br> <p> I guess it is possible that a scheduler could preempt the task between when the read returns and before it performs the write, but that seems unlikely.<br> <p> My intuition is that performance would primarily depend on how quickly the scheduler gets round to run a process when it becomes unblocked, which is essentially a measure of average scheduling latency (and as I said before, this doesn't tell you much about the variance in that latency).<br> </div> Thu, 10 Sep 2009 05:18:52 +0000 BFS vs. mainline scheduler benchmarks and measurements https://lwn.net/Articles/351813/ https://lwn.net/Articles/351813/ russell <div class="FormattedComment"> The pipe test would work best if the scheduler gave each task sufficient time to fill or empty the pipe, depending on it's role. It would suffer badly if it kept preempting those tasks to give some other task a go when it became runnable.<br> <p> The pipe test is more about ordering producers and consumers. Not latency.<br> </div> Thu, 10 Sep 2009 04:01:54 +0000 Interactive benchmarks https://lwn.net/Articles/351778/ https://lwn.net/Articles/351778/ njs <div class="FormattedComment"> <font class="QuotedText">&gt; As to the benchmarks, the first test was how fast can he build the kernel using n processes.</font><br> <p> To be fair, that benchmark is originally Con's, not Ingo's (Con's original announcement claims that "make -j4 on a quad core machine with BFS is faster than *any* choice of job numbers on CFS").<br> </div> Wed, 09 Sep 2009 23:40:32 +0000 pluggable schedulers vs. tunable schedulers https://lwn.net/Articles/351771/ https://lwn.net/Articles/351771/ paragw <i>How does moving your tunable to boot time make it less of a tunable? </i> <br><br> Where did I say move the tunable to boot time? I said the particular modular scheduler can make reasonable assumptions that are best for the objective it is trying to meet - low latency for Xorg and its clients for example at the expense of something else (throughput) on the desktop systems. Wed, 09 Sep 2009 23:10:30 +0000 Interactive benchmarks https://lwn.net/Articles/351731/ https://lwn.net/Articles/351731/ man_ls You are right, there are no benchmarks that show that BFS is good at interactivity. However I contend that such "hand-waving" is to be expected from an anaesthetist and a crowd of enthusiasts (and is not a bad thing at all). The real pity is that on lkml, a list full of high-flying engineers, nobody has been able to construct those benchmarks or do those measurements either. The best we have is a scheduler hacker posting odd benchmarks on esoteric hardware. No offense for Ingo, he was very respectful and had interesting data, but it was all biased: <blockquote type="cite"> we tune the Linux scheduler for desktop and small-server workloads mostly [...] what i consider a sane range of systems to tune for - and should still fit into BFS's design bracket as well according to your description: it's a dual quad core system with hyperthreading </blockquote> And then repeating the measures on a quad-core machine, the best he has offered so far. It seems that, despite having an expressed focus on the desktop, a netbook and a few days for testing on it are out of reach. <p> As to the benchmarks, the first test was how fast can he build the kernel using n processes. Well, this is only measuring thoughput; if each process is supposed to be interactive, it is not unreasonable to expect that they will more easily interrupted and thus the build will last longer. Then a very artificial pipe-messaging test, followed by similarly contrived benchmarks -- which CFS has already been tuned to. So the "other side" (lkml) has not been able to produce anything better either to show that CFS is good at interactivity, measuring skips and jitter, and I find this to be even more pitiful. Wed, 09 Sep 2009 20:14:16 +0000 pluggable schedulers vs. tunable schedulers https://lwn.net/Articles/351670/ https://lwn.net/Articles/351670/ martinfick <p> <i>If we had a nice modular scheduler interface that allows us to load a scheduler at runtime or choose which scheduler to use at boot time or runtime that would solve the complexity problem and it will work well for the workloads it was designed for. As a bonus I will not have to make decisions on values of tunables - we can make the particular scheduler implementation make reasonable assumptions for the workload it was servicing. </i> </p><p> How does moving your tunable to boot time make it less of a tunable? </p> Wed, 09 Sep 2009 16:31:46 +0000 BFS vs. mainline scheduler benchmarks and measurements https://lwn.net/Articles/351624/ https://lwn.net/Articles/351624/ k8to <div class="FormattedComment"> I think the idea of 'normal users' going to LKML with their problems is unworkable. However, I am willing to give it a try with my next interactivity stall. I expect to give up rapidly if faced with derision or brush-off.<br> </div> Wed, 09 Sep 2009 14:33:39 +0000 BFS vs. mainline scheduler benchmarks and measurements https://lwn.net/Articles/351597/ https://lwn.net/Articles/351597/ nix <div class="FormattedComment"> I thought CONFIG_LATENCYTOP had horrible effects on the task_struct size and people were being encouraged to *disable* it as a result?<br> <p> </div> Wed, 09 Sep 2009 11:50:52 +0000 BFS vs. mainline scheduler benchmarks and measurements https://lwn.net/Articles/351596/ https://lwn.net/Articles/351596/ nix <div class="FormattedComment"> Well, I'm a counterexample: I upgrade my hardware every decade, if that, but the kernels are normally as new as possible, because I'd like newish software, thanks, and that often likes new kernels. Further, everyone I know who isn't made of money and runs Linux does the same thing: they tend to run Fedora, recentish Ubuntu, or Debian testing, because non-enterprise users generally do not want to run enterprise distros because all the software on them is ancient, and non-enterprise distro kernels *do* get upgraded.<br> <p> I suspect your argument is pretty much only true for corporate uses of Linux (i.e. 'just work with *this* set of software', as opposed to other uses which often involve installation of new stuff). But perhaps those are the only uses that matter to you...<br> <p> </div> Wed, 09 Sep 2009 11:41:57 +0000 Well, this settles it for me https://lwn.net/Articles/351594/ https://lwn.net/Articles/351594/ liljencrantz <div class="FormattedComment"> Ingo has said that the graph size was a user error, apologized and replaced them. Calling him «extraordinary clueless» without knowing the facts is hostile and unmotivated. Mistakes happen.<br> <p> I agree that Ingos choice of test machine and benchmarks is telling when it comes to what his priorities are - he gets paid to create software that runs well on big systems, 8 CPUs probably looks small to him. No malice or stupidity involved, just a different perspective. <br> <p> I think the ball is firmly in the BFS camps court. Con won't and shouldn't deal with this, but any random BFS user with a bit of time could sit down and redo a set of benchmarks that _he_ feels is more relevant and use as a counterpoint. Maybe compiling vim on an Atom CPU as well as some measurements of dropped frames in mplayer while compiling? Latencies and stuttering may be hard to measure, but it is far from impossible. Something better than «it feels better when i shake my mouse» is needed.<br> </div> Wed, 09 Sep 2009 11:27:53 +0000 BFS vs. mainline scheduler benchmarks and measurements https://lwn.net/Articles/351591/ https://lwn.net/Articles/351591/ etienne_lorrain@yahoo.fr <div class="FormattedComment"> I also have some strange behaviour on a no-name dual core all intel portable PC, kind of 2-4 seconds where mouse is not even moving, without any load whatsoever, no log in /var/log/messages, completely random.<br> This portable PC is cheap and "designed for the other OS" system even if it was sold without anything installed: the DMI information is blank, the ACPI information does not seem to be better.<br> I tend to think that it is a SMM problem, instead of a scheduler problem, the crappy BIOS (cannot update because no DMI name) does not like Linux, or was explicitely designed to give a bad experience. I would really like to be wrong here.<br> There was a time when Linux did not rely on any BIOS, but it is no more (SMM cannot be disabled, even under Linux - what is what is handling the forced power off by pressing On/Off button for more than 3 seconds).<br> </div> Wed, 09 Sep 2009 10:08:56 +0000 BFS vs. mainline scheduler benchmarks and measurements https://lwn.net/Articles/351589/ https://lwn.net/Articles/351589/ realnc <div class="FormattedComment"> I've tried those tweaks. They don't really help much.<br> </div> Wed, 09 Sep 2009 08:42:38 +0000 Because I can https://lwn.net/Articles/351581/ https://lwn.net/Articles/351581/ gmaxwell <div class="FormattedComment"> Jitter, frame drops, and audio skips are all *easily measurable*. Yet *none* of the advocacy of BFS that I've seen includes any measure of these things. Only vague hand-waving about smoothness. Perhaps these people should color the edges of there disks with green markers... I hear it reduces jitter.<br> <p> Meanwhile I do audio processing with a ~2ms processing interval using the mainline scheduler, thrashing the system, high loads... and underruns are basically unheard of at least after tossing the drivers and hardware that I determined were misbehaving (with measurements, ... imagine that!) <br> <p> I don't doubt that there are genuine areas for improvement, even in the scheduler but it isn't going to get better without real measurements and some social skills superior to those of Hans Reiser. <br> <p> </div> Wed, 09 Sep 2009 07:57:26 +0000 BFS vs. mainline scheduler benchmarks and measurements https://lwn.net/Articles/351545/ https://lwn.net/Articles/351545/ alankila <div class="FormattedComment"> Well, what I get is that the full-screen button flashes a full-screen video for a frame or two, and invariably falls back to windowed mode. I'm not sure if that is the symptom for him, though.<br> <p> It could also be another problem: right now mouse button clicks within the flash applets don't seem to register -- I have to start video playback by pressing space because clicking with the mouse somehow doesn't seem to go through. Especially pressing the full-screen button does absolutely nothing right now. *sigh*<br> </div> Tue, 08 Sep 2009 23:59:36 +0000 BFS vs. mainline scheduler benchmarks and measurements https://lwn.net/Articles/351525/ https://lwn.net/Articles/351525/ ikm <div class="FormattedComment"> I think you can just try asking Con nicely.<br> </div> Tue, 08 Sep 2009 21:04:34 +0000 BFS vs. mainline scheduler benchmarks and measurements https://lwn.net/Articles/351508/ https://lwn.net/Articles/351508/ maxbg <div class="FormattedComment"> Hello, first post here :)<br> <p> I would really like to find out the actual algorithm the BFS uses. Reading the patches gives me little information as I <br> am not a kernel hacker (yet :).<br> I know it uses a global runqueue for all CPUs ... and it does not measure sleep time. What are those deadlines?<br> How does it differ from the SD and RSDL?<br> </div> Tue, 08 Sep 2009 19:37:43 +0000 BFS vs. mainline scheduler benchmarks and measurements https://lwn.net/Articles/351497/ https://lwn.net/Articles/351497/ realnc <i>Does it behave in an anomalous way for you? What would you expect it to do and what does it do for you currently?</i> <p>It does behave "anomalous." A simple example would be mplayer (or any other video player) or an OpenGL app "hanging" for a bit while I leave my mouse over the clock in the systray. This brings up details about the current time (what day it is, month, etc) in a "bells and whistles" pop-up that just doesn't pop-up out of the blue but slowly fades-in using transparency. It is for the duration of this compositing effect (which actually doesn't even need that much CPU power) that mplayer stalls, barks and drops frames.</p> <p>Now image how bad things can seem with virtually a crapload of actions (opening menus, switching desktops, moving windows, etc, etc) result in frame skipping, sound stuttering, mouse pointer freezing, etc. They perform well, that's not the problem. The problem is that due to the skips and lag, they *seem* to be sluggish. Not in a dramatic way, but still annoying. I was actually quite used to Linux behaving like that. But after applying the BFS patch, Linux joined the list of "smooth GUI" OSes (alongside OS X and MS Vista/7). That's how a desktop should feel like. Frankly, I never quite suspected the kernel to be at fault here, but rather the applications themselves. But after seeing BFS solving all those problems, it seems the kernel can be at fault for such things.</p> <p>The Android folks also confirmed that their devices ran much more fluid and responsive after they loaded a custom firmware on them with a BFS-patched kernel. Folding users claim increased folding performance which doesn't interfere with their GUI anymore. This can't be coincidence.</p> Tue, 08 Sep 2009 19:12:18 +0000 BFS vs. mainline scheduler benchmarks and measurements https://lwn.net/Articles/351489/ https://lwn.net/Articles/351489/ jzbiciak <div class="FormattedComment"> I wonder if it might be a different effect. My dual dual-core Opteron box (4 CPUs across 2 chips) dynamically scales the frequency of the CPUs based on load. <br> <p> What I don't know is the cost of doing so. That is, when it switches from 1GHz to 2.4GHZ, yes, it got faster, but was there, say, a 1ms hitch between the two? Did that hitch affect both cores on that die or just one? If there was a cache-to-cache coherence transfer at the time, did it also experience that hitch?<br> <p> These details could vary by processor platform, vendor and maybe even chipset and BIOS if the switch is effected via SMM or the like. A sloppier CPU scheduler that kept all the CPUs in the high-frequency state (or low frequency state) would eliminate these sorts of hitches, whereas one that kept the load more concentrated might experience more such hitches when the occasional background load spills onto the CPU that was left sleeping.<br> </div> Tue, 08 Sep 2009 18:13:29 +0000 pluggable schedulers vs. tunable schedulers https://lwn.net/Articles/351418/ https://lwn.net/Articles/351418/ paragw [ Gaah - Here is a better looking copy of above commment ] <br><br> <i>No reboots needed, only a single scheduler needs to be maintained, only a single scheduler needs bugfixes - and improvements to both workloads will flow into the same scheduler codebase so server improvements will indirectly improve the desktop scheduler and vice versa. Sounds like a nice idea, doesn't it?</i> <br><br> Well no, I don't think so. My line of thinking was that making one scheduler balance the arbitrary needs of multiple workloads leads to complexity and suboptimal behavior. <br><br> If we had a nice modular scheduler interface that allows us to load a scheduler at runtime or choose which scheduler to use at boot time or runtime that would solve the complexity problem and it will work well for the workloads it was designed for. As a bonus I will not have to make decisions on values of tunables - we can make the particular scheduler implementation make reasonable assumptions for the workload it was servicing. <br><br> And if you ask me I will take 5 different code modules that each do one simple thing rather than taking 1 code module that tries to achieve 5 different things at once. <br><br> After all, if we can have multiple IO schedulers why cannot we have multiple selectable CPU schedulers? Are there technical limitations or complexity issues that make us not want to go to pluggable schedulers? Tue, 08 Sep 2009 14:01:31 +0000 pluggable schedulers vs. tunable schedulers https://lwn.net/Articles/351417/ https://lwn.net/Articles/351417/ paragw <i>No reboots needed, only a single scheduler needs to be maintained, only a single scheduler needs bugfixes - and improvements to both workloads will flow into the same scheduler codebase so server improvements will indirectly improve the desktop scheduler and vice versa. Sounds like a nice idea, doesn't it? </i> Well no, I don't think so. My line of thinking was that making one scheduler balance the arbitrary needs of multiple workloads leads to complexity and suboptimal behavior. If we had a nice modular scheduler interface that allows us to load a scheduler at runtime or choose which scheduler to use at boot time or runtime that would solve the complexity problem and it will work well for the workloads it was designed for. As a bonus I will not have to make decisions on values of tunables - we can make the particular scheduler implementation make reasonable assumptions for the workload it was servicing. And if you ask me I will take 5 different code modules that each do one simple thing rather than taking 1 code module that tries to achieve 5 different things at once. After all, if we can have multiple IO schedulers why cannot we have multiple selectable CPU schedulers? Are there technical limitations or complexity issues that make us not want to go to pluggable schedulers? Tue, 08 Sep 2009 13:59:04 +0000