| From | Sent On | Attachments |
|---|---|---|
| Yuri | May 1, 2009 11:27 am | |
| Alexey Shuvaev | May 1, 2009 11:38 am | |
| Yuri | May 1, 2009 11:50 am |
| Subject: | Re: Why top never shows ~100% CPU usage with heavy PCU load? | |
|---|---|---|
| From: | Alexey Shuvaev (shuv...@physik.uni-wuerzburg.de) | |
| Date: | May 1, 2009 11:38:24 am | |
| List: | org.freebsd.freebsd-hackers | |
On Fri, May 01, 2009 at 11:28:02AM -0700, Yuri wrote:
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>
[snip]
Strange is 20% system load. The summary line is about all cpus/cores/... Here I have:
top:
last pid: 48056; load averages: 0.91, 0.38, 0.15 up 12+23:14:39 20:34:58 49 processes: 2 running, 47 sleeping CPU: 50.0% user, 0.0% nice, 0.2% system, 0.0% interrupt, 49.8% idle Mem: 259M Active, 1630M Inact, 537M Wired, 16M Cache, 417M Buf, 1495M Free Swap: 4096M Total, 4096M Free
PID USERNAME THR PRI NICE SIZE RES STATE C TIME WCPU COMMAND 48032 lexx 1 118 0 2624K 604K CPU1 1 2:31 100.00% bbb ...
~>uname -a
FreeBSD wep4035 8.0-CURRENT FreeBSD 8.0-CURRENT #0: Sat Apr 18 20:38:14 CEST
2009 root@wep4035:/usr/obj/usr/src/sys/GENERIC amd64
~> cat bbb.c int main(void) { for (;;); return; }
My $0.02, Alexey.
_______________________________________________ free...@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-hackers To unsubscribe, send any mail to "free...@freebsd.org"





