pipe buffer size can be set from c using fcntl(). Can it be done directly from a shell script?
fcntl()
Setting pipe size should be possible with command pipesz from package util-linux.