Howdy, Web server under heavy'ish load (7 on a 2 cpu system) running 8.2-RELEASE-p4 i386 I'm seeing this: PID USERNAME PRI NICE SIZE RES STATE C TIME WCPU COMMAND 12 root -32 - 0K 112K WAIT 0 129:01 39.99% {swi4: clock} Any ideas why the clock should be taking so much cpu? HZ=100 if that makes a difference ... Doug -- [^L] Breadth of IT experience, and depth of knowledge in the DNS. Yours for the right price. :) http://SupersetSolutions.com/
On Thu, Dec 15, 2011 at 12:51:28PM -0800, Doug Barton wrote:> Howdy, > > Web server under heavy'ish load (7 on a 2 cpu system) running > 8.2-RELEASE-p4 i386 I'm seeing this: > > PID USERNAME PRI NICE SIZE RES STATE C TIME WCPU COMMAND > 12 root -32 - 0K 112K WAIT 0 129:01 39.99% {swi4: clock} > > Any ideas why the clock should be taking so much cpu? HZ=100 if that > makes a difference ...Could be wrong, but I believe this correlates with IRQ 4. What does vmstat -i show for a total and rate for irq4 if you run it, wait a few seconds, then run it again? Does the number greatly/rapidly increase? Shot in the dark here, but the only thing I can think of that might cause this is software being extremely aggressive with calls to things like gettimeofday(2) or clock_gettime(2). Really not sure. ntpd maybe (unlikely but possible)? Sort of grasping at straws here. -- | Jeremy Chadwick jdc at parodius.com | | Parodius Networking http://www.parodius.com/ | | UNIX Systems Administrator Mountain View, CA, US | | Making life hard for others since 1977. PGP 4BD6C0CB |
On Thu, Dec 15, 2011 at 12:51:28PM -0800, Doug Barton wrote:> Howdy, > > Web server under heavy'ish load (7 on a 2 cpu system) running > 8.2-RELEASE-p4 i386 I'm seeing this: > > PID USERNAME PRI NICE SIZE RES STATE C TIME WCPU COMMAND > 12 root -32 - 0K 112K WAIT 0 129:01 39.99% {swi4: clock} > > Any ideas why the clock should be taking so much cpu? HZ=100 if that > makes a difference ... > >Without NTPd running test the following. apply "/usr/bin/time -ph sleep %1" 300 600 900 If the results are skewed quite a bit then your system may benefit from a different HZ than what you have set. I have seen systems that require a HZ of 350 and as weird as it sounds NTPd may be tasting the clock too much just to try and keep time. -- ;s =;