[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Linux Pipe und Durchsatz


On Fri, Dec 15, 2006 at 10:01:25PM +0100, Markus Hochholdinger wrote:
> Hallo,
> 
> kennt von euch jemand ein Programm mit dem der Durchsatz einer Pipe dynamisch 
> angepasst werden kann? Quasi so eine Art Geschwindigkeitsregler. Ich stelle 
> mir das wie folgt vor:
> dd if=/dev/zero | XXX | dd of=/dev/null
> 
> XXX kann dabei im Betrieb gesagt werden: Mache maximal 1MB/s, alles was 
> schneller rein kommt wird "abgebremst".
> 
> Gibt es soetwas schon? Eigentlich muesste dd schon fast alles dafuer mitbringen, 
> nur der Regler fehlt ;-)
> Ist natuerlich auch die Frage wie man so ein Programm steuern muesste? Evtl. 
> ueber eine named pipe? Oder ueber eine Datei? stdin zum Steuern geht ja 
> schlecht ;-) Hm...

Hallo Markus,

Suchst du "buffer"?

sky@blackhole:~$ cat /usr/ports/misc/buffer/pkg-descr

This is a program designed initially to speed up writing tapes on remote
tape drives, but may be used as a general pipe buffering utility.
Note: You must have SYSVSHM support in FreeBSD kernel.

The program splits itself into two processes.  The first process reads
(and reblocks) from stdin into a shared memory buffer.  The second
writes from the shared memory buffer to stdout.  Doing it this way
means that the writing side effectly sits in a tight write loop and
doesn't have to wait for input.  Similarly for the input side.  It is
this waiting that slows down other reblocking processes, like dd.


-- 
Michael Sommer <><        | http://www.baptisten-weinheim.de/
                          | http://www.trickster.de/

-- 
http://mailman.uugrn.org/mailman/listinfo/uugrn