Skip to contentSkip to conversation

Best nice level for X with SD

ck Con Kolivas 2 participants 3 messages Apr 26, 2007 – Apr 29, 2007 3 messages not in the archive

lore
Share & tools
lore

A message that is not in the archive (sent off-list or not yet received): [email protected]

A message that is not in the archive (sent off-list or not yet received): [email protected]

A message that is not in the archive (sent off-list or not yet received): [email protected]

#3 lore raw
Quoted 82 lines · Martin Steigerwald

Am Dienstag 24 April 2007 schrieb Martin Steigerwald:

Quoted 23 lines

Hello once again,

I now tested cfs-v5 on my ThinkPad T23 with

martin@deepdance:~> cat /proc/version
Linux version 2.6.20.7-tp23-sws2-2.2.9.9-sd-0.46 (martin@deepdance) (gcc-Version 4.1.2 20061115 (prerelease) (Debian 4.1.1-21)) #1 PREEMPT Sun Apr 22 21:40:30 CEST 2007

I had the KDE desktop + Amarok running and nothing else. But music playbacks stopped for about a second every now and then. Quite annoyingly often. I think thats quite similar to the mouse pointer freezes I had on the T42. I did not look whether the mousepointer really froze, but I can check that again.

I then did the same naive user test than I did with sd-0.44 and sd-0.46, starting building debian kernel-source package, opening lots of applications - mostly KDE ones, anything I could find on my toolbar from Konsole, KWrite to Konqueror, Iceweasel ... - and then moved around Amaroks window. Well I managed to completely stop music playback for more than 5 seconds. Music playback completely paused. This again was with nice -10 configured in CFSv5 source.

Quoted 4 lines

I repeated the test with X.org reniced to 0. It got better but I still managed to pause music playback for a second or so. But maybe that was one of that music stops that also happen when the machine is idling around. They also happen with X.org reniced to 0.

Hi!

Okay, this got way better with cfs-v6. I tested my way through this with different cfs versions and settings as guided by Ingo. We did this via private mail as Ingo didn't want to (ab)use the ck-patch mailinglist for this. But now after having ranted publically about cfs, I at least also write publically that things have gotten better ;-).

After having a drastic sound playback regression cfs-v6-rc7 which I could not reproduce today, I have way better results with cfs-v6 than with cfs-v5. This is with 2.6.20.7, sws2 2.2.9.9 and cfs-v6.

But still there were some pauses in music playback with default setting.

For smooth music playback with Amarok on my T23 I had to go as low as:

---------------------------------------------------------------------
deepdance:/proc/sys/kernel> grep ".*" sched*gran* sched_granularity_ns:2000000 sched_wakeup_granularity_ns:0 deepdance:/proc/sys/kernel> echo "1500000" >sched_granularity_ns deepdance:/proc/sys/kernel> grep ".*" sched*gran* sched_granularity_ns:1500000 sched_wakeup_granularity_ns:0 deepdance:/proc/sys/kernel> echo "1000000" >sched_granularity_ns deepdance:/proc/sys/kernel> grep ".*" sched*gran* sched_granularity_ns:1000000 sched_wakeup_granularity_ns:0 deepdance:/proc/sys/kernel> echo "500000" >sched_granularity_ns deepdance:/proc/sys/kernel> grep ".*" sched*gran* sched_granularity_ns:500000 sched_wakeup_granularity_ns:0 deepdance:/proc/sys/kernel> echo "250000" >sched_granularity_ns deepdance:/proc/sys/kernel> grep ".*" sched*gran* sched_granularity_ns:250000 sched_wakeup_granularity_ns:0
---------------------------------------------------------------------

Then music playback was working nicely when I did not interfere ;-)

Even then I was able to stop audio playback for longer than a second by my naive user test... compiling a kernel, opening lots of apps and moving the Amarok window around like mad.

With

---------------------------------------------------------------------
deepdance:/proc/sys/kernel> echo "0" >sched_granularity_ns deepdance:/proc/sys/kernel> grep ".*" sched*gran* sched_granularity_ns:0 sched_wakeup_granularity_ns:0
---------------------------------------------------------------------

Quoted 4 lines

it was working nice. Subjectively on par with sd-0.46.

buddabrod can you test these suggestions? I am using cfs-v6 with X11 renicing.

Clearly there are some serious regressions for audio playback with CFS. This is incredible effort to go to with CFS.

Quoted 4 lines

Still sd-0.46 is giving me as default what I have to configure with cfs-v6 ;-). And as a user I want this behavior as default, instead of having to fiddle with the schedular settings. Smooth music playback is a must as Ingo agreed already ;).

Nice to hear that SD does everything CFS strives to achieve. I'm glad I continued development on it so that it remains the reference for CFS to compare to.

Quoted 3 lines

No need to continue that thread here from my side... I just wanted to mention that it got better. Its still Cons ck-patch list. A general scheduler hacking and testing list would come in handy I guess.

lkml is perfectly suited for that discussion provided everyone follows the convention of cc'ing everyone on their replies, and I have taken the liberty of cc'ing it on this thread too.

Signature · 1 line
-ck
#4 lore raw
In reply to a message not in the archive

Am Freitag 27 April 2007 schrieb Con Kolivas:

Quoted 2 lines

Clearly there are some serious regressions for audio playback with CFS. This is incredible effort to go to with CFS.

Hi Con!

Well, at least on my two ThinkPads T42 and T23.

I perceive sd-0.46 as more mature as CFSv6. And if asked to include one of them in the kernel *right now* or *soonish*, I would probably choose sd-0.46 and give Ingo a bit more time.

Or I would suggest a plugging interface. For me it seems difficult to make large scale testing efforts when I have to build two kernels all the time. So at least a boot time configuration parameter, even better a parameter to switch schedulers on the fly would be good. This way it would be way easier to compare different schedulers.

Just like with I/O schedulers. I switched from "anticipatory" to Ingo's great "cfq" before it became the new default. I think that a few weeks of testing will never be enough. How long did it take till cfq became the new default? How much testing did people, including distributors such as SUSE / Novell - who switched to cfq eariler - do? Would that torough testing have been done when it was a patch outside of mainline all the time and there was no easy possibility to switch I/O schedulers?

I think that on process schedulers this would not be any different and any quick prefer this or this one will miss needed long time test results. But I have no clue whether plugsched, especially with online switching, wouldn't be too much overhead.

Well just my subjective opinion. I didn't do any professional benchmarks. But actually what I care about most is my usually workloads and whether I can click together corner cases to bring schedulers out of the bounds I like them to operate it. Cause thats what relevant for me when using a Linux machine as a desktop ;-). I didn't do any testing on a server tough, my virtual server just uses bog standard Debian etch kernel and I see no need to change that.

Quoted 8 lines
Quoted 4 lines

Still sd-0.46 is giving me as default what I have to configure with cfs-v6 ;-). And as a user I want this behavior as default, instead of having to fiddle with the schedular settings. Smooth music playback is a must as Ingo agreed already ;).

Nice to hear that SD does everything CFS strives to achieve. I'm glad I continued development on it so that it remains the reference for CFS to compare to.

I am happy, too. And Ingo is working really hard on it. I already have the next patch to test here. And it becomes better.

Quoted 3 lines

lkml is perfectly suited for that discussion provided everyone follows the convention of cc'ing everyone on their replies, and I have taken the liberty of cc'ing it on this thread too.

Okay, I am CCing this to kernel list, too!

But my original concern was, whether you want to have these CFSv6 related tests on ck-patch-ml at all? Strictly spoken its about ck-patches and your stuff, and not other schedulers, but well, no one adhered that much to its topic in the last weeks.

Ok, but now to my daily tasks. These still (should) have priority ;-).

Regards,
Martin

Am Donnerstag 26 April 2007 schrieb Martin Steigerwald:

Quoted 1 line

it was working nice. Subjectively on par with sd-0.46.

Hi!

Well, there are still some audio glitches here and then. Even with

deepdance:/proc/sys/kernel> grep ".*" sched*gran*
sched_granularity_ns:0
sched_wakeup_granularity_ns:0

cfs-v6 has quite high context switch rates when driven with this configuration. This is context switch rates while Kaffeine plays music and a kernel compiles:

procs -----------memory---------- ---swap-- -----io---- -system-- ----cpu----
r b swpd free buff cache si so bi bo in cs us sy id
wa
3 0 136 22864 276 484680 0 0 149 102 379 1102 77 7 13
3
2 0 136 22864 276 484680 0 0 0 11 357 1849 99 1 0
0
1 0 136 22744 276 484808 0 0 128 0 413 2653 97 3 0
0
2 0 136 22744 276 484812 0 0 0 0 374 2382 96 4 0
0
1 0 136 22564 276 484940 0 0 128 0 411 2819 94 6 0
0
1 0 136 22564 276 484940 0 0 0 0 370 1938 98 2 0
0
1 0 136 22444 276 485068 0 0 128 0 374 2235 98 2 0
0
2 0 136 22444 276 485072 0 0 0 0 393 2329 97 3 0
0
1 0 136 22324 276 485200 0 0 128 0 351 1561 100 0
0 0
1 0 136 22324 276 485200 0 0 0 0 376 1790 99 1 0
0

Maybe on desktop a schedular needs such high rates to provide excellent desktop responsiveness?

Ingo, I send you strace and vmstat stuff in a seperate mail. Ok, enough of it, we can continue this in private mail and I test your new cfs-v7-rc ,)

Back to my original question:

What nice value would do you recommend for X in sd-0.46? Really -10? I didn't renice at all... well what have others tried? Hmmm, Mike Mattie used -1. Maybe I should try -5 or so? Well maybe I just try some values. I just would like to hear whether there an official recommendation? Like the -10 that cfs-v6 sets as default if X renicing is enabled.

And would it make sense to renice kernel threads as well with sd-0.46? I have seen these reniced to -10, but maybe thats default?

Regards,

Signature · 2 lines
Martin 'Helios' Steigerwald - http://www.Lichtvoll.de
GPG: 03B0 0D6C 0040 0710 4AFA  B82F 991B EAAC A599 84C7
#5 lore raw

Am Freitag 27 April 2007 schrieb Martin Steigerwald:

Quoted 11 lines

Am Freitag 27 April 2007 schrieb Con Kolivas:

Quoted 2 lines

Clearly there are some serious regressions for audio playback with CFS. This is incredible effort to go to with CFS.

Hi Con!

Well, at least on my two ThinkPads T42 and T23.

I perceive sd-0.46 as more mature as CFSv6. And if asked to include one of them in the kernel *right now* or *soonish*, I would probably choose sd-0.46 and give Ingo a bit more time.

Hi!

I tried cfs-v7 where Ingo fixed a 'big bug' he found while looking at the debug data I provided to him.

Well, its rocking now on both my Amarok machine, the T23, and the T42. Absolutely smooth music playback, no matter what. No freezes anymore whatsoever.

Even when stress testing with my usual naive user tests, having make-kpkg linux_image running, starting tons of apps and solid moving Amarok window like mad - that was on my T23. On my T42 I repeated that Kaffeine test, playing a video with it, while moving the window like mad, no complete freezes anymore...

Congrats, Ingo! cfs-v7 is rocking now ;-).

Tested on 2.6.21.1 with sws2 2.2.9.13, dynticks and CONFIG_HZ=300 as the older kernels I tested with.

That is without X renicing just like I run sd-0.46 as well.

Now it seems that I have *two* schedulers to choose from. ;-) I am satisfied with both sd-0.46 and cfs-v7 now.

Actually cfs-v7 feels a bit smoother for me now. Thats nothing concrete at the moment, nothing I can get a hold of it. cfs-v7 just feels a bit smoother to me.

Will do some longer term testing with cfs-v7 now.

Regards,

Signature · 2 lines
Martin 'Helios' Steigerwald - http://www.Lichtvoll.de
GPG: 03B0 0D6C 0040 0710 4AFA  B82F 991B EAAC A599 84C7