I'm running CentOS 5.7 and I have a backup utility that has the option of dumping its backup file to stdout
. The backup file is rather large (multiple gigabytes). The target is an SSHFS filesystem. To ensure that I don't hog the bandwidth and degrade the performance of the network, I would like to limit the speed with which data is written to the "disk".
How can I limit the ability of stdout
based on a byte number? For example, limiting a process's ability to write to about 768Bps.
Best Answer
You can add a rate limiting tool to your pipeline.
For example there is
pv
which has a rate-limiting option:An alternative is the tool
buffer
which has: