Difference between revisions of "Trickle"

From Noah.org
Jump to navigationJump to search
m
Line 20: Line 20:
 
   trickle -u 75 scp my_big_file.iso host.example.com:.
 
   trickle -u 75 scp my_big_file.iso host.example.com:.
  
To use with rsync you will need to use the -e option in rsync:
+
Newer versions of Rsync already has a "--bwlimit" option, so you may not need to use Trickle.
 +
To use trickle with rsync you will need to use the -e option in rsync:
 
   rsync -a -e "trickle -u 75 ssh" my_directory user@host.example.com:/home/user/backups/.
 
   rsync -a -e "trickle -u 75 ssh" my_directory user@host.example.com:/home/user/backups/.
Rsync already has a "--bwlimit" option, so you may not need to use Trickle
 
if --bwlimit works better for you.
 

Revision as of 18:33, 7 March 2007

Trickle - Simple Traffic Shaping

Trickle is a super-easy bandwidth limiter. It runs in userspace, so it's easy to install and does not require any extra kernel modules or firewall tweaks.

Ubuntu has trickle available via Apt or Aptitude:

  apt-get install trickle

For RedHat systems you need to install from source at Marius Aamodt Eriksen's Trickle site. You will also need to install libevent before building Trickle.

To use trickle simply put it before any network command that you want to run. You specify upstream bandwith with -u and downstream with -d:

   trickle -u 10 -d 50 your_command

I use Trickle mostly with rsync or scp. For example, say want to copy a large file and your maximum upstream bandwidth is 150 KB/s and you want to use only 75 KB/s for your copy operation:

  trickle -u 75 scp my_big_file.iso host.example.com:.

Newer versions of Rsync already has a "--bwlimit" option, so you may not need to use Trickle. To use trickle with rsync you will need to use the -e option in rsync:

  rsync -a -e "trickle -u 75 ssh" my_directory user@host.example.com:/home/user/backups/.