qBittorrent + OpenVPN Speed Issues

Other platforms, generic questions.
Post Reply
dinjo

qBittorrent + OpenVPN Speed Issues

Post by dinjo »

Anyone using qbittorrent with VPN i was getting slow speeds with it I'm on Debian.
ciaobaby

Re: qBittorrent + OpenVPN Speed Issues

Post by ciaobaby »

That's the way it is with pretty much all VPNs, you can't forward a listening port, so the communication between peers suffers and the data transfer rates are reduced because there is the extra processing in encryption and decryption.
dinjo

Re: qBittorrent + OpenVPN Speed Issues

Post by dinjo »

I have used rTorrent and Deluge and there is no speed loss in there
PeterR

Re: qBittorrent + OpenVPN Speed Issues

Post by PeterR »

1) I would really like to know who your VPN provider is... because NO degradation must be magic.

2) While ciaobaby makes a good point, he did not ask the question. Are you using encryption? Even so, degradation due to encryption should be at most 5-15% even with fairly under powered hardware.

3) I would strongly recommend that you take a hard look how you are connected to each peer and tracker you are connected to. If you are truly seeing 0 speed loss via the VPN then it is extremely likely that you are not using it the way you think you are. route, netstat and traceroute or some GUI version of their features should be in your toolkit. As I understand it, OpenVPN on a desktop installs much like a dialer would under Windows. Creating a new virtual IP address and setting that as the default gateway for IP traffic. If that is the case, it is possible that qBT is correctly binding to the virtual IP created by OpenVPN and the others are not. If that is true, it very very bad for you!

That said, my ISP yields sustained 1.5mb down / 150k up. While using the VPN my up speed is not noticeably affected but my download speed peeks at a little under 700k. This holds true for non-torrent traffic as well as every torrent client I have used, which is most of them... I live in a major city not to far from a major telco POP (Point of Presence, not to be confused with email POP3) so there are perhaps some traffic routing issues that you and I do not share.

I am using http://torguard.net/ via OpenVPN, but running it on a rather under powered DD-WRT capable router using 256-bit AES encryption. I am using Linux, but I am using xUbuntu (14.04) Prior to this setup, I used a socks proxy which I found to be leaking in a bad way...

OpenVPN has some weaknesses if generically installed. There is no inherent mechanism to report a lost VPN connection. So if the server drops you, your torrent activity will only stop for as long as it takes to retry, as the torrent client will re-establish connections through the new non-VPN gateway in less than a minute.  The fact that there are multiple i/f connections and applications can actually bind to the wrong one is just one example.
Rainmaker

Re: qBittorrent + OpenVPN Speed Issues

Post by Rainmaker »

[quote="ciaobaby"]
That's the way it is with pretty much all VPNs, you can't forward a listening port, so the communication between peers suffers and the data transfer rates are reduced because there is the extra processing in encryption and decryption.
[/quote]

This isn't actually true. You can't forward ports over PPTP, IPSEC etc but most OpenVPN providers offer port forwarding. In the case of some (eg AirVPN) you can forward up to 20 ports and even add reverse DNS to have an URL pointing to your service securely and anonymously behind the VPN.

I have a 160Mbps cable line and with AirVPN I get approximately 150Mbps down on well seeded torrents using qBittorrent on Linux and Mac OS X. OP double check your settings and ensure you have decent connections per torrent (eg 250) and globally (eg 1,250 for 5 torrent max). Also ensure you have 8 upload slots per torrent and experiment with enabling and disabling utp. Finally you should ensure you have set a sane upload limit. By default it's set very low (IIRC about 50KB/sec) and this will hinder you on a high speed connection. I cap mine to 1,228KB/sec (leaving a reserve of my real upload for other activities). You should also rule out issues with your VPN provider and ISP.

If all else fails try a complete purge of the app (eg in Synaptic or via terminal) and then reinstall from fresh with no residual config files.
Last edited by Rainmaker on Wed Mar 11, 2015 7:43 pm, edited 1 time in total.
Switeck

Re: qBittorrent + OpenVPN Speed Issues

Post by Switeck »

If you have a high upload speed (>1 MegaBytes/sec), you may want to use more than 8 upload slots per torrent if most of the peers on the torrent cannot offer >100 KiloBytes/sec upload to you in return. This can happen even if the peers/seeds are on fast lines themselves due to them trying to upload on >10 active torrents at once. Otherwise, you'll be uploading >100 KB/sec to them and getting maybe 5-20 KB/sec back in return.
Rainmaker

Re: qBittorrent + OpenVPN Speed Issues

Post by Rainmaker »

[quote="Switeck"]
If you have a high upload speed (>1 MegaBytes/sec), you may want to use more than 8 upload slots per torrent if most of the peers on the torrent cannot offer >100 KiloBytes/sec upload to you in return. This can happen even if the peers/seeds are on fast lines themselves due to them trying to upload on >10 active torrents at once. Otherwise, you'll be uploading >100 KB/sec to them and getting maybe 5-20 KB/sec back in return.
[/quote]

Cool, thanks I didn't know that! I got the 8 upload slots idea from an old Azureus settings calculator. How many upload slots would you recommend? Here's my connection:

Image

BTW just like the OP I'm on Linux too. Thanks in advance!
Switeck

Re: qBittorrent + OpenVPN Speed Issues

Post by Switeck »

12 mbit/sec should yield about 1400 KiloBYTES/sec, but due to the ISP (Virgin Media Cable in the UK) it may only sustain about 1000-1200 KiloBYTES/sec.
Upload speeds may be lower during peak evening hours (6 PM to 10 PM), so you may want to use qBT's scheduler to reduce DL+UL speeds then.

With the newest versions of qBitTorrent, you can disable upload slots per torrent limits and just use global upload slots.

The question is: Do you want to sustain high upload speeds to others or do you want to maximize download speeds?

High download speeds would best be sustained by having so many global upload slots that each only gives about 20 KB/sec on busy public torrents. That would be 50-60 global upload slots to be split between all active torrents.
But if you're predominately only seeding and/or on torrent swarms with very fast peers+seeds, you might want to only have 10-25 global upload slots.
With fewer upload slots, do test for awhile (at least an hour) that your upload speed max is actually reached when you have >20 peers connected. If not, you may want to increase upload slots till max upload speed is reached.
Rainmaker

Re: qBittorrent + OpenVPN Speed Issues

Post by Rainmaker »

Thanks so much for the detailed and helpful reply. :) I'll have a play around and see what works best.
Post Reply