Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 3 May 2002 01:26:15 +0200 (CEST)
From:      Walter Hop <walter@binity.com>
To:        Patrick Thomas <root@utility.clubscholarship.com>
Cc:        freebsd-questions@freebsd.org
Subject:   Re: confusing CPU stats in `top`
Message-ID:  <20020503011942.N67241-100000@surreal.nl>
In-Reply-To: <20020502160811.P29785-100000@utility.clubscholarship.com>

next in thread | previous in thread | raw e-mail | index | archive | help
[in reply to Patrick Thomas <root@utility.clubscholarship.com>, 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 <walter@binity.com> | +31 6 24452020 | PGP keyid 0x84813998


To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-questions" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20020503011942.N67241-100000>