From owner-freebsd-hackers@FreeBSD.ORG Thu Sep 14 17:39:14 2006 Return-Path: X-Original-To: freebsd-hackers@freebsd.org Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 93E9116A47B for ; Thu, 14 Sep 2006 17:39:14 +0000 (UTC) (envelope-from mwm-keyword-freebsdhackers2.e313df@mired.org) Received: from mired.org (vpn.mired.org [66.92.153.74]) by mx1.FreeBSD.org (Postfix) with SMTP id 86CD343D64 for ; Thu, 14 Sep 2006 17:39:13 +0000 (GMT) (envelope-from mwm-keyword-freebsdhackers2.e313df@mired.org) Received: (qmail 43243 invoked by uid 1001); 14 Sep 2006 17:39:18 -0000 Received: by bhuda.mired.org (tmda-sendmail, from uid 1001); Thu, 14 Sep 2006 13:39:18 -0400 (EDT) MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Message-ID: <17673.37830.1883.272019@bhuda.mired.org> Date: Thu, 14 Sep 2006 13:39:18 -0400 To: Gary Corcoran In-Reply-To: <45099123.4000500@rcn.com> References: <863bauk3gp.fsf@dwp.des.no> <45099123.4000500@rcn.com> X-Mailer: VM 7.17 under 21.4 (patch 19) "Constant Variable" XEmacs Lucid X-Primary-Address: mwm@mired.org X-face: "5Mnwy%?j>IIV\)A=):rjWL~NB2aH[}Yq8Z=u~vJ`"(,&SiLvbbz2W`; h9L,Yg`+vb1>RG% *h+%X^n0EZd>TM8_IB;a8F?(Fb"lw'IgCoyM.[Lg#r\ X-Delivery-Agent: TMDA/1.0.3 (Seattle Slew) From: Mike Meyer Cc: =?ISO-8859-1?Q?Dag-Erling_Sm=F8rgrav?= , freebsd-hackers@freebsd.org Subject: Re: numbers don't lie ... X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 14 Sep 2006 17:39:14 -0000 In <45099123.4000500@rcn.com>, Gary Corcoran typed: > The confusing thing is that I thought 'real' time should be >= 'user' + 'sys'. > But here 'user' is much greater than 'real' for both machines! The sense I > got from the other messages in this thread is that 'user' time is somewhat > meaningless (i.e. unreliable as a measure) in a multi-CPU and/or hyperthreading > environment. Can you clarify? 'real' is wall clock time. 'user' and 'sys' are cpu time. If your process gets all of some cpu, then user + sys will be the same as real time. It's not possible to get more than all of a cpu, so that's a maximum *per cpu*. If you have multiple cpus, the formula you want is 'real' * ncpu >= 'user' + 'sys'. I made the comment about freebsd's measure of user time being skewed by hyperthreading. That's a bit vague. The problem is that waiting caused by hyperthreading will count against the instruction that's doing the waiting, which skews them. But as Kris pointed out, there are other things that have that property, so this is just one more complication when it comes to figuring the performance of modern CPUs. http://www.mired.org/consulting.html Independent Network/Unix/Perforce consultant, email for more information.