From: Iain Barker <ibarker@aastra.com>
Subject: SUMMARY: Tru64 pipe buffer size
Date: Mon, 11 Apr 2005 15:40:11 -0400 [thread overview]
Message-ID: <ABD6885665C7C74DA65B21A1DB4E4A2F49A393@bilmail.aastra.com> (raw)
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
reply other threads:[~2005-04-11 19:40 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
read-only archive
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox