Date: Thu, 10 Aug 2006 00:45:57 -0400 From: "Tamouh H." <hakmi@rogers.com> To: "'Ian Smith'" <smithi@nimnet.asn.au>, <questions@freebsd.org> Subject: RE: Top not showing cpu usage even remotely accurately Message-ID: <20060810044557.2E0E843D46@mx1.FreeBSD.org> In-Reply-To: <Pine.BSF.3.96.1060810135055.16843A-100000@gaia.nimnet.asn.au>
next in thread | previous in thread | raw e-mail | index | archive | help
> But since running 5.x (5.5-STABLE since 1st Aug) top can show=20
> 0.0% idle but the cpu usages shown don't add up to much of a=20
> fraction of 100%.
>=20
> For a typical illustration: 'make index' has been running for=20
> hours, and here's a shot of 'nice top', o)rdered by cpu,=20
> showing S)ystem procs:=20
>=20
> last pid: 62397; load averages: 2.06, 2.09, 2.13 up=20
> 3+03:57:39 13:11:27
> 154 processes: 6 running, 125 sleeping, 23 waiting CPU=20
> states: 77.3% user, 0.0% nice, 22.7% system, 0.0%=20
> interrupt, 0.0% idle
> Mem: 79M Active, 24M Inact, 37M Wired, 5640K Cache, 25M Buf,=20
> 3388K Free
> Swap: 384M Total, 133M Used, 251M Free, 34% Inuse
>=20
> PID USERNAME PRI NICE SIZE RES STATE TIME WCPU =20
> CPU COMMAND
> 62380 root 122 0 788K 648K RUN 0:01 19.48% 1.86% make
> 736 smithi 97 0 27000K 3184K select 89:56 1.07% =20
> 1.07% kdeinit
> 762 smithi 96 0 29708K 7428K select 14:01 0.93% =20
> 0.93% kdeinit
> 699 smithi 96 0 52320K 10288K select 105:02 0.88% 0.88% Xorg
> 62394 root 125 0 580K 440K RUN 0:00 7.00% 0.34% make
> 754 smithi 96 0 30972K 6308K select 57:22 0.15% =20
> 0.15% kdeinit
> 770 smithi 8 0 2524K 660K nanslp 20:51 0.05% =20
> 0.05% ascpu
> 'ps auxww' cpu percentages reveal little more, except that=20
> make index is running 'make -j2 ..' hence the ~2.0 load average.
>=20
> Ignore the high swap use; most of it is numerous quiescent=20
> kwrite, httpd and mozilla sessions pushed out to swap on this=20
> lil' 160MB laptop; 'systat -vm' shows it's not actually doing=20
> any paging during this time.
>=20
> Any ideas why top hasn't much of a clue about what's consuming cpu?=20
>=20
> Cheers, Ian
I've the same issue with FBSD 5.4 and TOP. In fact, the load averages =
are so irrelevant now that I barely pay attention to them. The server =
goes to 4 or 6 load averages without slowing down, and other times the =
load average would be 0.8 and the server is running slow.
An example of unmatching TOP:
last pid: 17889; load averages: 0.60, 0.52, 0.50 =
up 3+17:22:33 00:41:45
186 processes: 2 running, 183 sleeping, 1 lock
CPU states: 30.0% user, 0.0% nice, 1.7% system, 0.1% interrupt, 68.3% =
idle
Mem: 1678M Active, 1110M Inact, 287M Wired, 87M Cache, 112M Buf, 103M =
Free
Swap: 8762M Total, 1584K Used, 8760M Free
PID USERNAME PRI NICE SIZE RES STATE C TIME WCPU CPU =
COMMAND
5071 nobody 101 0 43124K 35180K CPU2 2 0:07 14.89% 14.89% =
httpd
14409 nobody 4 0 43940K 36076K sbwait 0 0:01 1.22% 1.22% =
httpd
95515 nobody 4 0 39892K 32188K sbwait 1 0:08 0.29% 0.29% =
httpd
17656 prpcon 4 0 9916K 5680K sbwait 1 0:01 0.26% 0.24% =
cppop
18006 root 8 0 3032K 2324K nanslp 0 25:35 0.05% 0.05% perl
783 root 96 0 9704K 4572K select 3 17:39 0.05% 0.05% =
cppop
3820 mysql 20 0 339M 251M kserel 3 43:34 0.00% 0.00% =
mysqld
744 root 8 20 16776K 15120K nanslp 0 40:53 0.00% 0.00% perl
72899 root 20 0 21704K 20128K kserel 3 30:25 0.00% 0.00% =
clamd
913 root 97 0 11616K 4864K select 3 5:27 0.00% 0.00% =
cpsrvd
1065 mailnull 96 0 5880K 2828K select 0 3:22 0.00% 0.00% =
exim-4.62-0
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20060810044557.2E0E843D46>
