How is CPU usage calculated?
Martin Turgeon
freebsd at optiksecurite.com
Tue Oct 19 15:38:45 UTC 2010
Le 2010-10-18 16:35, Adam Vande More a écrit :
> On Mon, Oct 18, 2010 at 3:06 PM, Martin Turgeon
> <freebsd at optiksecurite.com>wrote:
>
>> I just reread it and it isn't clearer what is using the CPU so much. Can
>> you please give me a little more explanation?
>>
> A line in top(1) like:
>
> CPU: 0.0% user, 0.0% nice, 0.4% system, 0.4% interrupt, 99.3% idle
>
> does not describe how much CPU is being used, but rather a "percentage of
> time spent in each of the processor states". It's saying of the CPU cycles
> that are being used, this is what it breaks down as. Since MySQL is a
> userland application, you'd expect the value of user to be quite high if
> that was only thing running on your system and it was under high load.
>
> You can infer how much CPU is being used from the line, but there are better
> and more accurate methods generally of getting that information especially
> with SMP systems.
>
Thank you for the explanation. Would you be kind enough to point me to a
method so I can know for sure that it's MySQL that is taking that much CPU ?
More information about the freebsd-questions
mailing list