You are not logged in.

#1 2010-11-25 21:47:34

eDio
Member
From: Ukraine, Kyiv
Registered: 2008-12-02
Posts: 422

Is it possible to low bittorent traffic priority below the others

Hello.
For a long time I've experienced the problem, when bittorrent client, caused im client to disconnect frequently.

I've heard something about some windows program, which is able to low bittorrent traffic priority, and thus, it helps to avoid frequent disconnects.
Also, I'm connected to internet with ADSL modem/router D-Link 2500U, which is said to has QoS implementation.

So, my question is: is it possible to resolve this bittorrent issue, using some linux sw, or using QoS of my router?.

Thanks.

Offline

#2 2010-11-25 22:04:37

Xehoz
Member
From: Portugal
Registered: 2010-07-27
Posts: 31

Re: Is it possible to low bittorent traffic priority below the others

I believe this will do the trick:

 iptables -t mangle -A PREROUTING -i eth0 -p tcp --sport 22 -j TOS --set-tos 2

Replace --sport 22 with whatever port(s) you need. --set-tos 2 means minimal cost. It should deprioritize incoming traffic from that port.

Offline

#3 2010-11-25 22:07:20

thestinger
Package Maintainer (PM)
From: Toronto, Canada
Registered: 2010-01-23
Posts: 478

Re: Is it possible to low bittorent traffic priority below the others

If your router doesn't end up doing QoS (or doing it well), you can also pair iptables + tc (from iproute2) and get the same type of thing.

Offline

#4 2010-11-25 22:24:25

hexanol
Member
From: Canaduh
Registered: 2009-08-04
Posts: 95

Re: Is it possible to low bittorent traffic priority below the others

Xehoz, I don't think the 'PREROUTING' chain is the right one for this... it would more be the OUTPUT chain or the POSTROUTING chain.

Also, you could use the DSCP target instead since it's a more modern version of QoS than TOS. That depends on what your router supports.

Offline

#5 2010-11-25 22:33:45

eDio
Member
From: Ukraine, Kyiv
Registered: 2008-12-02
Posts: 422

Re: Is it possible to low bittorent traffic priority below the others

That's awesome. So many replies! smile

At first thanks for pointing me to iptables.
Going to read mans and to play around these advices as soon as possible.

Thanks once more.

Offline

#6 2010-11-25 22:38:06

hexanol
Member
From: Canaduh
Registered: 2009-08-04
Posts: 95

Re: Is it possible to low bittorent traffic priority below the others

Also, note that this might not resolve your problem, and you might want to start by looking at the different configuration options your torrent client offers (like lowering the number of connections, etc) before going the QoS route. QoS will allow you to lower the priority of the torrent traffic, but it won't drop packet or other stuff.

Offline

#7 2010-11-25 23:49:04

tomk
Forum Fellow
From: Ireland
Registered: 2004-07-21
Posts: 9,839

Re: Is it possible to low bittorent traffic priority below the others

Limit your bittorrent upload traffic to approx 75% of the maximum available. How you do this will depend on the bt client you're using.

Offline

#8 2010-11-26 00:05:09

thestinger
Package Maintainer (PM)
From: Toronto, Canada
Registered: 2010-01-23
Posts: 478

Re: Is it possible to low bittorent traffic priority below the others

eDio wrote:

I've heard something about some windows program, which is able to low bittorrent traffic priority, and thus, it helps to avoid frequent disconnects.

I just realized that you were probably thinking about utorrent, which can do bandwidth management and throttle itself to avoid interrupting your browsing etc. There's a linux client now (with an AUR package), so you might want to check that out.

It's closed source though.

Last edited by thestinger (2010-11-26 00:06:00)

Offline

#9 2010-11-26 07:16:29

eDio
Member
From: Ukraine, Kyiv
Registered: 2008-12-02
Posts: 422

Re: Is it possible to low bittorent traffic priority below the others

2hexanol
I've tried lowering the number of connections... down to 50 connections at all (global limit). I believe, this is a small number.

2tomk
Already limited. I have 4Mb/1Mb connection, and bittorrent is constrained to use only about 0.5Mb/0.5Mb. The problem persists.

2thestinger
No, I'm not talking and  thinking about µtorrent. My friend works under windows and uses µtorrent, but he experiences the same problem. Now I just realized that connection may be dropped by ISP, which is the same for both of us. Anyway, I will try to solve the problem by lowering bt priority.

Last edited by eDio (2010-11-26 07:36:54)

Offline

#10 2010-11-28 10:12:10

eDio
Member
From: Ukraine, Kyiv
Registered: 2008-12-02
Posts: 422

Re: Is it possible to low bittorent traffic priority below the others

Ok, I've taken Xehoz's and hexanol's advices and added iptable rules both for PREROUTING and POSTROUTING chains.
Something has been definitely changed. Before adding rules, people on my contactlist could see me going offline, and so coudn't send me any message, after some delay, I could see, that I'm offline.

And now, I see, if I'm offline, but other people see me online, and so, they can send me messages, which I won't be able to see, as they will be dropped out.

I'm trying to play around this, but I'm not good with networks at all, so it is hard for me.
I will reply to this thread, in case of any progress.

Offline

Board footer

Powered by FluxBB