Take the 2-minute tour ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

recently i did download big torrent files. (120 Gb). and i need to seed them back to at least 1.5 ratio. my upload speed is 130 Kb/s max.

the problem is that i need to seed them as fast as possible. but i browse the web a lot. and browsing with no upload left, can be very frustrating.

I'm looking for something like this,

  • torrent are on max. seeding rate, but when the browser needs the bandwidth, it gets it. priority is to web browser, but when not needed, torrent can be at max.
  • i'm aware that i can change torrent client max speed. but doing it manually everytime and every 5 minutes or so, is hard.

Info:

  • i'm using firefox/chrome
  • my torrent client is Ktorrent
  • i'm on 11.10 with unity
  • i do have a router, it's a HAG. and i can't access all it's properties.

is this possible even? changing the priority in the system monitor for the applications can do the job?the nice value i mean. is there a way to set priority bandwidth usage for different apps?

thank you!

share|improve this question
    
What you need is traffic shaping. Here is a 'Linux Advanced Routing & Traffic Control HOWTO' lartc.org –  Anonymous Nov 24 '11 at 19:40
    
it's more than 150 pages. wow. a lot to read, i tried but i didn't understand a thing :) thanks, useful nonetheless. :) –  suli8 Nov 24 '11 at 23:16
    
This question appears to be abandoned and unanswered, could you perhaps add more detail to your question? If this question no longer applies then you can either delete it or answer it yourself if you've solved the problem. Thanks! –  fossfreedom Mar 21 '12 at 21:08
    
no i didn't find an answer yet. i will edit the question, and if not answered i will delete, as it seems it's not possible to do so. i just need a confirm that's not possible at the moment –  suli8 Mar 22 '12 at 9:09
    
What is your uplink, consumer broadband or something else? Bufferbloat might explain your symptoms, and there is very little you can do to it even with QoS (traffic control) on your end. –  taneli Mar 22 '12 at 9:24
add comment

1 Answer

up vote 4 down vote accepted

As the comment above suggested, you will need Traffic Shaping. One of the most known program is Wonder Shaper. However I would recommend Trickle, because this software is more userfriendly.

Trickle runs in userspace and uses LD_PRELOAD to inject some own networking libraries. You can install it using apt-get install trickle (or any other tool you like). Normally you would use Trickle like:

trickle -d 1234 -u 567 my_software

Where -d is the download rate (1234 KB/s in the above example), -u upload rate (567 KB/s) and my_software is any software like Firefox, BitTorrent or else.

In your case it makes more sense to use trickled with an own trickled.conf. This configuration file should look like the following example:

[bittorrent]
Priority = 8
[www]
Priority = 1

So WWW has the highest priority, while BitTorrent gets the lowest. So Trickle will make sure, that browsing is always possible. Further details in setting up Trickle are in trickled.conf(5) and trickled(8).

share|improve this answer
    
thanks a lot! this is what i was looking for. accepted and appreciated. –  suli8 Apr 1 '12 at 20:57
    
@qbi "bittorrent" is an actual/working section? Where are sections documented? Also, does trickled require sudo? –  medigeek Oct 16 '12 at 16:36
    
How to write config file for priority? –  totti Jan 10 at 17:56
    
trickle runs entirely in userspace and does not require root privileges. cf. homepage –  Philippe Gachoud Feb 8 at 13:10
    
Just did actually the trick as mentionned above and doesn't work... with firefox and ktorrent with trickeld -vv -N2 before to watch, and tricled.conf as is but doesn't work :-( –  Philippe Gachoud Feb 8 at 14:18
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.