SUMMARY: Tru64 pipe buffer size

From: Iain Barker (ibarker@aastra.com)
Date: Mon Apr 11 2005 - 15:40:11 EDT


The problem was that the application detected whether its stdout was going to file (pipe) or term, and did buffering in the case of a file.

Thanks to John Lanier, who wrote:

Reference these parameters in the "vfs" kernel subsystem:

--> sysconfig -q vfs|grep pipe
pipe_maxbuf_size = 262144
pipe_databuf_size = 8192
pipe_max_bytes_all_pipes = 134217728

--> sysconfig -Q vfs|grep pipe
pipe_maxbuf_size - type=INT op=CRQ min_val=4096 max_val=1048576
pipe_databuf_size - type=INT op=CRQ min_val=4096 max_val=32768
pipe_max_bytes_all_pipes - type=INT op=CRQ min_val=819200
max_val=1717986918

In actual fact, there was an easier way around the problem in our particular situation: Pipe the output via the tee command.

It seems that tee opens its stdin as a term, and its output as a file handle. So it can happily sit in the middle of the pipe and do the required un-buffering.

- Iain

-----Original Message-----
From: tru64-unix-managers-owner@ornl.gov
[mailto:tru64-unix-managers-owner@ornl.gov]On Behalf Of Iain Barker
Sent: Wednesday, 06 April, 2005 14:57
To: tru64-unix-managers@ornl.gov
Subject: Tru64 pipe buffer size

Managers,

Is there any way to alter the buffer size used for the pipe (|) command on Tru64?

We have a third-party tool which writes line-by-line to terminal device, but when its output is piped it seems to be buffering the data in chunks of approx 4KB at a guess.

For example, assuming each line represents ~1.5K of data:

./foobar
a
b
c
d
e
f
end of data

./foobar | tee outfile
a
b
c
<20 minute wait>
d
e
f
end of data

thanks,
        Iain



This archive was generated by hypermail 2.1.7 : Sat Apr 12 2008 - 10:50:17 EDT