On Tue, Jun 20, 2006 at 10:48:46PM -0400, Dennis Clarke wrote: > > I have a system here that runs snv_38 and I have a bit of code that cranks a > large pile of numbers about. All of this is integer operations with the > exception of maybe two lines that require floating point. That would be two > lines out of about 200 lines of addition, subtractions, integer comparisons > etc etc and all in all the code bit runs for about 19 secs. > > Now mpstat reports that one proc is totally tied up with the process thus : > > $ mpstat 2 ... > CPU minf mjf xcal intr ithr csw icsw migr smtx srw syscl usr sys wt idl > 0 0 0 35 5414 210 103 0 2 0 0 162 0 4 0 96 > 1 0 0 5103 81 3 2 3 0 0 0 4 0 100 0 0 ^^^^^^^^^^^^^ ...
This indicates that almost no time is being spent in userland, and one CPU is busy only doing kernel work. You probably have either a kernel thread or heavy interrupt traffic eating up CPU 1. If you want to investigate, something like: dtrace -n '[EMAIL PROTECTED]()] = count()}' -n 'END{trunc(@a,20)}' \ -c './r' will give you the most common kernel stacks while your process is running. There might be a clue from that. ... > PID USERNAME SIZE RSS STATE PRI NICE TIME CPU PROCESS/NLWP > 1996 dclarke 1020K 704K cpu1 0 0 0:00:17 29% r/1 > 1994 dclarke 2772K 2476K cpu0 59 0 0:00:00 0.2% prstat/1 > 1995 dclarke 2084K 1336K sleep 59 0 0:00:00 0.1% mpstat/1 > 1978 dclarke 11M 3388K sleep 59 0 0:00:00 0.0% sshd/1 > 1921 dclarke 11M 3388K sleep 59 0 0:00:00 0.0% sshd/1 ... > So either mpstat is telling me that one processor is indeed totally busy or > prstat is telling me that something called "r" is just taking 29% of the > system CPU resources at its peak. The CPU measurement ramps up slowly. The "PRI" of 0 indicates that you are heavily CPU bound. You should look at the prstat -m information for your process; it will let you know precisely where its time is being spent. (the results are not decayed) Cheers, - jonathan -- Jonathan Adams, Solaris Kernel Development _______________________________________________ opensolaris-discuss mailing list opensolaris-discuss@opensolaris.org