From owner-freebsd-questions Thu May 2 16:26:20 2002 Delivered-To: freebsd-questions@freebsd.org Received: from surreal.nl (surreal.nl [212.204.236.10]) by hub.freebsd.org (Postfix) with ESMTP id 6AE2237B404 for ; Thu, 2 May 2002 16:26:16 -0700 (PDT) Received: from vscan (localhost [127.0.0.1]) by surreal.nl (Postfix) with ESMTP id 3F2DA445; Fri, 3 May 2002 01:26:16 +0200 (CEST) Received: by surreal.nl (Postfix, from userid 1000) id 7983743F; Fri, 3 May 2002 01:26:15 +0200 (CEST) Received: from localhost (localhost [127.0.0.1]) by surreal.nl (Postfix) with ESMTP id 769483BA; Fri, 3 May 2002 01:26:15 +0200 (CEST) Date: Fri, 3 May 2002 01:26:15 +0200 (CEST) From: Walter Hop To: Patrick Thomas Cc: freebsd-questions@freebsd.org Subject: Re: confusing CPU stats in `top` In-Reply-To: <20020502160811.P29785-100000@utility.clubscholarship.com> Message-ID: <20020503011942.N67241-100000@surreal.nl> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII X-Virus-Scanned: by surreal.binity.net (amavis-perl-11-sky2) for freebsd-questions@freebsd.org root@utility.clubscholarship.com Sender: owner-freebsd-questions@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG [in reply to Patrick Thomas , 02/05/02] > As you can see, the server reports 69.7% idle > > BUT, that would imply processes using up a total of (30.3 x 4) `top` > reported percent ... which is not the case - if you add up the > percentages in the `top` reported processes, they add up to ~58 or so, > and if we divide that by four we would expect to see 85% idle or so, > instead of 69.7% idle. The FreeBSD 4.x kernel has an inefficiency in SMP systems: while one processor is running in the kernel, the other processors cannot due to resource locking, so they have to wait. This causes the system to be less idle than an ideal system. (FreeBSD 5 is expected to solve a lot of these issues, but also with that kernel you will see that you can't just multiply CPU power by the number of processors, there's always some overhead involved.) Also the numbers in "top" are just rough measures.. -- Walter Hop | +31 6 24452020 | PGP keyid 0x84813998 To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-questions" in the body of the message