Re: pipe buffer sizes
From: Jan Kandziora (jjj_at_gmx.de)
Date: 01/12/05
- Next message: Michael Kerrisk: "Re: pipe buffer sizes"
- Previous message: William Park: "Re: diskless bootup"
- In reply to: Bram Stolk: "Re: pipe buffer sizes"
- Next in thread: Bram Stolk: "Re: pipe buffer sizes"
- Reply: Bram Stolk: "Re: pipe buffer sizes"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Date: Wed, 12 Jan 2005 20:26:17 +0100
Bram Stolk schrieb:
>
> $ mpeg2dec | cat > /tmp/l
>
cat is a very slow software as it reads the input stream in very small
chunks. Rule: Never use cat, aside from concatenating files.
IMHO "cat" should refuse to work if not at least two input files are given.
To have a comparision, use buffer like you did above with cat.
$ mpeg2dec | buffer >/tmp/l
>
> My feeling is, that this can be faster.
>
The goal is to minimize context switches. As your writer seems to write big
chunks, change the reader so that it reads big chunks.
-- Jan
- Next message: Michael Kerrisk: "Re: pipe buffer sizes"
- Previous message: William Park: "Re: diskless bootup"
- In reply to: Bram Stolk: "Re: pipe buffer sizes"
- Next in thread: Bram Stolk: "Re: pipe buffer sizes"
- Reply: Bram Stolk: "Re: pipe buffer sizes"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Relevant Pages
|