Re: Top not showing cpu usage even remotely accurately
In the last episode (Sep 15), Ian Smith said: > On Thu, 14 Sep 2006, Dan Nelson wrote: > > I would guess that maybe xmms (or some other threaded app) is your > > hidden CPU consumer. The kernel does not calculate %CPU correctly > > for libkse-threaded programs, and they usually show up as 0% all > > the time. The TIME column does update correctly, though. If you > > switch to libthr with libmap.conf, you'll get accurate threaded > > %CPU reporting. > > I assume then that libkse is what the three multi-thread programs I'm > running (xmms, mozilla-bin and mysqld) are now using, where for each > of them `ldd $program | grep thr` shows > libpthread.so.1 => /usr/lib/libpthread.so.1 > > So can/should I set in (a new) /etc/libmap.conf generally: > libpthread.so.1 libthr.so.1 > libpthread.so libthr.so > > or would it be better to just target these specific programs, eg: > > [/usr/X11R6/lib/mozilla/mozilla-bin/] # assuming loaded with full path? > libpthread.so.1 libthr.so.1 > libpthread.so libthr.so > > Are there any likely downsides to using libthr instead? Esp. mysqld? Ya, libkse was the name of the default thread library before it was renamed to "libpthread". I use a global map (like in your first example) myself. I have a lightly-used mysql database on my machine and haven't noticed any problems with it or any other threaded apps. -- Dan Nelson [EMAIL PROTECTED] ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to "[EMAIL PROTECTED]"
Re: Top not showing cpu usage even remotely accurately
On Thu, 14 Sep 2006, Dan Nelson wrote: > In the last episode (Sep 14), Ian Smith said: > [..]> > > However that doesn't explain this typical top view when the system is > > quiescent or nearly so, as it mostly is, with only 5-minutely crons and > > 11-minutely entropy runs and the odd sendmail to be seen in lastcomm: > > > > last pid: 18500; load averages: 0.01, 0.08, 0.06up 5+08:40:33 > > 17:30:30 > > 136 processes: 3 running, 110 sleeping, 23 waiting > > CPU states: 5.7% user, 0.0% nice, 6.3% system, 0.0% interrupt, 88.0% > > idle > > Mem: 73M Active, 18M Inact, 46M Wired, 8108K Cache, 25M Buf, 2572K Free > > Swap: 384M Total, 106M Used, 278M Free, 27% Inuse > > > > PID USERNAME PRI NICE SIZERES STATETIME WCPUCPU COMMAND > >11 root 171 52 0K 8K RUN102.3H 86.82% 86.82% idle > > 743 smithi960 26616K 2908K select 156:40 1.03% 1.03% kdeinit > > 708 smithi960 34140K 15024K select 223:05 0.63% 0.63% Xorg > > 644 root 960 1244K 244K select 30:19 0.05% 0.05% moused > > 775 smithi200 11524K 1028K kserel 319:17 0.00% 0.00% xmms > > > It never shows more than about 90% idle, whereas a 0.01 shorter term > > load average should indicate more like 99% idle, shouldn't it? 97-99%, > > sometimes 100% idle was what FreeBSD 4.5-R used to tell me with the same > > workload in around the same memory use, but maybe 4.5 was optimistic .. > > I would guess that maybe xmms (or some other threaded app) is your > hidden CPU consumer. The kernel does not calculate %CPU correctly for > libkse-threaded programs, and they usually show up as 0% all the time. > The TIME column does update correctly, though. If you switch to libthr > with libmap.conf, you'll get accurate threaded %CPU reporting. Ah, thanks for a solid boot up the learning curve, Dan. Took me a while to connect kse(2) as it's not referred to as such in ldd output, but I kept digging. For sure xmms and moz are 2 that have gone mad 'quietly'. I assume then that libkse is what the three multi-thread programs I'm running (xmms, mozilla-bin and mysqld) are now using, where for each of them `ldd $program | grep thr` shows libpthread.so.1 => /usr/lib/libpthread.so.1 So can/should I set in (a new) /etc/libmap.conf generally: libpthread.so.1 libthr.so.1 libpthread.so libthr.so or would it be better to just target these specific programs, eg: [/usr/X11R6/lib/mozilla/mozilla-bin/] # assuming loaded with full path? libpthread.so.1 libthr.so.1 libpthread.so libthr.so Are there any likely downsides to using libthr instead? Esp. mysqld? I've already found that stopping those three processes lifts shown idle to ~95%, but then I also note that ldd other things - including kdeinit ie all main KDE processes - refer to libpthread.so.1 too, but only the above 3 ever seem to appear in state 'kserel' (This is all new to me :) Cheers, Ian ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to "[EMAIL PROTECTED]"
Re: Top not showing cpu usage even remotely accurately
In the last episode (Sep 14), Ian Smith said: > I still can't fathom what top tells me on a UP 5.5-STABLE system (300MHz > Celeron if speed's relevant). I initiated this thread (weeks ago :) re > seeing 0.0% idle (as expected) during buildworld but not seeing anything > add up to anything like 100%, including S)ystem processes, in top. [..]> > However that doesn't explain this typical top view when the system is > quiescent or nearly so, as it mostly is, with only 5-minutely crons and > 11-minutely entropy runs and the odd sendmail to be seen in lastcomm: > > last pid: 18500; load averages: 0.01, 0.08, 0.06up 5+08:40:33 17:30:30 > 136 processes: 3 running, 110 sleeping, 23 waiting > CPU states: 5.7% user, 0.0% nice, 6.3% system, 0.0% interrupt, 88.0% idle > Mem: 73M Active, 18M Inact, 46M Wired, 8108K Cache, 25M Buf, 2572K Free > Swap: 384M Total, 106M Used, 278M Free, 27% Inuse > > PID USERNAME PRI NICE SIZERES STATETIME WCPUCPU COMMAND >11 root 171 52 0K 8K RUN102.3H 86.82% 86.82% idle > 743 smithi960 26616K 2908K select 156:40 1.03% 1.03% kdeinit > 708 smithi960 34140K 15024K select 223:05 0.63% 0.63% Xorg > 644 root 960 1244K 244K select 30:19 0.05% 0.05% moused > 775 smithi200 11524K 1028K kserel 319:17 0.00% 0.00% xmms > It never shows more than about 90% idle, whereas a 0.01 shorter term > load average should indicate more like 99% idle, shouldn't it? 97-99%, > sometimes 100% idle was what FreeBSD 4.5-R used to tell me with the same > workload in around the same memory use, but maybe 4.5 was optimistic .. I would guess that maybe xmms (or some other threaded app) is your hidden CPU consumer. The kernel does not calculate %CPU correctly for libkse-threaded programs, and they usually show up as 0% all the time. The TIME column does update correctly, though. If you switch to libthr with libmap.conf, you'll get accurate threaded %CPU reporting. -- Dan Nelson [EMAIL PROTECTED] ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to "[EMAIL PROTECTED]"
Re: Top not showing cpu usage even remotely accurately
On Thu, 14 Sep 2006, Giorgos Keramidas wrote: > On 2006-09-14 00:48, "Tamouh H." <[EMAIL PROTECTED]> wrote: > > I think TOP and load averages are no longer accurate on FBSD 5.x and > > 6.x with SMP kernel. As far as I've seen. Load averages hit sometimes > > 8.0 without a noticable degradation in performance. I still can't fathom what top tells me on a UP 5.5-STABLE system (300MHz Celeron if speed's relevant). I initiated this thread (weeks ago :) re seeing 0.0% idle (as expected) during buildworld but not seeing anything add up to anything like 100%, including S)ystem processes, in top. Chuck Swiger pointed out that a buildworld runs lots of processes for far shorter times than top's sampling interval, which was true, as a browse with 'lastcomm -eE | less' through the buildworld time showed. However that doesn't explain this typical top view when the system is quiescent or nearly so, as it mostly is, with only 5-minutely crons and 11-minutely entropy runs and the odd sendmail to be seen in lastcomm: last pid: 18500; load averages: 0.01, 0.08, 0.06up 5+08:40:33 17:30:30 136 processes: 3 running, 110 sleeping, 23 waiting CPU states: 5.7% user, 0.0% nice, 6.3% system, 0.0% interrupt, 88.0% idle Mem: 73M Active, 18M Inact, 46M Wired, 8108K Cache, 25M Buf, 2572K Free Swap: 384M Total, 106M Used, 278M Free, 27% Inuse PID USERNAME PRI NICE SIZERES STATETIME WCPUCPU COMMAND 11 root 171 52 0K 8K RUN102.3H 86.82% 86.82% idle 743 smithi960 26616K 2908K select 156:40 1.03% 1.03% kdeinit 708 smithi960 34140K 15024K select 223:05 0.63% 0.63% Xorg 644 root 960 1244K 244K select 30:19 0.05% 0.05% moused 775 smithi200 11524K 1028K kserel 319:17 0.00% 0.00% xmms 761 smithi960 30824K 7272K select 97:50 0.00% 0.00% kdeinit 27 root 76 -43 0K 8K RUN 44:14 0.00% 0.00% swi5: clock s 772 smithi960 29736K 5600K select 40:57 0.00% 0.00% kdeinit 777 smithi 80 2300K 448K nanslp 36:20 0.00% 0.00% asapm 778 smithi 80 2524K 460K nanslp 34:12 0.00% 0.00% ascpu 767 smithi960 29448K 5612K select 29:23 0.00% 0.00% kdeinit 771 smithi960 29884K 5504K select 22:28 0.00% 0.00% kdeinit 616 mysql 200 50824K 1428K kserel 21:04 0.00% 0.00% mysqld 759 smithi960 29644K 5092K select 20:56 0.00% 0.00% kdeinit 773 smithi960 35640K 4080K select 20:39 0.00% 0.00% kdeinit 766 smithi960 29488K 4768K select 19:07 0.00% 0.00% kdeinit 764 smithi960 28784K 3964K select 16:38 0.00% 0.00% kdeinit 774 smithi960 33168K 3768K select 16:36 0.00% 0.00% kdeinit 757 smithi960 27272K 5508K select 4:55 0.00% 0.00% kdeinit 23 root -60 -179 0K 8K WAIT 3:04 0.00% 0.00% irq12: psm0 22 root -80 -199 0K 8K WAIT 3:02 0.00% 0.00% irq11: cbb0 c 43 root 200 0K 8K syncer 3:00 0.00% 0.00% syncer 4 root -80 0K 8K -2:58 0.00% 0.00% g_down 3 root -80 0K 8K -2:30 0.00% 0.00% g_up 49 root 120 0K 8K -2:09 0.00% 0.00% schedcpu 30 root -160 0K 8K -1:53 0.00% 0.00% yarrow 39 root -160 0K 8K psleep 1:30 0.00% 0.00% pagedaemon 41 root 171 52 0K 8K pgzero 1:25 0.00% 0.00% pagezero [..] It never shows more than about 90% idle, whereas a 0.01 shorter term load average should indicate more like 99% idle, shouldn't it? 97-99%, sometimes 100% idle was what FreeBSD 4.5-R used to tell me with the same workload in around the same memory use, but maybe 4.5 was optimistic .. > > This is one TOP that freaked me out, notice Idle CPU is 70% while the > > process is showing it is using 99% of CPU. systat draws more accurate > > picture, however, load average is still useless as far as performance > > monitoring : > > > > last pid: 10174; load averages: 1.63, 1.44, 1.20 up 4+00:25:19 > > 00:39:20 > > 169 processes: 2 running, 166 sleeping, 1 zombie > > CPU states: 25.8% user, 0.0% nice, 0.7% system, 0.1% interrupt, 73.4% > > idle > > Mem: 1316M Active, 1445M Inact, 297M Wired, 127M Cache, 112M Buf, 79M Free > > Swap: 8762M Total, 2096K Used, 8760M Free > > > > PID USERNAME PRI NICE SIZERES STATE C TIME WCPUCPU COMMAND > > 13362 root 1110 36444K 34196K CPU3 3 50:06 98.88% 98.88% > > perl5.8.7 > > 90391 root 960 27356K 26236K select 2 0:06 0.54% 0.54% > > perl5.8.7 > > 79619 nobody 40 209M 84640K sbwait 1 0:09 0.39% 0.39% httpd > > 10161 root 970 6712K 4752K select 2 0:00 1.40% 0.20% > > exim-4.62-0 > > 79649 nobody200 210M 84464K lockf 0 0:06 0.15% 0.15% httpd > > Apparently, you have a 4-CPU system :-) > > What you see displayed as
Re: Top not showing cpu usage even remotely accurately
On 2006-09-14 00:48, "Tamouh H." <[EMAIL PROTECTED]> wrote: > I think TOP and load averages are no longer accurate on FBSD 5.x and > 6.x with SMP kernel. As far as I've seen. Load averages hit sometimes > 8.0 without a noticable degradation in performance. > > This is one TOP that freaked me out, notice Idle CPU is 70% while the > process is showing it is using 99% of CPU. systat draws more accurate > picture, however, load average is still useless as far as performance > monitoring : > > last pid: 10174; load averages: 1.63, 1.44, 1.20 up 4+00:25:19 00:39:20 > 169 processes: 2 running, 166 sleeping, 1 zombie > CPU states: 25.8% user, 0.0% nice, 0.7% system, 0.1% interrupt, 73.4% idle > Mem: 1316M Active, 1445M Inact, 297M Wired, 127M Cache, 112M Buf, 79M Free > Swap: 8762M Total, 2096K Used, 8760M Free > > PID USERNAME PRI NICE SIZERES STATE C TIME WCPUCPU COMMAND > 13362 root 1110 36444K 34196K CPU3 3 50:06 98.88% 98.88% perl5.8.7 > 90391 root 960 27356K 26236K select 2 0:06 0.54% 0.54% perl5.8.7 > 79619 nobody 40 209M 84640K sbwait 1 0:09 0.39% 0.39% httpd > 10161 root 970 6712K 4752K select 2 0:00 1.40% 0.20% > exim-4.62-0 > 79649 nobody200 210M 84464K lockf 0 0:06 0.15% 0.15% httpd Apparently, you have a 4-CPU system :-) What you see displayed as "CPU" is for one of the processors, not for all of them. Load average is not an easy thing to update for an SMP system, I guess. There are two options: - Set load-average to >= 1.0 if at least one process wants to run on at least one processor - Calculate an aggregate load-average for all CPUs None of these is 100% correct, though. One of them is useful in some cases. The other in other cases :-( I don't remember off-hand how 5.X or 6.X calculate their load-average, but I'd be interested to know what you expected it to show, or what it shows on Linux systems. pgpC51FkX8BbO.pgp Description: PGP signature
Re: Top not showing cpu usage even remotely accurately
In the last episode (Sep 14), Tamouh H. said: > This is one TOP that freaked me out, notice Idle CPU is 70% while the > process is showing it is using 99% of CPU. systat draws more accurate > picture, however, load average is still useless as far as performance > monitoring : > > last pid: 10174; load averages: 1.63, 1.44, 1.20 > up 4+00:25:19 00:39:20 > 169 processes: 2 running, 166 sleeping, 1 zombie > CPU states: 25.8% user, 0.0% nice, 0.7% system, 0.1% interrupt, 73.4% idle > Mem: 1316M Active, 1445M Inact, 297M Wired, 127M Cache, 112M Buf, 79M Free > Swap: 8762M Total, 2096K Used, 8760M Free > > PID USERNAME PRI NICE SIZERES STATE C TIME WCPUCPU COMMAND > 13362 root 1110 36444K 34196K CPU3 3 50:06 98.88% 98.88% perl5.8.7 > 90391 root 960 27356K 26236K select 2 0:06 0.54% 0.54% perl5.8.7 > 79619 nobody 40 209M 84640K sbwait 1 0:09 0.39% 0.39% httpd > 10161 root 970 6712K 4752K select 2 0:00 1.40% 0.20% > exim-4.62-0 > 79649 nobody200 210M 84464K lockf 0 0:06 0.15% 0.15% httpd You have a 4-cpu box and pid 13362 is using 99% of one CPU. The other 3 are idle, so your %idle is going to be around 75%. Looks pretty accurate to me :) -- Dan Nelson [EMAIL PROTECTED] ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to "[EMAIL PROTECTED]"
RE: Top not showing cpu usage even remotely accurately
> > In recent 6.X versions, you can use 'S' to show system threads too. > For an even more fine-grained view, you can use 'H' to show > each thread separately. > > Then there is also the 'CPU' mode (as opposed to the default 'WCPU' > mode of top). > > > 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. > > Probably because the work it does at the moment is not CPU-bounded? > > > 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 SIZERES STATE C TIME > WCPUCPU COMMAND > > 5071 nobody 1010 43124K 35180K CPU2 2 0:07 > 14.89% 14.89% httpd > > 14409 nobody 40 43940K 36076K sbwait 0 0:01 > 1.22% 1.22% httpd > > 95515 nobody 40 39892K 32188K sbwait 1 0:08 > 0.29% 0.29% httpd > > Try hitting 'S'. Perhaps the system spends too much time in > system threads (i.e. the "syncer") :) > I think TOP and load averages are no longer accurate on FBSD 5.x and 6.x with SMP kernel. As far as I've seen. Load averages hit sometimes 8.0 without a noticable degradation in performance. This is one TOP that freaked me out, notice Idle CPU is 70% while the process is showing it is using 99% of CPU. systat draws more accurate picture, however, load average is still useless as far as performance monitoring : last pid: 10174; load averages: 1.63, 1.44, 1.20 up 4+00:25:19 00:39:20 169 processes: 2 running, 166 sleeping, 1 zombie CPU states: 25.8% user, 0.0% nice, 0.7% system, 0.1% interrupt, 73.4% idle Mem: 1316M Active, 1445M Inact, 297M Wired, 127M Cache, 112M Buf, 79M Free Swap: 8762M Total, 2096K Used, 8760M Free PID USERNAME PRI NICE SIZERES STATE C TIME WCPUCPU COMMAND 13362 root 1110 36444K 34196K CPU3 3 50:06 98.88% 98.88% perl5.8.7 90391 root 960 27356K 26236K select 2 0:06 0.54% 0.54% perl5.8.7 79619 nobody 40 209M 84640K sbwait 1 0:09 0.39% 0.39% httpd 10161 root 970 6712K 4752K select 2 0:00 1.40% 0.20% exim-4.62-0 79649 nobody200 210M 84464K lockf 0 0:06 0.15% 0.15% httpd 10158 mailnull 40 6760K 3992K sbwait 2 0:00 0.81% 0.15% exim-4.62-0 79654 nobody 40 208M 68660K sbwait 0 0:08 0.05% 0.05% httpd 79660 nobody 40 208M 58144K sbwait 0 0:06 0.05% 0.05% httpd 10170 sshd 1170 4768K 2052K select 0 0:00 1.00% 0.05% sshd 1123 mysql 960 346M 214M select 2 114:48 0.00% 0.00% mysqld 1123 mysql 200 346M 214M kserel 3 114:48 0.00% 0.00% mysqld 1123 mysql 200 346M 214M kserel 3 114:48 0.00% 0.00% mysqld 1123 mysql 200 346M 214M kserel 2 114:48 0.00% 0.00% mysqld 1123 mysql 200 346M 214M kserel 0 114:48 0.00% 0.00% mysqld 1123 mysql 200 346M 214M kserel 2 114:48 0.00% 0.00% mysqld 1123 mysql 200 346M 214M kserel 1 114:48 0.00% 0.00% mysqld 1123 mysql 200 346M 214M kserel 0 114:48 0.00% 0.00% mysqld 1123 mysql 200 346M 214M kserel 0 114:48 0.00% 0.00% mysqld 1123 mysql 200 346M 214M kserel 3 114:48 0.00% 0.00% mysqld 1123 mysql 200 346M 214M kserel 3 114:48 0.00% 0.00% mysqld 1123 mysql 200 346M 214M kserel 0 114:48 0.00% 0.00% mysqld 1123 mysql 200 346M 214M kserel 1 114:48 0.00% 0.00% mysqld 1123 mysql 200 346M 214M kserel 2 114:48 0.00% 0.00% mysqld 1123 mysql 200 346M 214M kserel 1 114:48 0.00% 0.00% mysqld 1123 mysql 200 346M 214M kserel 1 114:48 0.00% 0.00% mysqld 1123 mysql 200 346M 214M kserel 0 114:48 0.00% 0.00% mysqld 1123 mysql 200 346M 214M kserel 0 114:48 0.00% 0.00% mysqld 1123 mysql 200 346M 214M kserel 2 114:48 0.00% 0.00% mysqld 1123 mysql 200 346M 214M kserel 1 114:48 0.00% 0.00% mysqld 1123 mysql 200 346M 214M kserel 0 114:48 0.00% 0.00% mysqld 1123 mysql 200 346M 214M kserel 2 114:48 0.00% 0.00% mysqld 1123 mysql 200 346M 214M kserel 0 114:48 0.00% 0.00% mysqld 1123 mysql 200 346M 214M kserel 1 114:48 0.00% 0.00% mysqld 1123 mysql 200 346M 214M kserel 0 114:48 0.00% 0.00% mysqld 1123 mysql 200 346M 214M kserel 1 114:48 0.00%
Re: Top not showing cpu usage even remotely accurately
On Thu, 10 Aug 2006, Chuck Swiger wrote: > Ian Smith wrote: > > But since running 5.x (5.5-STABLE since 1st Aug) top can show 0.0% idle > > but the cpu usages shown don't add up to much of a fraction of 100%. > [ ... ] > > Any ideas why top hasn't much of a clue about what's consuming cpu? > > Sure, if you're running a parallel make, that will be starting up lots of > short-lived compiler processes which exit quickly; top can only display the > CPU load for those processes which are still running at the time it samples > the system. Spot on, thanks Chuck. lastcomm showed a couple of thousand processes run per minute during several hours of 'make index'; /var/account/acct was nearly 10MB for that time. Only one gcc but lots of sh, perl, grep, awk, sed and such each running < 1 second, being a texty sort of job. Cheers, Ian ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to "[EMAIL PROTECTED]"
Re: Top not showing cpu usage even remotely accurately
Ian Smith wrote: But since running 5.x (5.5-STABLE since 1st Aug) top can show 0.0% idle but the cpu usages shown don't add up to much of a fraction of 100%. [ ... ] Any ideas why top hasn't much of a clue about what's consuming cpu? Sure, if you're running a parallel make, that will be starting up lots of short-lived compiler processes which exit quickly; top can only display the CPU load for those processes which are still running at the time it samples the system. -- -Chuck ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to "[EMAIL PROTECTED]"
Re: Top not showing cpu usage even remotely accurately
On 2006-08-10 00:45, "Tamouh H." <[EMAIL PROTECTED]> wrote: > > But since running 5.x (5.5-STABLE since 1st Aug) top can show > > 0.0% idle but the cpu usages shown don't add up to much of a > > fraction of 100%. In recent 6.X versions, you can use 'S' to show system threads too. For an even more fine-grained view, you can use 'H' to show each thread separately. Then there is also the 'CPU' mode (as opposed to the default 'WCPU' mode of top). > 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. Probably because the work it does at the moment is not CPU-bounded? > 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 SIZERES STATE C TIME WCPUCPU COMMAND > 5071 nobody 1010 43124K 35180K CPU2 2 0:07 14.89% 14.89% httpd > 14409 nobody 40 43940K 36076K sbwait 0 0:01 1.22% 1.22% httpd > 95515 nobody 40 39892K 32188K sbwait 1 0:08 0.29% 0.29% httpd Try hitting 'S'. Perhaps the system spends too much time in system threads (i.e. the "syncer") :) ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to "[EMAIL PROTECTED]"
RE: Top not showing cpu usage even remotely accurately
> But since running 5.x (5.5-STABLE since 1st Aug) top can show > 0.0% idle but the cpu usages shown don't add up to much of a > fraction of 100%. > > For a typical illustration: 'make index' has been running for > hours, and here's a shot of 'nice top', o)rdered by cpu, > showing S)ystem procs: > > last pid: 62397; load averages: 2.06, 2.09, 2.13 up > 3+03:57:39 13:11:27 > 154 processes: 6 running, 125 sleeping, 23 waiting CPU > states: 77.3% user, 0.0% nice, 22.7% system, 0.0% > interrupt, 0.0% idle > Mem: 79M Active, 24M Inact, 37M Wired, 5640K Cache, 25M Buf, > 3388K Free > Swap: 384M Total, 133M Used, 251M Free, 34% Inuse > > PID USERNAME PRI NICE SIZERES STATETIME WCPU > CPU COMMAND > 62380 root 1220 788K 648K RUN 0:01 19.48% 1.86% make > 736 smithi970 27000K 3184K select 89:56 1.07% > 1.07% kdeinit > 762 smithi960 29708K 7428K select 14:01 0.93% > 0.93% kdeinit > 699 smithi960 52320K 10288K select 105:02 0.88% 0.88% Xorg > 62394 root 1250 580K 440K RUN 0:00 7.00% 0.34% make > 754 smithi960 30972K 6308K select 57:22 0.15% > 0.15% kdeinit > 770 smithi 80 2524K 660K nanslp 20:51 0.05% > 0.05% ascpu > 'ps auxww' cpu percentages reveal little more, except that > make index is running 'make -j2 ..' hence the ~2.0 load average. > > Ignore the high swap use; most of it is numerous quiescent > kwrite, httpd and mozilla sessions pushed out to swap on this > lil' 160MB laptop; 'systat -vm' shows it's not actually doing > any paging during this time. > > Any ideas why top hasn't much of a clue about what's consuming cpu? > > 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 SIZERES STATE C TIME WCPUCPU COMMAND 5071 nobody 1010 43124K 35180K CPU2 2 0:07 14.89% 14.89% httpd 14409 nobody 40 43940K 36076K sbwait 0 0:01 1.22% 1.22% httpd 95515 nobody 40 39892K 32188K sbwait 1 0:08 0.29% 0.29% httpd 17656 prpcon 40 9916K 5680K sbwait 1 0:01 0.26% 0.24% cppop 18006 root 80 3032K 2324K nanslp 0 25:35 0.05% 0.05% perl 783 root 960 9704K 4572K select 3 17:39 0.05% 0.05% cppop 3820 mysql 200 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 200 21704K 20128K kserel 3 30:25 0.00% 0.00% clamd 913 root 970 11616K 4864K select 3 5:27 0.00% 0.00% cpsrvd 1065 mailnull 960 5880K 2828K select 0 3:22 0.00% 0.00% exim-4.62-0 ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to "[EMAIL PROTECTED]"