Subject: Re: tmp in mfs and swap
To: Charles M. Hannum <mycroft@NetBSD.ORG>
From: John Dyson <dyson@freefall.freebsd.org>
List: current-users
Date: 02/07/1996 11:07:56
> 
> 
>    Using -pipe is a big win. On a system with not enough RAM, and not using
>    -pip, the stuff gets written to intermidiate files. If this is an MFS /tmp
>    then this is swap, else it is ordinary file system. On a system with less
>    memory and -pipe the processes get swapped. If the swapper/pager is good
>    enough then what is the difference ?
> 
> Even if you scheduled optimally for this situation, you'd still have
> to switch your working set 2*((N/PIPE_BUF)-1) times more, where N is
> the amount of data output between stages.  And if you come up with
> an optimal scheduler, I'd love to see it...
> 
Actually it isn't PIPE_BUF in the above formula with the sockets
implementation.  PIPE_BUF is the minimum guaranteed contiguous write
to a pipe.  It appears to be PIPSIZ (or some perhaps a little smaller
than that.)  We have some new pipe code that we are developing, and
a non-FreeBSD VM system version should be easy to come up with.  It
is much faster than the original...  You are welcome to grab a copy
if you want.  It'll be mature within a week or so...  I'll be glad
to ifdef out the FreeBSD stuff if you want..

Sure would be bad if it was PIPE_BUF (512) instead of PIPSIZE (4096 or
larger).

John