Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

In Linux, a single download can use all available bandwidth, so that any other connection can't be started. (e.g. if I am downloading updates, I can't surf the web at the same time)

Is there a way to set some kind of fair queueing between different connection, to allow for sharing?

I checked tc with sfq qdisc, but it seems one has to tune it to the current available bandwidth, which could be difficult on xDSL, where maximum downstream bandwidth could not be fully available depending on the provider.

share|improve this question
add comment

4 Answers

Check out Wondershaper: http://lartc.org/wondershaper/ - it's pretty much built for this.

Ubuntu thread: http://ubuntuforums.org/showthread.php?t=25911

Freshmeat Overview: http://freshmeat.net/projects/wshaper/ :

Many cablemodem and ADSL users experience horrifying latency while uploading or downloading. They also notice that uploading hampers downloading greatly. The wondershaper neatly addresses these issues, allowing users of a router with a wondershaper to continue using SSH over a loaded link happily.

share|improve this answer
    
I tried it and it works! Unfortunately, one has to measure downstream and upstream bandwidth before launching it (it uses tc in the end), so it's not adaptive. I wonder how Win* does it, though. –  Metiu Sep 18 '09 at 12:55
add comment

It is also possible to use Trickle for that

share|improve this answer
add comment

A quicker temporary fix that may yield some benefit is to write a couple of iptables rules for outgoing packets to give a different Type-Of-Service for SYN packets (i.e. what is sent for a new connection request - a new web page to load) and incoming SYN-ACK.

You could probably extend this to test for port number(s) too etc and maybe make use of the state table that iptables keeps for connection sessions.

share|improve this answer
add comment

I've personally never tried any applications for bandwidth throttling, but if you'd like a good place to see some applications for Linux, check out the "external links" section of the Bandwidth throttling Wikipedia entry.

Amongst the mentioned solutions, I've heard about trickle and Squid based implementations (like in the Bandwidth Limiting HOWTO).

share|improve this answer
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.