From owner-freebsd-questions@FreeBSD.ORG Mon Oct 18 20:35:57 2010 Return-Path: Delivered-To: freebsd-questions@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 2FEB7106564A for ; Mon, 18 Oct 2010 20:35:57 +0000 (UTC) (envelope-from amvandemore@gmail.com) Received: from mail-gy0-f182.google.com (mail-gy0-f182.google.com [209.85.160.182]) by mx1.freebsd.org (Postfix) with ESMTP id DA3DD8FC17 for ; Mon, 18 Oct 2010 20:35:56 +0000 (UTC) Received: by gyf3 with SMTP id 3so773207gyf.13 for ; Mon, 18 Oct 2010 13:35:56 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:received:in-reply-to :references:date:message-id:subject:from:to:cc:content-type; bh=9XH6u3cfcBjC+RfhBfR2vUvQUdbA8MtoRMoBdOJma3U=; b=QlARrjUVx70tAu7l1Kl754JvBzrx4OB5kf7HKu4ABpKzmOKU4xpNC6zUZfPXJyaOpE 5aIENqcNrSV25lbMoweKiWbV2NxUB1b2WEUhORhgJAoXAJh7ujoUtSWjwo51xHwFIXZ3 UAuhb1r6DCQtdaEyv7nOnlOT0o3pVLBkVZ+io= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type; b=qhbrbk7zCMRoRGt7zEqPUK6G8YzbUS+r1M3qo+xKBzcpWfzu1ZT/odXv7gv+kyD3ot g6ftLaH2LDKTME6PyYul4hGyWqMtEHXb+IvTqQtDUwCYVkc5iN5Hm1hpInVhjHdwr6pj WcKZVQ1uRSsczP7B/Y+n31V9Ri3ccVx2tibyA= MIME-Version: 1.0 Received: by 10.103.225.3 with SMTP id c3mr2868089mur.82.1287434155213; Mon, 18 Oct 2010 13:35:55 -0700 (PDT) Received: by 10.223.104.200 with HTTP; Mon, 18 Oct 2010 13:35:55 -0700 (PDT) In-Reply-To: <4CBCA8D1.5040005@optiksecurite.com> References: <20101015071719.1536f19e@mail.ose.nl> <4CBC97CB.80604@optiksecurite.com> <4CBCA8D1.5040005@optiksecurite.com> Date: Mon, 18 Oct 2010 15:35:55 -0500 Message-ID: From: Adam Vande More To: Martin Turgeon Content-Type: text/plain; charset=ISO-8859-1 X-Content-Filtered-By: Mailman/MimeDel 2.1.5 Cc: Bas Smeelen , freebsd-questions@freebsd.org Subject: Re: How is CPU usage calculated? X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 18 Oct 2010 20:35:57 -0000 On Mon, Oct 18, 2010 at 3:06 PM, Martin Turgeon 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