I'm using znapzend to do some backups and unfortunately its flooding my gigE connection. I would like the ability to ratelimit znapsend. Something like:

zfs send | pv -L 200m | ssh $host zfs recv

Any suggestions?

  • Which OS are you using?
    – mzhaase
    Sep 23, 2016 at 12:53

2 Answers 2


You could try limiting mbuffer, which znapzend uses:

-r <rate> : limit read rate to <rate> B/s, where <rate> can be given in b,k,M,G

You may need to alias the mbuffer executable itself if it cannot be done by configuration file:

# initially (for testing, I believe this is only for the current shell):
alias /usr/bin/mbuffer-limited="/usr/bin/mbuffer -r 10M"

# in znapzendzetup:
[...] --mbuffer=/usr/bin/mbuffer-limited [...]

You also could add a feature request on the Github page, it might be implemented.

  • even better, fork znapzend, make the change and create a PR for this feature! Sep 23, 2016 at 18:25
  • 1
    @TobiOetiker I think passing through all mbuffer options would be better in the long term, as those options might change (update needed) and it is already pretty transparent in regards to znapzend.
    – user121391
    Sep 27, 2016 at 9:08
  • I agree, that is a sensible aproach Sep 28, 2016 at 4:13

See Introduction to Linux Traffic Control. As an alternative you could prioritize your traffic rather than rate limit so you still get fast backups.


Linux offers a very rich set of tools for managing and manipulating the transmission of packets. The larger Linux community is very familiar with the tools available under Linux for packet mangling and firewalling (netfilter, and before that, ipchains) as well as hundreds of network services which can run on the operating system. Few inside the community and fewer outside the Linux community are aware of the tremendous power of the traffic control subsystem which has grown and matured under kernels 2.2 and 2.4.

This HOWTO purports to introduce the concepts of traffic control, the traditional elements (in general), the components of the Linux traffic control implementation and provide some guidelines . This HOWTO represents the collection, amalgamation and synthesis of the LARTC HOWTO, documentation from individual projects and importantly the LARTC mailing list over a period of study.

The impatient soul, who simply wishes to experiment right now, is recommended to the Traffic Control using tcng and HTB HOWTO and LARTC HOWTO for immediate satisfaction.


You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .