Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 25 May 2009 09:57:08 +0200
From:      Ivan Voras <ivoras@freebsd.org>
To:        freebsd-questions@freebsd.org
Subject:   Re: How can this 'top' command output make sense? Load over 7 and total   CPU use ~5%
Message-ID:  <gvdj0l$nat$1@ger.gmane.org>
In-Reply-To: <4A18BEC8.5060506@rawbw.com>
References:  <4A18BEC8.5060506@rawbw.com>

next in thread | previous in thread | raw e-mail | index | archive | help
This is an OpenPGP/MIME signed message (RFC 2440 and 3156)
--------------enigC82C072E671010A42972C794
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: quoted-printable

Yuri wrote:
> Look below: load over 7 and no processes take much CPU.
>=20
> Yuri
>=20
> 7.2-PRERELEASE, 32-bit on i7-920.
>=20
> ------------------------------------------------------------
> last pid: 93192;  load averages:  7.68,  6.27,=20
> 4.61                                                                   =
           =20
> up 2+03:11:29  20:25:24
> 204 processes: 9 running, 193 sleeping, 1 stopped, 1 zombie
> CPU:  5.3% user,  0.0% nice,  0.0% system,  0.0% interrupt, 94.7% idle
> Mem: 867M Active, 1684M Inact, 279M Wired, 65M Cache, 112M Buf, 92M Fre=
e
> Swap: 16G Total, 142M Used, 16G Free

Couple of possible reasons:

1) You have many short lived processes that are spawned, do some work
and die (some kind of web server?). You can't see them because they live
too shortly. See if the "last pid" is rapidly increasing. Also, hit "H"
to display individual threads.
2) You have kernel processes that are doing some intermittent work. Hit
"S" to see them.

In any case, see the line where it says "9 running" processes? This is
where the load average comes from. The CPU utilization is not directly
related to the load average.

Load average is not scaled to NCPU - a count of "7" (or in your case,
aymptotically 9) means there are 7 (or 9) processes wanting to run.

The "global" CPU utilization (the "CPU:" line) *is* scaled to NCPU -
100% here means all CPUs are busy all the time.

Individual processes' CPU utilization *isn't* scaled to NCPU. A process
taking 100% CPU on its own means it only requires / runs on 1 CPU. A
multithreading process can have, for example, 400% CPU utilization and
the global CPU utilization can be <=3D 100%.



--------------enigC82C072E671010A42972C794
Content-Type: application/pgp-signature; name="signature.asc"
Content-Description: OpenPGP digital signature
Content-Disposition: attachment; filename="signature.asc"

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.9 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iEYEARECAAYFAkoaT1oACgkQldnAQVacBcgs6gCgr8MBCGADFuGnDPMtQv8zq4ex
nxcAn3cMNIdDzZNpA9KlB47PeAxwVjWS
=2ECw
-----END PGP SIGNATURE-----

--------------enigC82C072E671010A42972C794--




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?gvdj0l$nat$1>