Raspbian is up to date and I'm using the latest firmware (rpi-update).
Scenario:
I start two cpu-greedy processes (cat /dev/zero > /dev/null). I give one of these processes a niceness of 19, the other one gets the default niceness of 0.
What I (sometimes!) observe is that both processes get the same amount of cpu:
Code: Select all
top - 21:35:41 up 1 day, 7:05, 8 users, load average: 2,40, 2,50, 2,04
Tasks: 118 total, 3 running, 109 sleeping, 6 stopped, 0 zombie
%Cpu(s): 6,4 us, 92,7 sy, 0,9 ni, 0,0 id, 0,0 wa, 0,0 hi, 0,0 si, 0,0 st
KiB Mem: 497544 total, 474864 used, 22680 free, 13848 buffers
KiB Swap: 102396 total, 108 used, 102288 free, 158676 cached
PID USER PR NI VIRT RES SHR S %CPU %MEM TIME+ COMMAND
22104 pi 39 19 3748 524 424 R 45,7 0,1 0:13.51 cat /dev/zero
22103 pi 20 0 3748 524 424 R 45,4 0,1 0:14.58 cat /dev/zero
But: both processes get around 45% cpu.
This should not happen on a single core processor!
As I can see from more complex experiments, in such a situation the niced process really gets too much cpu, it is not a failure in top.
Surprisingly, this behavior shows only sometimes. I couldn't figure out the circumstances yet. I have seen it on Raspbmc as well.
Has anyone else seen this behavior?