pipedev on a RAM disk
Tony Luck
aegl at root.co.uk
Tue Feb 16 05:25:02 AEST 1988
In article <1988Feb3.121830.11101 at utzoo.uucp> henry at utzoo.uucp (Henry Spencer) writes:
> We made pipedev a small RAM disk;
>the effect on system performance was quite noticeable.
Do you have any figures? I'm not really sure why putting pipedev on a
ram disk should make much difference to performance - if you have
enough buffers configured on your system then a write to a pipe will
dump some data into an incore buffer ... using 'bdwrite()' to mark the
buffer as dirty - but not starting i/o on it. Then a read will fish it
out of the buffer and clear the B_DELWRI bit off the buffer to make
sure the (now useless) data doesn't get written out to disk. Of course
if you don't have enough buffers then the system may decide to reuse a
pipe buffer before the reader can pick up the data - but this shouldn't
really happen too often unless the reader of the pipe is taking a very
long time about picking up its data (in which case the slowness of
the pipeline is likely to be dwarfed by the cpu-munching being done by
the reader).
Moral: Most of the time you are better off using extra memory as
buffers (which will benefit all processes accessing all files) rather
than tying it down into a ram-disk (where it will only be of use to a
few processes accessing a few specific files).
More information about the Comp.unix.wizards
mailing list