Bad performances with torrents

Recommended Posts

I'm experiencing bad performances with AirVPN. I want to use it for torrent download/upload only, on a Lubuntu 15.10 dedicated torrent box that I've made out from an Asus eeeBox B202. I'm using the network manager to connect, because the AirVPN application never worked on my system (never got past the login screen, the system simply freezed and stopped working)

At first I was using Transmission, but the speed was really unstable and kept fluctuating from 0 to 60-70 kB/s in download, with every torrent I've tried (UDP with default port). So i've read about the protocol issues with some ISPs and I switched to TCP, port 80. This improved the top speed (120-130 kB/s) but it was still fluctuating with a sawtooth-like pattern.

I've tried to change my torrent Client and I've installed Deluge. Things got better, but still not as I'm expecting: now download speed fluctuates from 120-130 kB/s to 350-400 kB/s but if I close the VPN connection I get a solid 580 kB/s (my connection maximum speed) without any fluctuation.

I'm using the European servers to connect (I've selected "Europe" in the OpenVPN files generation).

» I am not an AirVPN team member. All opinions are my own and are not to be considered official. Only the AirVPN Staff account should be viewed as such.

» The forums is a place where you can ask questions to the community. You are not entitled to guaranteed answer times. Answer quality may vary, too. If you need professional support, please create tickets.

Ok, so if I understand correctly the issue is in raw CPU peformances with OpenVPN. But from system monitors, CPU load never exceeds 50% or so, even with OpenVPN running. Maybe is more a software-related problem with OpenVPN itself?

Share this post

Link to post

Deluge specifications Preferences: Bandwidth Global Settings Maximum Connections 250 (You may never see this many connections depending on your per-torrent and active-torrent limits.) Maximum Upload Slots 4 (Let libtorrent manage this for you. It will open more upload slots as necessary to utilize available upstream bandwidth.) Maximum Download Speed 80 - 95% of tested download speed (Be careful of setting this too high--it can strangle your browsing, media streaming, etc. and other people who use your connection.) Maximum Upload Speed 80% of tested upload speed (Upload speed is the limiter for most p2p applications.) Maximum Half-Open Connections: 10 - 50 (Unless you've got a Windows install with limited half-open connections. Then this should be 80% of that limit.)

Everyone got all excited when it was noticed that Microsoft had initially limited half-open connections in XP and Vista to small numbers. As a plethora of hacks came out to remove this limit, somehow "half-open connections" became the scape-goat for slow download speeds. Suddenly it became de riguer to advise Windows users to hack the TCP/IP driver and set their half-open connections to something huge, like 200.

Most users have no need for a setting that high, and Microsoft has removed the original limit in later releases/patches, and made it user-adjustable. (Do not patch your tcpip.sys or whatever--just update to the current official release.) The reality is that half-open connections should--rapidly--resolve to fully-opened connections or be timed-out, so you really don't need that many of them hanging around, anyway.

While a basic premise of bit-torrenting is a big-ol' "swarm" of peers, you, as a single client, can spread yourself too thin. You're more helpful to the swarm by feeding a limited number of peers with a steady, thick stream of data, than you are by spraying out droplets of data to a huge number of peers.

So, you should limit your upload slots based on your upload speeds to make sure that each connected peer is getting a reasonable amount of bandwidth.

You should limit your number of connections because it take resources to keep track of each connection, and why track connections that are giving you a trickle if any data? One peer feeding you 5 KiB/s is worth 50 peers flickering at 0.1 KiB/s. Similarly, you don't want/need to be keeping track of a large number of peers waiting around hoping one of your upload slots comes free.

You can, by setting the per-torrent maximums to less than the global maximums, prevent a single torrent from using up all the allocated bandwidth and forcing all of the other (auto-managed) torrents to pause. But there is no advantage to increasing your number of active torrents. Indeed, by letting the torrent with the best speeds dominate, it will finish as quickly as possible and then stop competing for resources with the other torrents in the queue.