[comp.unix.questions] UNIX accounting for I/O

ntm1169@dsacg1.UUCP (Mott Given) (02/01/89)

     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.


Mott Given @ Defense Logistics Agency ,DSAC-TMP, Bldg. 27-1, P.O. Box 1605,
	    Systems Automation Center, Columbus, OH 43216-5002
UUCP:  mgiven%dsacg1.uucp@daitc.arpa              I speak for myself
Phone:       614-238-9431     AUTOVON: 850-9431
-- 
Mott Given @ Defense Logistics Agency ,DSAC-TMP, Bldg. 27-1, P.O. Box 1605,
	    Systems Automation Center, Columbus, OH 43216-5002
UUCP:  mgiven%dsacg1.uucp@daitc.arpa              I speak for myself
Phone:       614-238-9431     AUTOVON: 850-9431

dik@uva.UUCP (Casper H.S. Dik) (02/02/89)

In article <630@dsacg1.UUCP> ntm1169@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@uva.uucp
The Netherlands             |                 ...!uunet!mcvax!uva!dik