Date: Mon, 18 Oct 2010 15:35:55 -0500 From: Adam Vande More <amvandemore@gmail.com> To: Martin Turgeon <freebsd@optiksecurite.com> Cc: Bas Smeelen <b.smeelen@ose.nl>, freebsd-questions@freebsd.org Subject: Re: How is CPU usage calculated? Message-ID: <AANLkTimNJxGGak3HWRfDCHHvgBPe%2BaANS90pthbpBOQD@mail.gmail.com> In-Reply-To: <4CBCA8D1.5040005@optiksecurite.com> References: <20101015071719.1536f19e@mail.ose.nl> <4CBC97CB.80604@optiksecurite.com> <AANLkTimT_4D4THvszdDS=U0UKtScGgKZEN4A9e8BB2%2Bf@mail.gmail.com> <4CBCA8D1.5040005@optiksecurite.com>
next in thread | previous in thread | raw e-mail | index | archive | help
On Mon, Oct 18, 2010 at 3:06 PM, Martin Turgeon <freebsd@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. -- Adam Vande More
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?AANLkTimNJxGGak3HWRfDCHHvgBPe%2BaANS90pthbpBOQD>