Trickle

Trickle is a program that can shape bandwidth of TCP traffic. I find it quite useful when I want to upload large files without eating up all the bandwidth, at least that is the most useful usage for me.

I have tried using trickled with tricked.conf but i find it somewhat useless, it\'s supposed to prioritize access to bandwidth depending on a per program basis. I set ssh to the highest priority and ncftp to lowest and yet ssh was still very chopped up, basically unusable, i \"probablly\" \"did\" \"something\" \"wrong\".. . : ] (links to good tutorials and such welcome)

However, by just using trickle as a normal user, with something like \"trickle [bandwidth]option program\" that works great for me.. . ..

Usage examples

Very simple, i\'m using ssh, i want to upload heavy files with ncftp. Ncftp uses up all of the little bandwidth available. I don\'t have a fancy router with QoS and stuff. What are you gonna do ??
First, what is the \"total\" bandwidth available ? By uploading normally with ncftp i notice the speed settles at about 90KB/s it\'s after that i can decide that 60 would suffice and leave engough space for SSH, and even some http....

So now all I need to do us launch ncftp all wrapped up in trickle and tell it to upload at 60KB/s as follows :

trickle -u 60 ncftp -u user host

You can use the -d switch to limit download speed in the same way, of course you can also combine both options

Limitations

This piece of software is used to set some limits, however it has some of it\'s own :

  • It can only deal with TCP protocol. This means it won\'t be able to do anything about UDP connections
  • It must use libc stack, to see if your program uses libc use : ldd /usr/bin/ncftp|grep libc this should print : libc.so.6 => /lib/tls/i686/cmov/libc.so.6 (0xb7e0c000)

comments:
avatar

Nux - http://www.nux.ro

Or use lftp which has built-in rate limits.
Or rsync -e ssh --bwlimit :-)
avatar

manu - http://manurevah.com

Yes of course.. (late is better than never..)

But trickle is good as in it works with programs that don't have built in bandwidth throttlers. So you can use:

trickle -d 20 chromium-browser

if you wanted to.. : ]
Leave a comment
You may use the following HTML tags: <p> <a> <strong> <b> <em> <i> <cite> <blockquote> <code> <pre>

Your comments WILL NOT be submitted to any third party (not even for anti spam verification).