Hi I don't know enough about the specifics for Open Solaris so the following is based on the guess that it is the same as regular Solaris (the fact that your vmstat r queue is at values like 7 and that idle CPU is at 0% but prstat shows only about 4% CPU makes this feel like a good guess) . Historically, Solaris used the "pcpu" parameter to display CPU against individual processes in prstat (or as part of ps -ef with the -o option). As pcpu is based on a slowly decaying average (equivalent to exponential weighting over the last minute) it deals poorly with processes with short lives such as the one you have (your example from your snap shot below shows that the CPU times are all very low - suggesting processes which don't stay up for long). Typically, changing the prstat refresh time doesn't change anything because the %cpu it is displaying remains the decaying average over the last minute. Alternatives could be prstat with the -m option if it is supported. The TOP tool changed how it calculates per process CPU% for Solaris (it stopped displaying the pcpu parameter and started to calculate %cpu based on the increases in cpu time) as of version 3.6, so you might want to give that a try. Because TOP calculates CPU% of the processes based on CPU time, going to a shorter refresh rate actually does help to improve accuracy for short processes... but it can't go below 1 second. Many short lived processes live less than one second. I don't know Dtrace that well but look forward to having a good tools to deal with this type of situation. Hope it helps and others, please correct me if I am saying anything wrong or that doesn't apply to OpenSolaris, JF.
________________________________ From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of [EMAIL PROTECTED] Sent: Monday, June 18, 2007 8:28 AM To: [EMAIL PROTECTED]; [EMAIL PROTECTED]; perf-discuss@opensolaris.org Subject: [perf-discuss] cpu performance counters obtained by vmstat and prstat look conflict Dear all: I'm compiling the ON build 65's source code now, using "nightly opensolaris.sh" command. The prstat reports that system is very idle, but the load average tells me that the system is very busy. -,- And then I check the vmstat report, it shows the system is busy now, too. Following are the reports, what's the problem? ps, My system is a dell workstation with a P4 1.7G CPU and 512MB memory. PID USERNAME SIZE RSS STATE PRI NICE TIME CPU PROCESS/NLWP 6673 root 13M 12M sleep 35 0 0:00:02 2.9% dmake/1 9086 root 5672K 3396K run 35 0 0:00:00 0.5% acomp/1 6634 root 2080K 1344K sleep 59 0 0:00:00 0.2% vmstat/1 9080 root 9640K 6576K run 15 0 0:00:00 0.2% ube/1 8383 root 4320K 2764K cpu0 59 0 0:00:00 0.1% prstat/1 7720 root 8112K 3928K sleep 59 0 0:00:00 0.0% sshd/1 9083 root 1140K 876K sleep 35 0 0:00:00 0.0% sh/1 9071 root 1200K 920K run 15 0 0:00:00 0.0% cc/1 9069 root 1140K 876K sleep 45 0 0:00:00 0.0% sh/1 9085 root 1192K 916K sleep 35 0 0:00:00 0.0% cc/1 9070 root 996K 688K sleep 35 0 0:00:00 0.0% cw/1 9084 root 996K 668K run 25 0 0:00:00 0.0% cw/1 9082 root 13M 1320K sleep 35 0 0:00:00 0.0% dmake/1 9068 root 13M 1316K sleep 45 0 0:00:00 0.0% dmake/1 7979 root 7836K 2040K sleep 59 0 0:00:00 0.0% sshd/1 7984 root 2588K 1820K sleep 59 0 0:00:00 0.0% bash/1 7918 root 7836K 2044K sleep 59 0 0:00:01 0.0% sshd/1 117 daemon 4008K 1972K sleep 59 0 0:00:01 0.0% kcfd/3 9742 root 4012K 2552K sleep 59 0 0:00:11 0.0% nscd/25 5309 root 12M 6428K sleep 59 0 0:10:35 0.0% smbd/1 7598 root 4600K 3860K sleep 59 0 0:00:02 0.0% dmake/1 7597 root 972K 688K sleep 59 0 0:00:00 0.0% time/1 27340 root 3152K 2396K sleep 59 0 0:00:00 0.0% dmake/1 26430 root 3176K 2436K sleep 59 0 0:00:00 0.0% dmake/1 NPROC USERNAME SIZE RSS MEMORY TIME CPU 63 root 289M 138M 27% 0:21:04 4.3% 2 daemon 6332K 2960K 0.6% 0:00:01 0.0% 1 smmsp 6996K 1452K 0.3% 0:00:05 0.0% Total: 66 processes, 176 lwps, load averages: 2.97, 3.04, 3.03 [EMAIL PROTECTED]:~#vmstat 1 kthr memory page disk faults cpu r b w swap free re mf pi po fr de sr cd f0 s0 -- in sy cs us sy id 0 0 0 1238652 245720 15 22 40 0 0 0 0 2 0 0 0 419 153 155 1 1 97 1 0 0 1201976 225460 1445 6769 0 67 67 0 0 7 0 0 0 317 5544 115 73 27 0 3 0 0 1190896 224480 6842 18811 0 72 72 0 0 10 0 0 0 332 11701 223 35 65 0 7 0 0 1196188 231540 4681 13909 0 99 99 0 0 10 0 0 0 340 10901 292 47 53 0 4 0 0 1196072 230308 4168 11179 0 67 67 0 0 8 0 0 0 329 11525 171 58 42 0 3 0 0 1183820 218020 1415 7525 0 28 28 0 0 6 0 0 0 325 5082 135 74 26 0 2 0 0 1189328 222504 4544 12530 0 139 139 0 0 16 0 0 0 348 10556 309 50 50 0 8 0 0 1194864 229620 5194 15550 0 36 36 0 0 11 0 0 0 333 10805 204 43 57 0 7 0 0 1195228 229536 5172 14077 0 67 67 0 0 13 0 0 0 338 10306 196 50 50 0 7 0 0 1187484 226696 4699 14620 0 115 115 0 0 11 0 0 0 336 10514 205 45 55 0 ^C [EMAIL PROTECTED]:~# It seems that prstat doesn't report the correct CPU usage percent for some processes. Regards TJ
_______________________________________________ perf-discuss mailing list perf-discuss@opensolaris.org