Why do Torrents cripple my network so much?

Associate
Joined
4 Dec 2008
Posts
1,620
Location
Sheffield
Hi all.

Why is it that even if a torrent is theoretically using very little bandwidth, ie 20kbps up/20kbps down, it brings my network to its knees?

I'm using virgin 50 meg and Wireless N throughout and if I eat almost all of it, say downloading a file at 4.8mbps I can still browse the internet hapilly.

As soon as someone starts a torren it kills the network. any torrent, any client.

Are they just really inefficient or is there a way to prevent this? Thanks
 
Associate
Joined
13 Nov 2009
Posts
1,107
Hi all.

Why is it that even if a torrent is theoretically using very little bandwidth, ie 20kbps up/20kbps down, it brings my network to its knees?

I'm using virgin 50 meg and Wireless N throughout and if I eat almost all of it, say downloading a file at 4.8mbps I can still browse the internet hapilly.

As soon as someone starts a torren it kills the network. any torrent, any client.

Are they just really inefficient or is there a way to prevent this? Thanks

I believe it is due to the number of connections the client is maintaining all the time. I think all torrent clients have a way of limiting the max number of connections they can make. This is particularly important to do if you are sharing your connection amongst several people.

Typically halving the default max number will not affect torrent speed at all. Try playing around with it and see what results you can get.

This is the settings page you want to look at in utorrent as an example. I think this person has too many.

Hope that helps. :)
 
Soldato
Joined
18 Oct 2003
Posts
19,413
Location
Midlands
In your torrent client you may have let it use what it thinks is a suitable number of simultaneous connections.

Even with super broadband, if you are connecting to, or letting connect to you, 500 people, its going to be slow as you are saturating your line.

That's as far as I understand. Tolien will be along soon to tell you thats a load of twoddle.
 
Soldato
Joined
29 Jul 2003
Posts
7,664
I bet you're using utorrent? I had exact same problem, no matter what I do with settings.

I switched to bit torrent, problem gone
 
Soldato
Joined
29 Jul 2003
Posts
7,664
Yeah I used azurus at first, using old machine as a download box. The reason I moved to utorrent cos 256mb ram couldn't cope 100mb+ java but utorrent slow down my whole network then I switched to bit torrent. Very happy now
 
Associate
Joined
22 Jun 2009
Posts
397
Location
Liverpool
I believe it is due to the number of connections the client is maintaining all the time. I think all torrent clients have a way of limiting the max number of connections they can make. This is particularly important to do if you are sharing your connection amongst several people.

Yeah i've found this to be the case. If i have utorrent on the default unlimited connections he just goes mad and keeps trying to establish connections eating up the whole of the network bandwidth. Try limiting your global connections to 75 and increase it from there to see how the network responds.

I've found that the download speed limiter doesnt affect it as much as i thought so leave that free and just fiddle with the connection numbers.

You could also try limiting your upload speed to maybe 20kb/s or so to see if that makes a difference.
 
Soldato
Joined
18 Aug 2007
Posts
9,704
Location
Liverpool
Don't forget that the router itself could be a limiting factor as well. If you're using the one supplied by VM it'll be bottom of the range and likely a bottleneck in this instance, regardless of your connection.

Switching to a router with better firmware (and thus routing) and more horsepower can help. For example, I think I read the DIR-615 VM supply is limited to about 30 connections at a time. A WRT with Tomato can handle thousands of connections at once. Big difference!
 
Man of Honour
Joined
13 Oct 2006
Posts
91,051
Limiting connections won't help that much... the problem is 2 dimensional - not only is the client maintaining a lot of connections at the same time - on most torrents it will be creating and dropping lots of new connections - often at a faster rate than the routing hardware can handle as its not finished killing off the old connections fast enough and making lots of new ones causing the routing table, etc. to fill up - causing everything to go slow.

The only way to really solve this is to shift the problem elsewhere - by using a remote server and an encrypted tunnel between the torrent client and the remote server. This removes the need for your local network/hardware/ISP from having to handle all the connections.
 
Last edited:
Soldato
Joined
21 Oct 2002
Posts
18,022
Location
London & Singapore
Only old and/or crap routers have problems with Torrents these days.

I remember when the average consumer router would just crash as soon as you got past some arbitrary number of connections, usually not more than a couple hundred.

And to be honest, once a torrent is up and running... the connection cycling rate is pretty minimal. Not really all that much higher than tabbed web browsing.

The best thing to do if you have a crap router is to set your Torrent client software to limit the maximum number of connections. Start off at say 100, then increase it by 50 or 100 until it starts to impact or crash. Many Torrent clients today also allow you to adjust the number of new connections they are allowed to make within a given time period. Set this to just 1 new connection per say 10 seconds. Obviously this will mean it will take a bit longer for a Torrent to 'get up to speed' once you just start it. But it's a setting that you can play with to find the right balance for a crap router.
 
Permabanned
Joined
28 Dec 2009
Posts
13,052
Location
london
they could be shaping traffic.

makes sure you use utorrent, turn off dht and peer exchange etc, force encryption, untick allow legacy connections.

use global 200 connections, 50 connections per torrent, 4 upload slots per torrent. only download 1 or two at a time. cap your upload and download below your max up and down. leave over head.

i use this on a 50mbit virgin and it works well, i found some public trackers are the problem, like open bittorrent can be very slow sometimes.

could also try switching dns, http://www.dnsserverlist.org/

then if you see that helps if you want to turn back on dht and peer exchange and see if it is the problem. but the connections should be ok. as that works for me, if that does not fix it then it could be something else
 
Last edited:
Man of Honour
Joined
13 Oct 2006
Posts
91,051
Only old and/or crap routers have problems with Torrents these days.

I remember when the average consumer router would just crash as soon as you got past some arbitrary number of connections, usually not more than a couple hundred.

And to be honest, once a torrent is up and running... the connection cycling rate is pretty minimal. Not really all that much higher than tabbed web browsing.

The best thing to do if you have a crap router is to set your Torrent client software to limit the maximum number of connections. Start off at say 100, then increase it by 50 or 100 until it starts to impact or crash. Many Torrent clients today also allow you to adjust the number of new connections they are allowed to make within a given time period. Set this to just 1 new connection per say 10 seconds. Obviously this will mean it will take a bit longer for a Torrent to 'get up to speed' once you just start it. But it's a setting that you can play with to find the right balance for a crap router.

This is where the problem lies - most routers are based on a version of unix/linux... which means connections going into FIN_WAIT state can take 2+ minutes to clear - if your making 1 connection every 10 seconds and on anything other than a fairly small seeded torrent your quickly pushing more connections in than the router is clearing.

Tabbed browsing can have similiar numbers of concurrent connections but its not cycling as fast as a well seeded torrent - tabbed browsing is giving the router more of a chance to do its thing.

Some torrent clients are more well behaved than others as well even with the same settings for connections.


EDIT: This depends a lot as well on the nature of the torrent - a private well setup tracker will probably have a number of dedicated seeders so you have much less connection cycling going on - a public/distributed tracker will be cycling like mad on a torrent with 500+ seeds and cripple most average consumer routing hardware.
 
Last edited:
Soldato
Joined
20 Aug 2008
Posts
6,823
This is my thread: http://forums.overclockers.co.uk/showthread.php?t=18103359

I was having the same problem, I have found that the way to solve this is to limit the upload to 5kbps or less, the download can be whatever you like I think. I'll post up all of my settings from utorrent next later when I'm back on my desktop.

This ^.... I have my upload set at 5kb/s and the internet is fine. If i set it to unlimited my internet gets crippled
 
Caporegime
Joined
22 Nov 2005
Posts
45,255
I bet you're using utorrent? I had exact same problem, no matter what I do with settings.

I switched to bit torrent, problem gone

you need to untick
Enable DHT Network
Enable DHT for new torrents
Enable local peer discovery

if your routers not very good
 
Soldato
Joined
26 Jun 2009
Posts
3,023
Location
Sheffield
I have a Netgear DG834G V5 and I did all of that, still have to limit to 5bkps upload. Even then it cuts my speedtest.net speeds from 5.3mbps down and 0.24mbps up to 3.1mbps down and 0.10mbps up.

It's clearly bodged, but it works now.

Max Upload: 5kB/s
Max Download: Unlimited
Max Global Connections: 100
Max Connected Peers Per Torrent: 20
Number Upload Slots Per Torrent: 5

Port also fowarded on the router.
 
Associate
Joined
17 Jan 2004
Posts
483
Alfie said:
Why is it that even if a torrent is theoretically using very little bandwidth, ie 20kbps up/20kbps down, it brings my network to its knees?
Too many concurrent outgoing connections or connection attempts. Yes, even with default uTorrent settings for some people on Vista and above where patching tcpip.sys isn't done. Cut down the 'Global max connections', 'Max peers per torrent' and 'Upload slots per torrent' in accordance with your upload bandwidth and also test with bt.connect_speed = 5 and net.max_halfopen = 4 (or lower) in the advanced tab.

Upload speed 75% of your line capacity, disable DHT and local peer discovery as arknor suggested. Don't use the resolve IPs option in the peers tab.

The DG834G V5 (Connexant) is a crap router by all accounts; the V4 (Broadcom) was the best one in the series.
 
Soldato
Joined
21 Oct 2002
Posts
18,022
Location
London & Singapore
This is where the problem lies - most routers are based on a version of unix/linux... which means connections going into FIN_WAIT state can take 2+ minutes to clear
Actually it's the SYN_SENT which causes the most problems. Otherwise known as "half-open connections".

A TCP connection in this state uses far more memory than one in the FIN_WAIT state.

And yes public trackers are worse for it than private trackers. Because the peer/seed cycling is a lot higher, generally. But also because many people don't bother to map the port number. So the connection remains in the half-open/SYN_SENT state for X amount of seconds/minutes.

A tip is to check whether your router lets you modify its various NAT timeout policies. Because you could set the half-open connection timeout to say 15 seconds. That should really help cut down on resources.
 
Soldato
Joined
18 Aug 2007
Posts
9,704
Location
Liverpool
This is where the problem lies - most routers are based on a version of unix/linux...

Just to add to NathanE's comprehensive reply; the problem isn't because they are based on 'a version of Unix/Linux', but rather shoddy implementation by certain companies' firmware writing. Embedded Linux is actually ideal for this kind of application, which is why the majority of these kinds of devices worldwide actually use it. :D

Written and executed properly (eg Tomato firmware with speedmod), a Linux router is the best you can get; often matching commercial hardware worth many times the sum spent on a small consumer Linux (hence mod-able) device. :) Tomato has a lot of NAT, conntrack and routing tweaks designed to allow many thousands of connections, with fast recycling, for this very reason.

Sorry for butting in, I just hate to see Linux given a bad rap for no reason. :)
 
Back
Top Bottom