1

It seems to me that the whole nice/priority scheme doesn't actually do anything.

  PID USER      PR  NI    VIRT    RES    SHR S  %CPU %MEM     TIME+ COMMAND
10084 dick      39  19 1221848 225120   6128 S 407.6  1.4  23478:00 povrayws
 5311 dick      20   0 2904912 325728  40324 S 382.1  2.0 133:06.54 qtpovray

Given these two jobs, I would expect povrayws to sit at 0% cpu while qtpovray is busy. And this is what happens when I run this setup on Windows.

povrayws is a cpu/fpu intensive daemon job that will run for months (building an animation). If there is anything else the computer wants to do, I want this job to basically stop.

qtpovray is a sometimes cpu/fpu intensive gui job for developing the animation. If he wants to run, he should preempt the daemon and get close to 800% cpu. (If the daemon is not running, he will take 800% cpu.)

I reniced povrayws in top and ran chrt -i --pid 0 10084 to set him to idle priority. And still he is getting more cpu than the interactive job. There is no I/O going on to muck up the scheduling. It is just a couple megs of memory and as much cpu as I can throw at it.

And again, when I run this setup on Windows 8, povrayws.exe will sit near 0% when something else is going on.

I wondered if it was my i7's hyperthreading that was confusing the scheduler, but I see the same behavior on a six core i5. (On the i5, Minecraft is fighting with the idle daemon for the cpu.)

IIRC, 20 years ago, this worked as expected, but the last 5 years I'm noticing this 'broken' behavior. It's finally annoying me enough to ask,

has anyone seen idle tasks actually yield to higher priority? It's a pretty edge case to have an 800% cpu, 0% I/O idle task.

0 Answers0