worker cpu balance

Rob Mueller robm at fastmail.fm
Mon Apr 14 03:31:55 MSD 2008


> Thanks but not so much changes ;-(, any further tuning options?
>
> With mutex off 4925
> Cpu0  :  1.0%us,  2.0%sy,  0.0%ni, 74.0%id,  0.0%wa,  0.0%hi, 23.0%si, 
> 0.0%st
> Cpu1  :  3.0%us,  2.0%sy,  0.0%ni, 70.0%id,  0.0%wa,  1.0%hi, 24.0%si, 
> 0.0%st
> Mem:   2075780k total,  2053376k used,    22404k free,     4420k buffers
> Swap:  4096532k total,      192k used,  4096340k free,  1860656k cached

The problem the haproxy guy was observing was that he couldn't get more than 
100% CPU usage on a multi-cpu machine (eg with 2 CPUs, you should be able to 
get to 200%). The above data shows that the machine has over 100% idle time, 
so you're not stressing it enough to prove that the change hasn't helped.

So your tests are showing something completely different to the tests run by 
the haproxy guy. His were able to saturate the CPU, but yours clearly aren't 
saturating the CPU at all. Also your %si figure is quite high, which means 
that the CPU is servicing a lot of software interrupts. I wonder if that's 
actually the limitation here, some BKL issue because so much time is in a 
serialised part of the kernel. I'm guessing you're not using the best 
network card and driver for your tests.

Rob






More information about the nginx mailing list