[adsl-qos] BitTorrent Woes
Dan Singletary
dvsing at sonicspike.net
Sun Mar 21 10:28:09 PST 2004
The number of open connections does not make a difference. Also,
dsl_qos_queue is not tcp-session-aware.. so you can have as many as you
want and it wont divide bandwidth depending on the number of sessions.
dsl_qos_queue only divides bandwidth based on fwmark, using a priority
queuing mechanism that will always empty the highest priority bucket,
although will occasionally send a packet from every bucket (To prevent
total starvation of a lower priority band by a higher).
-Dan
Frank Luithle wrote:
> On Saturday 20 March 2004 00:57, Daniel Brown wrote:
>
>
>>I've recently installed dsl_qos_queue to try and solve out perennial
>>problem here of the entire internet connection speed slowing down to
>>the speed of cold treacle whenever a BitTorrent is active, or someone
>>is using the Direct Connect service. It's done a fairly good job, but
>>there are still massive slow-downs occasionally. I've tentatively
>>concluded that the slow down is because of the many TCP connections
>>these two protocols open for even just one download. I would like to
>
>
> I'm using BT a lot, too, and I've had the exact same thought, but I don't
> think the number of simultaneously open connections makes any difference.
>
> What counts in the end is the amount of data leaving your interface, and
> that proper accounting is done by the queuing device (dsl_qos_queue does
> that).
>
> I'm not even using dsl_qos at the moment and I only start to get into
> trouble when the upstream is saturated (usually mostly always the case
> with BT) and the peers start sending me data really fast. But this is
> just an instantiation of the usual problem that too many small (ie. ACK)
> packets are generated and the huge overhead generated by them *on the
> modem line* makes your queue overflow.
>
>
>>specify a list or range of ports to squish into, say 15kB/s of
>>bandwidth, leaving some for other services. My theory is that at the
>>moment, dsl_qos_queue is detecting each TCP connection as wanting an
>>equal share of the upstram bandwidth, and because there are so many of
>>the blighters, they just guzzle up nearly all of the bandwidth.
>
>
> dsl_qos filters into one of six predefined classes by examining the
> fw_mark (a number assigned to the packet by iptables, the firewall).
>
> So what you have to do is make sure that all packets to and from BT
> clients are going into one class. You will have to filter ports 6880
> through 6889, both destination and origin, which will catch almost all of
> BT traffic (some peers might have a non-standard configuration that is
> using an entirely different port, but from several netstat lookups I've
> done on my machine I've learned that this is very rare).
>
> Mark all packets from/to these ports with a "6", maybe add the 'Direct
> Connect' traffic also and you will be fine. Don't use the mark "6" for
> other traffic.
>
> Always recall that if your upstream rate becomes to small, BT download
> rates go down to almost zero in no time (I've found that anything below
> 7-8 kB/s leads to really bad download rates).
>
> Again: I don't think the number of open connections does make a
> difference here.
>
> --Sigi
More information about the adsl-qos
mailing list