From owner-freebsd-current@FreeBSD.ORG Thu Dec 29 15:31:01 2011 Return-Path: Delivered-To: freebsd-current@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id E62A2106564A; Thu, 29 Dec 2011 15:31:01 +0000 (UTC) (envelope-from jhb@freebsd.org) Received: from cyrus.watson.org (cyrus.watson.org [65.122.17.42]) by mx1.freebsd.org (Postfix) with ESMTP id BD8698FC0C; Thu, 29 Dec 2011 15:31:01 +0000 (UTC) Received: from bigwig.baldwin.cx (bigwig.baldwin.cx [96.47.65.170]) by cyrus.watson.org (Postfix) with ESMTPSA id 764CF46B55; Thu, 29 Dec 2011 10:31:01 -0500 (EST) Received: from jhbbsd.localnet (unknown [209.249.190.124]) by bigwig.baldwin.cx (Postfix) with ESMTPSA id DFB49B914; Thu, 29 Dec 2011 10:31:00 -0500 (EST) From: John Baldwin To: freebsd-current@freebsd.org Date: Thu, 29 Dec 2011 09:47:56 -0500 User-Agent: KMail/1.13.5 (FreeBSD/8.2-CBSD-20110714-p8; KDE/4.5.5; amd64; ; ) References: <20111225214033.GA1933@freebsd.org> In-Reply-To: <20111225214033.GA1933@freebsd.org> MIME-Version: 1.0 Content-Type: Text/Plain; charset="iso-8859-15" Content-Transfer-Encoding: 7bit Message-Id: <201112290947.56982.jhb@freebsd.org> X-Greylist: Sender succeeded SMTP AUTH, not delayed by milter-greylist-4.2.7 (bigwig.baldwin.cx); Thu, 29 Dec 2011 10:31:01 -0500 (EST) Cc: Alexander Best Subject: Re: starting the annual discussion regarding top(1)'s CPU usage statistics X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 29 Dec 2011 15:31:02 -0000 On Sunday, December 25, 2011 4:40:33 pm Alexander Best wrote: > ok...so we all know that top(1) cannot compute the exact CPU usage for all > processes, since some processes get spawned and exit so fast that they don't > fall into the calculation range. i think nobody is getting angry when top(1) > is off by a few percent. > > however please take a look at the following top(1) output. this is just > ridiculous! out of 800% of CPU power, almost 600% mysteriously vanished. is > there really nothing to improve top(1)'s behaviour when the CPU is dealing with > a lot of short processes (time wise) with a hugh CPU burst? Do you have a lot of short-lived processes? (For example, a -j X build?) top(1) can't do anything about processes it doesn't see (since they are so short-lived and it only samples every N seconds), but those processes still accumulate CPU time and %CPU. -- John Baldwin