UNIX accounting for I/O

Casper H.S. Dik dik at uva.UUCP
Thu Feb 2 05:52:17 AEST 1989


In article <630 at dsacg1.UUCP> ntm1169 at dsacg1.UUCP (Mott Given) writes:
>
>     I would like to know why the number of I/O's, as shown by "BLOCKS R/W"
>     in the BSD 4.3 accounting statistics, increases as the system workload
>     increases.   I do not understand very much about UNIX internals, and
>     in other operating systems such as MVS one does not see the same
>     phenomenon.

The 4.x manual getrusage(2) states:

The numbers ru_inblock and ru_outblock acccount only for real i/o; data
supplied by the cacheing machanism is charged only to the first process
to read or write the data.

[end of quote]

(ru_inblock = number of fs input operations)
(ru_outlock = number of fs output operations)

So if you are on a lightly loaded system some blocks stay in the cache
long enough to be used again.

With an increasing load average, blocks get flushed from the cache more often,
resulting in more real I/O operations and consequently higher numbers
for ru_inblock and ru_outblock. (ru_in + ru_out = BLOCKS R/W)


Hope this explains enough.
>
>Mott Given @ Defense Logistics Agency ,DSAC-TMP, Bldg. 27-1, P.O. Box 1605,


____________________________________________________________________________
Casper H.S. Dik
University of Amsterdam     |		      dik at uva.uucp
The Netherlands             |                 ...!uunet!mcvax!uva!dik



More information about the Comp.unix.questions mailing list