understanding CPU stats

Darrin Chandler dwchandler at stilyagin.com
Fri Aug 31 11:46:58 MST 2007


On Fri, Aug 31, 2007 at 01:23:08PM -0500, alex at crackpot.org wrote:
> I'm trying to better understand the output of vmstat, specifically the  
> difference between 'user' and 'system' cpu usage.  I have guessed that  
> 'user' is all user programs, and 'system' is the kernel.  Is that right?

"System" is kernel. That can mean stuff that the kernel does on it's
own, but it also includes when programs you run make calls that end up
in kernel code.

"User" is "userland." Not just programs like Firefox, et al, but also
many other things like daemons ("services") run in userland.

> I've just upgraded PHP versions, and I'm seeing much higher system cpu  
> usage than prior to the upgrade.  Not sure what to attribute that to,  
> or where I ought to look for optimization options.
> 
> Memory usage looks about the same before and after.

If the only thing you've done is upgrade PHP then...

There are ways to find out what php is doing (*trace stuff), but it's
something someone else should help you with, as I'm not that familiar.

-- 
Darrin Chandler            |  Phoenix BSD User Group  |  MetaBUG
dwchandler at stilyagin.com   |  http://phxbug.org/      |  http://metabug.org/
http://www.stilyagin.com/  |  Daemons in the Desert   |  Global BUG Federation


More information about the PLUG-discuss mailing list