From owner-freebsd-questions@FreeBSD.ORG Tue Jan 25 13:50:53 2011 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 68076106564A for ; Tue, 25 Jan 2011 13:50:53 +0000 (UTC) (envelope-from dmitri@momus.net) Received: from na3sys009aog110.obsmtp.com (na3sys009aog110.obsmtp.com [74.125.149.203]) by mx1.freebsd.org (Postfix) with SMTP id AF19C8FC08 for ; Tue, 25 Jan 2011 13:50:52 +0000 (UTC) Received: from source ([209.85.214.52]) (using TLSv1) by na3sys009aob110.postini.com ([74.125.148.12]) with SMTP ID DSNKTT7VPJ8D7uoa+P/PRF14R3LAv3Lk5lWU@postini.com; Tue, 25 Jan 2011 05:50:52 PST Received: by mail-bw0-f52.google.com with SMTP id 4so371663bwz.25 for ; Tue, 25 Jan 2011 05:50:51 -0800 (PST) Received: by 10.204.123.12 with SMTP id n12mr5028011bkr.174.1295961622619; Tue, 25 Jan 2011 05:20:22 -0800 (PST) MIME-Version: 1.0 Received: by 10.204.232.3 with HTTP; Tue, 25 Jan 2011 05:20:02 -0800 (PST) In-Reply-To: <20110125030725.GA62670@guilt.hydra> References: <20110124235740.GA62134@guilt.hydra> <1295917366.59721.2.camel@main> <20110125030725.GA62670@guilt.hydra> From: Dmitri Brengauz Date: Tue, 25 Jan 2011 06:20:02 -0700 Message-ID: To: FreeBSD Questions Content-Type: text/plain; charset=ISO-8859-1 X-Content-Filtered-By: Mailman/MimeDel 2.1.5 Subject: Re: more CPU being used than I have (?) 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: Tue, 25 Jan 2011 13:50:53 -0000 On Mon, Jan 24, 2011 at 8:07 PM, Chad Perrin wrote: > On Tue, Jan 25, 2011 at 01:02:46AM +0000, Craig Butler wrote: > > On Mon, 2011-01-24 at 16:57 -0700, Chad Perrin wrote: > > > I'm running a two-core laptop that, once in a great while, shows > > > approximately 250% CPU usage by a single process in top. How exactly > > > does that work? > > > > > > Note: It's not entirely surprising that this particular process is > > > consuming a lot of resources. It's just surprising to me that it's > > > consuming more than CPUs * 100%. > > > > Hi Chad > > > > Its to do with top using weighted CPU percentage... for some reason this > > show peaks as more usage than 100% -- maybe something to do with the top > > averaging out over a specific time. > > I find that raw CPU mode gives a more accurate representation. > > > > raw mode is toggled by passing the -C argument to top. > > Do you have a reference to a relatively simple explanation of how that > weighting works (and why)? > > -- > Chad Perrin [ original content licensed OWL: http://owl.apotheon.org ] > man 1 ps: %cpu The CPU utilization of the process; this is a decaying average over up to a minute of previous (real) time. Since the time base over which this is computed varies (since processes may be very young) it is possible for the sum of all %cpu fields to exceed 100%.