From owner-freebsd-stable@FreeBSD.ORG Thu Aug 17 16:48:45 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 4C7C716A4DF for ; Thu, 17 Aug 2006 16:48:45 +0000 (UTC) (envelope-from cswiger@mac.com) Received: from smtpout.mac.com (smtpout.mac.com [17.250.248.171]) by mx1.FreeBSD.org (Postfix) with ESMTP id 0654D43D5D for ; Thu, 17 Aug 2006 16:48:43 +0000 (GMT) (envelope-from cswiger@mac.com) Received: from mac.com (smtpin03-en2 [10.13.10.148]) by smtpout.mac.com (Xserve/8.12.11/smtpout01/MantshX 4.0) with ESMTP id k7HGmhrU016145; Thu, 17 Aug 2006 09:48:43 -0700 (PDT) Received: from [17.214.14.142] (a17-214-14-142.apple.com [17.214.14.142]) (authenticated bits=0) by mac.com (Xserve/smtpin03/MantshX 4.0) with ESMTP id k7HGmetm019039; Thu, 17 Aug 2006 09:48:42 -0700 (PDT) In-Reply-To: <44E3FE61.6060800@lefebvre.org> References: <44E1F796.5070105@rogers.com> <20060815172728.GB88051@dan.emsphone.com> <44E204C0.60806@rogers.com> <44E3FE61.6060800@lefebvre.org> Mime-Version: 1.0 (Apple Message framework v752.2) Content-Type: text/plain; charset=US-ASCII; delsp=yes; format=flowed Message-Id: <5C8C1B11-DE0B-4FE2-9A3D-5472650B9FA8@mac.com> Content-Transfer-Encoding: 7bit From: Chuck Swiger Date: Thu, 17 Aug 2006 09:48:39 -0700 To: Bill LeFebvre X-Mailer: Apple Mail (2.752.2) X-Brightmail-Tracker: AAAAAQAAA+k= X-Language-Identified: TRUE Cc: 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 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 16:48:45 -0000 On Aug 16, 2006, at 10:28 PM, Bill LeFebvre wrote: >>> You have multiple CPUs, so a threaded process can theoretically >>> reach >>> 100*ncpus cpu usage. >>> >> Ahh, thats makes sense, thanks. > > Actually it doesn't. IMO, %CPU should be biased for all available > cpu, not just a single cpu. In other words, a single-threaded > process running on a two processor box should never see more than > 50% cpu. That's how top computes it for SunOS. But for freebsd > top only displays whats in the proc structure and I don't know off- > hand how the kernel records it. You've got a good point here. In particular, consider the case where you have an SMP machine where not all of the CPUs are running at the same clock rate...100% of one CPU is not the same level of processing as 100% of another. -- -Chuck