BFS vs. mainline scheduler benchmarks and measurements
BFS vs. mainline scheduler benchmarks and measurements
Posted Sep 8, 2009 6:10 UTC (Tue) by mingo (subscriber, #31122)In reply to: BFS vs. mainline scheduler benchmarks and measurements by realnc
Parent article: BFS vs. mainline scheduler benchmarks and measurements
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.e. the default behavior is that if both compiz and mplayer are running (and both are a single thread) then they should get 50%/50% of a single CPU - or be nicely on separate CPUs on dual-core. (with an added twist that Xorg generally tends to get some amount of CPU time as well when compiz is active - plus whatever other app that is generating X output.)
If that's not enough then come nice levels into play.
You can indeed renice up - but you can also renice down - so you can set mplayer to nice -5 for example.
Nice levels work according to a very simple rule: if you set mplayer to nice -1, it will get 55% of CPU time, compiz gets 45% of time. Yet another nice level and it's 60% versus 40%. It goes roughly 20% up with every nice level - so nice -5 should get you 75%/25%, nice -10 gives you 90% CPU time and 10% CPU time for compiz.
More tasks can modify this behavior - but this is the general principle. If this does not work like that for you, please report it as a scheduler bug on lkml.
Note, you can set negative nice levels as an ordinary user as well, There's an rlimit for it (and PAM support): see the 'nice' attribute in /etc/security/limits.conf - you can set it per user.
