Do inter-process pipes use secondary (disc) memory for buffering?

Michael W. Herman mwherman at watcgl.UUCP
Tue May 14 01:04:10 AEST 1985


> (Performance analysis?  What performance analysis?)

I have done some experimenting in an attempt to determine what the
effective/sustained data transfer rates are for pipes in 4.2BSD on
a 780.  The experiment consisted of a simple producer process writing
blocks of data to a consumer process.  A total of 1M bytes of data
was transferred in each case.  The statistics I gathered consisted
of the block size (i.e. arg 3 to *write(2)*) and elapsed time for each
of the producer and consumer processes.  I varied the block size from
128 bytes to 4096 bytes in steps of 128 bytes (In another version of
the experiment, I used an upper bound of 16K bytes.)  The pipe was created
by calling the *pipe(2)* function.  The experiments were run on an almost
empty machine (i.e. load average < 1.0).

With only one pair of producer/consumer processes running on the 780,
a maximum sustained transfer rate of about 330,000 bytes/second was realized
using a block size of 3K bytes.  There were other local maximums at 1K bytes
(200,000 bytes/second), 2K bytes (280,000 bytes/second) and 4K bytes (326,000 
bytes/second).  For comparison, the transfer rate for a block size of 128 bytes
was about 34,000 bytes/second.

With 4 pairs of producer/consumer processes running simultaneously, the
corresponding figures were:

	block size (bytes)	approx. transfer rate (bytes/second)
	4K			47,000
	3K			70,000
	2K			40,000
	1K			35,000
	128			 6,300

If anyone would like to run these programs on their machines, I'll be
happy to send them to you.  Warning: they're pretty "bare bones" and 
you will probably want to change them to suit your own purposes.


Michael Herman
Computer Graphics Laboratory
Department of Computer Science
University of Waterloo
Waterloo, Ontario, Canada  N2L 3G1

UUCP:   {allegra,ihnp4,watmath}!watcgl!mwherman
-or-    {cbosgd,clyde,decvax,linus,tektronix,utcsrgv}!watmath!watcgl!mwherman
CSNET:  mwherman%watcgl at waterloo.CSNET
ARPA:   mwherman%watcgl%waterloo.CSNET at csnet-relay.ARPA  

p.s. I didn't do any statistical tests of significance with my results.



More information about the Comp.unix.wizards mailing list