discrepency about CPU usage between iostat and prstat
- From: bill_j_chen@xxxxxxxxx
- Date: 22 Jun 2006 00:49:44 -0700
Hi, Solaris guru,
The scenario I am talking about here might be interesting to you.
I have a netra t1 box running the latest solaris 10. It is a standalone
machine. That means there is no TCP/IP traffic etc. And actually there
is no any application or server running. The CPU idle is 99~100%
I wrote a sample C program which simply caculate the sin and atan for
degree 1~36000000. This testing code is apparently pure CPU intensive
(I didn't put any output line in the code, so no IO, no system call.
This makes sure the process will run in user-mode) and runs very long.
before I invoke the program, I have been running "iostat 3" and "prstat
3" to check the system activity. Actually nothing is going on. CPU is
totally idle. Which is good.
Then I invoke the testing program. iostat immediately shows that all
the CPU is being used by the testing program. user-mode 100%, system
mode 0%, CPU idle 0% (NOTE: kernel mode CPU usage: 0)
But at same time, prstat shows the program uses around 35% CPU and NO
other process is using much CPU power at all). Of course the CPU usage
by the testing process keeps increasing. About one minute later, the
usage by this process reported in prstat command gets to 99%.
Definitely there is no paging or disk activity going on as my code
doesn't read or write anything.
My question is why we see this kind discrepency in the first minute? .
.
- Follow-Ups:
- Re: discrepency about CPU usage between iostat and prstat
- From: Darren Dunham
- Re: discrepency about CPU usage between iostat and prstat
- From: Casper H . S . Dik
- Re: discrepency about CPU usage between iostat and prstat
- From: Thomas Maier-Komor
- Re: discrepency about CPU usage between iostat and prstat
- Prev by Date: Re: NIS+ Broadcast
- Next by Date: Re: Strange shell script behaviour
- Previous by thread: REMINDER: SVOSUG - Postgres & Solaris/OpenSolaris - Thurs. June 22nd 7:30pm SCA03 (tonight)
- Next by thread: Re: discrepency about CPU usage between iostat and prstat
- Index(es):
Relevant Pages
|