Jump to content
Not connected, Your IP: 3.147.73.201
tdam2112

Slow speeds in qBittorrent using AirVPN with GlueTun and Wireguard on macos

Recommended Posts

I've a 2014 Mac mini server setup and I'm using Docker to run qBittorrent.

I set up AirVPN on GlueTun using WireGuard as shown in the attached Docker Compose file. I've also set up port forwarding and tested it within the AirVPN port forwarding tool.
(I followed this guide https://www.youtube.com/watch?v=SQEqsaKN-Go&t=350s for reference).
 
My problem is that my torrent speeds are quite slow in qBittorrent (averaging 30-40Kbps), if I turn off the VPN I can easily hit speeds above 2-3Mbps. I'm wondering if I got something configured incorrectly, or if there are some settings I need to tweak on my end.

compose.yml

Share this post


Link to post

Thanks for the reply. 
Since I posted I did the following:
1. I switched server to one with a lower response time from me. This helped a bit, got speeds closer to 1Mbps, however only in new public torrents.
2. I rebuilt the Gluetun and Qbittorrent docker containers and speeds on some of the torrents up, I saw close to 3Mbps upload speeds, but download stayed low.
3. Tried turning off DHT and the speeds are down to 10-100 bps now... 
4. Turned DHT back on after keeping it off overnight and restarted the containers, but the speeds now linger around 1Kbps
 

Share this post


Link to post
On 2/23/2025 at 7:13 PM, tdam2112 said:

My problem is that my torrent speeds are quite slow in qBittorrent (averaging 30-40Kbps), if I turn off the VPN I can easily hit speeds above 2-3Mbps


Hello!

Please try to set WireGuard interface MTU to 1280 bytes. GlueTun's default is 1400 bytes which could be too large for your network. A too large MTU will cause major performance hit or even disconnections.. MTU size can be set through the WIREGUARD_MTU environment variable. "You can bind mount an ini Wireguard configuration file to /gluetun/wireguard/wg0.conf. "
https://github.com/qdm12/gluetun-wiki/blob/main/setup/options/wireguard.md

Another performance improvement can be obtained by configuring correctly the container in order to allow the torrent software to receive the incoming packets. Note that in your compose file you did not map the proper port in the ports: section and you did not define properly the FIREWALL_VPN_INPUT_PORTS environment variable, which should be set according to the port you remotely forwarded on your AirVPN account port panel.

EDIT: after a few minutes we published this message we noticed that your torrent software became reachable, so the above setting modifications are probably unnecessary.

Kind regards
 

Share this post


Link to post

I added the file with the reduced packet size. It didn't seem to make much difference, everything was still only a few Bps at best.
I tried changing servers (not much difference)

Then I switched the peer connection back to TCP & UDP and that improved things back to how it was before, as a benchmark, I'm getting roughly 1Mbps on an Ubuntu ISO.

I can't really tell if I'm hitting the limits of the peer connections through the VPN now or if I'm missing something else.

Share this post


Link to post

How many servers have you tried? From experimenting, I have found that the speeds from servers vary quite a bit.
I think it may be worthwhile trying out different servers, perhaps starting from the ones that give you the lowest ping? At least that's what worked for me, hope that helps.

Share this post


Link to post

Hi there,

Did you manage to solve the issue?

I'm also experiencing significantly slower speeds compared to without VPN.

I'm located in Asia with 2.5Gbit/s fiber.

When downloading Ubuntu ISOs, I get over 100MiB/s without VPN. But when connected to AirVPN (also under gluetun), I get less than 18MiB/s. For other less-seeded torrent files, I'm getting speeds less than 5MiB/s with airvpn, where I would get over 30MiB/s without vpn.
 

I have

  • enabled port forwarding in airvpn and passed it in gluetun and qbittorrent
  • disabled uPTP and NAT port forwarding in qB
  • enabled DHT, PeX, and local peer discovery in qB
Below are things that I have tried, but it made little to no difference:
  • Try OpenVPN and Wireguard
  • When using wireguard, adjust MTU from 1280 to 1420 (best I could get is MTU=1384 with download speeds at around 18MiB/s)
  • Select TCP only in qB
  • Tried servers with lowest latency: Taiwan (Sulafat 34ms), Japan (Okab 97ms), Singapore (Triangulum, Circinus, Antares ~40ms)
Is it normal to have such speed reduction when using AirVPN?

What else can I try?

Share this post


Link to post

Hello!

To discern whether your problems are GlueTun related or not, and qBittorrent related or not, please connect directly the host and test again. Also test, with and without GlueTun, performance with different protocols (not torrent).

Kind regards
 

Share this post


Link to post

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
  • Security Check
    Play CAPTCHA Audio
    Refresh Image

×
×
  • Create New...