Date: Fri, 01 May 2009 11:28:02 -0700 From: Yuri <yuri@rawbw.com> To: freebsd-hackers@freebsd.org Subject: Why top never shows ~100% CPU usage with heavy PCU load? Message-ID: <49FB3F32.2010800@rawbw.com>
next in thread | raw e-mail | index | archive | help
When I run cycle process: main() {for (;;) {}} I never see that it consumes ~100% CPU. Instead 'top -C' shows something like this, with numbers fluctuating around the shown numbers: CPU: 96.2% user, 0.0% nice, 20.0% system, 0.0% interrupt, 0.0% idle Mem: 653M Active, 995M Inact, 241M Wired, 90M Cache, 112M Buf, 11M Free Swap: 16G Total, 204M Used, 16G Free, 1% Inuse, 16K In PID USERNAME THR PRI NICE SIZE RES STATE TIME CPU COMMAND 85422 yuri 1 99 0 2520K 980K RUN 0:21 57.47% cycle <skipped minor loads> Total of CPU column for all processes is never what top shows in "CPU:" field. At the same time kde system guard app shows 100% overall CPU load and same cycle app shows as consuming ~85% CPU. So system guard always shows consistently higher number for the same process than top -C shows. On Linux process the cycle app shows as consuming <~100% CPU and total is also <~100% that makes sense. Why top's "CPU:" field doesn't equal total of all CPUs for all processes that it shows? Why top doesn't show ~100% CPU consumption for the cycle process? Why sysguard in kde consistently shows higher CPU consumption numbers than top -C? Yuri
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?49FB3F32.2010800>