jborg / attic

Deduplicating backup program
Other
1.11k stars 104 forks source link

Add bandwidth limit support #103

Open jborg opened 9 years ago

jborg commented 9 years ago

Useful to prevent Attic from saturating an upstream link or hogging too much cpu

Similar to rsync --bwlimit and scp -l

Original discussion: http://librelist.com/browser//attic/2014/8/4/is-there-a-bandwidth-limit-setting/

liori commented 9 years ago

On many POSIX systems you can use trickle (http://monkey.org/~marius/pages/?page=trickle) for that without having attic implementing it explicitly.

skarekrow commented 9 years ago

As it was discussed in the ML, trickle shapes sockets and attic uses a pipe through ssh. Thus it doesn't work with Attic.

jdchristensen commented 9 years ago

I just tested trickle on Ubuntu 14.04, and it works fine with a pipe through ssh. I created a shell script test-trickle.sh containing:

!/bin/sh

cat 10MB | ssh gorilla "cat > /tmp/10MB"

and then ran

trickle -u 10 ./test-trickle.sh

It was very slow, as expected.

Nevertheless, this would be a nice feature to have built-in.

skarekrow commented 9 years ago

I have tried it using attic itself, and it did not shape the traffic at all. I possibly used it wrong, but it's been a while so I can't even remember what I did. YMMV I suppose, it's cool that it works with a pipe, but for whatever reason it did not with attic making a pipe. On 10/6/2014 1:51 PM, Dan Christensen wrote:

I just tested trickle on Ubuntu 14.04, and it works fine with a pipe through ssh. I created a shell script test-trickle.sh containing:

!/bin/sh

cat 10MB | ssh gorilla "cat > /tmp/10MB"

and then ran

trickle -u 10 ./test-trickle.sh

It was very slow, as expected.

Nevertheless, this would be a nice feature to have built-in.

— Reply to this email directly or view it on GitHub https://github.com/jborg/attic/issues/103#issuecomment-58071787.

rpodgorny commented 9 years ago

confirming trickle does not work with attic