I wonder how much stuff breaks if you actually change the pipe size. I bet there’s a lot of assumptions kicking around.
The vast majority of shell script writers don't know or care what the pipe size is. The tools they are using treat them as just one solid stream of data. There's not much to break.
The Effect of Pipe Capacity on Unix Pipeline Performance
11–17 of 17 posts
Re: The Effect of Pipe Capacity on Unix Pipeline Performance
#12I don't think this is correct! Context switches are expensive -- a small pipe size will force both processes to make more system calls to move the same amount of data through the pipe.
In this light, the UNIX specification's requirement of 4 KB is definitely too small; even the Linux 2.6+ default of 64 KB feels like it might be on the small side.
Re: The Effect of Pipe Capacity on Unix Pipeline Performance
#13Earlier quoted context omitted.
The vast majority of shell script writers don't know or care what the pipe size is. The tools they are using treat them as just one solid stream of data. There's not much to break.
I meant in the kernel. Like if I hooked up a fuzzer and just started swinging the pipe size around.
Actually, come to think of it named pipes would be another good place to fuzz.
Re: The Effect of Pipe Capacity on Unix Pipeline Performance
#14Awhhh. :'( I wanted to see: - What happens when piping an 8 TiB file through awk to be stored on another physical volume (proly want to use xfs). - A graph of various block sizes, various file sizes, pipeline sizes and timing using a HPET. I don't know how you make an 2+-way pipe like it the diagrams except by process substitution, except that doesn't always work and you can't create cycles without creating FIFO (nam…
Re: The Effect of Pipe Capacity on Unix Pipeline Performance
#15I wonder how much stuff breaks if you actually change the pipe size. I bet there’s a lot of assumptions kicking around.
Re: The Effect of Pipe Capacity on Unix Pipeline Performance
#16I expected some examples and benchmarks with some common unix tools.
Re: The Effect of Pipe Capacity on Unix Pipeline Performance
#17> If the two processes exchange data in this pattern [one-to-one exchange], a small pipe doesn’t cause unnecessary blockings. I don't think this is correct! Context switches are expensive -- a small pipe size will force both processes to make more system calls to move the same amount of data through the pipe. In this light, the UNIX specification's requirement of 4 KB is definitely too small; even the Linux 2.6+ defa…