From owner-freebsd-stable@FreeBSD.ORG Thu Aug 17 19:35:27 2006 Return-Path: X-Original-To: freebsd-stable@freebsd.org Delivered-To: freebsd-stable@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 895B616A4DD for ; Thu, 17 Aug 2006 19:35:27 +0000 (UTC) (envelope-from b.j.casavant@ieee.org) Received: from yeppers.tdkt.org (skyline.tdkt.org [209.98.211.67]) by mx1.FreeBSD.org (Postfix) with ESMTP id B022A43D5A for ; Thu, 17 Aug 2006 19:35:26 +0000 (GMT) (envelope-from b.j.casavant@ieee.org) Received: from pkunk.americas.sgi.com (cfcafwp.sgi.com [192.48.179.6]) (authenticated bits=0) by yeppers.tdkt.org (8.12.11/8.12.11/erikj-OpenBSD) with ESMTP id k7HJZLdQ020842; Thu, 17 Aug 2006 14:35:22 -0500 (CDT) Date: Thu, 17 Aug 2006 14:35:15 -0500 (CDT) From: Brent Casavant X-X-Sender: bcasavan@pkunk.americas.sgi.com To: Dan Nelson In-Reply-To: <20060817192601.GB30450@dan.emsphone.com> Message-ID: <20060817142858.F20436@pkunk.americas.sgi.com> References: <44E1F796.5070105@rogers.com> <20060815172728.GB88051@dan.emsphone.com> <44E204C0.60806@rogers.com> <44E3FE61.6060800@lefebvre.org> <5C8C1B11-DE0B-4FE2-9A3D-5472650B9FA8@mac.com> <20060817120221.D20436@pkunk.americas.sgi.com> <20060817192601.GB30450@dan.emsphone.com> Organization: Angeltread Software Organization MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Cc: Bill LeFebvre , freebsd-stable@freebsd.org Subject: Re: TOP shows above 100% WCPU usage X-BeenThere: freebsd-stable@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: Brent Casavant List-Id: Production branch of FreeBSD source code List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 17 Aug 2006 19:35:27 -0000 On Thu, 17 Aug 2006, Dan Nelson wrote: > In the last episode (Aug 17), Brent Casavant said: > > Note that IRIX's top does not bias for availabile CPUs -- I've seen > > well-threaded programs using in excess of 2400% CPU. > > > > What it comes down to is that depending on the nature of the > > information you're trying to glean from WCPU, you may want either > > view of the data. Some versions of top on Linux allow you to switch > > between IRIX and Solaris views. From the help screen for top from > > procps 3.2.6 on Linux: > > > > 1,I Toggle SMP view: '1' single/separate states; 'I' Irix/Solaris mode > > > > There's really not a clear cut right and wrong here, particularly if > > your version of top is able to display per-thread instead of > > per-process data. Sometimes you want to break out individual threads > > and see their level of CPU utilization (the IRIX view is most > > useful), sometimes you want to get a handle on which processes are > > loading down a machine (the Solaris view is most useful). > > Is this similar to FreeBSD top's 'H' option? Partially. The FreeBSD 'H' option appears to be the same as Linux procps top's '1' option and IRIX's 'T' option. That is, it displays individual threads. The original issue was as to whether a process/thread's CPU time should be scaled by the total number of CPUs. In the Solaris view this is done, so in theory if you add up the CPU times you should get a total of 100%. In the IRIX view this is not done, so if you add up the CPU times you should get (# of processors) * 100%. My main point was that both views are useful under different circumstances. A sysadmin may be trying to track down an application that's hogging the system, in which case the Solaris view is more useful. A developer might be trying to determine how well their application is utiizing available CPU time, in which case the IRIX view is more useful. Either way you can get the same information, it's just more amenable to a particular objective each way. Brent -- Brent Casavant Dance like everybody should be watching. www.angeltread.org KD5EMB, EN34lv