[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: I/O Wait and CPU Usage



On Sat, 2007-05-12 at 13:59 -0400, Grok Mogger wrote:
> Karl E. Jorgensen wrote:
> > On Fri, May 11, 2007 at 07:43:50PM -0400, Grok Mogger wrote:
> >> In this interpretation, "wa" is really like "blocked" CPU time. 
> >>  The CPU has processes that are not really doing anything, 
> >> because they are waiting on slow hard disks and network I/O, 
> >> *but* these waiting processes still prevent that much CPU from 
> >> being used.
> > 
> > A couple of experiments:
> > 
> >     # dd if=/dev/hda of=/dev/null
> > 
> > is obviously IO-bound. wa% goes sky-high, idle% goes toward zero.
> > 
> >     $ while true ; do 
> >     : 
> >     done
> > 
> > is cpu-bound. us% goes high, wa%, id% and ni% goes towards zero.
> > 
> > Finally, run both at the same time. Result: us% goes high, everthing 
> > else goes towards zero. This matches interpretation A, not B.
> > 
> > Hope this helps
> > 
> 
> Thanks, that's rather ingenious!  And it does help a lot.
> 
> If anyone else has any comments, I'd love to hear them. 
> Particularly if you have some reason why you think 
> Interpretation B is correct, since A seems to be the winner.

I was going through the "procps" source files and looking at everything.
I opened up many files looking at how things are read and interpreted.
Karl pretty much nailed it.

Though, doing those kinds of things on a "production" machine would get
you KEELD! Yes, they are ingenious.
-- 
greg, greg@gregfolkert.net
PGP key: 1024D/B524687C  2003-08-05
Fingerprint: E1D3 E3D7 5850 957E FED0  2B3A ED66 6971 B524 687C
Alternate Fingerprint: 09F9 1102 9D74  E35B D841 56C5 6356 88C0

Attachment: signature.asc
Description: This is a digitally signed message part


Reply to: