Jump to content
Not connected, Your IP: 3.147.82.22
Mp3AACOpusAV1

Super mysterious issue with qBittorrent rate-limiting the complete tun0 interface

Recommended Posts

Posted ... (edited)
Hello everyone,

so today I stumbled across this weird issue:

Running Debian 10.7 with qBittorrent 4.1.5 and OpenVPN 2.4.7, both from Debian Repos.

My QBittorrent is configured to bind to the tun0 interface (using OpenVPN).

As soon as QBittorrent establishes any connection the whole tun0 interface (not just qBittorrent traffic) is limited to around 10Mbit/s in Download and stays that way even after exiting qBittorrent.
After restarting the OpenVPN connection I have full speed on tun0 again until I start qBittorrent again and it establishes any connection.

Took me a while to figure this out and I have no idea what's causing this.
 

How to reproduce:

  1. Do a Webbrowser Speedtest over tun0 while qBittorrent isn't running -> full speed.
  2. Start qBittorrent an wait for it to establish any connection.
  3. Do a Webbrowser Speedtest over tun0 again -> Limited to around 10Mbit/s.


Any idea what's the problem here? How could qBittorrent throttle the complete interface just by running in the background?
Thanks!


  Edited ... by Mp3AACOpusAV1

Share this post


Link to post

I've got a similar setup but I never noticed this happening to me. What are your connection settings? How many torrents are in the Started state?
The OpenVPN logs could help, too. Best paste them into a file and upload the file here. :)


NOT AN AIRVPN TEAM MEMBER. USE TICKETS FOR PROFESSIONAL SUPPORT.

LZ1's New User Guide to AirVPN « Plenty of stuff for advanced users, too!

Want to contact me directly? All relevant methods are on my About me page.

Share this post


Link to post
Posted ... (edited)

Thanks for your reply. I just finished a 6 hour debugging session and sadly I haven't figured it out yet.
I tried everything that came to mind like:

- Resetting qBittorrent settings to default
- Building latest qBittorrent from Source
- Switching the AirVPN Server
- Restoring the VM to an older backup
- Resetting the router and reconfigure

I also looked at the logs, especially syslog and so far couldn't find anything at all.
I'm gonna let this issue sit for a few days. Maybe I'll think of something else, or hopefully it will solve itself!


 

Edited ... by Mp3AACOpusAV1

Share this post


Link to post
19 hours ago, Mp3AACOpusAV1 said:

I also looked at the logs, especially syslog and so far couldn't find anything at all.


Did you also try setting verb 4 in the config? This prints much more info than normally needed but you are troubleshooting the tunnel interface, after all. verb 5 would even print each packet read and write; no idea if that will be useful at all. But please do share the log with us, otherwise – why even posting here if you resent to "ah, I failed, maybe it will solve itself". You are asking for help, after all.
What's your kernel version, by the way?

NOT AN AIRVPN TEAM MEMBER. USE TICKETS FOR PROFESSIONAL SUPPORT.

LZ1's New User Guide to AirVPN « Plenty of stuff for advanced users, too!

Want to contact me directly? All relevant methods are on my About me page.

Share this post


Link to post
Posted ... (edited)

No, didnt do that yet. Thanks.
Will do, but I'm probably gonna need a few days. Please keep this thread open, if possible. I will follow up.

Kernel version is 4.19.0-13-amd64.
Edit: In the meantime I also upgraded to OpenVPN 2.5.0 from the official repo. Sadly, no change.

Edited ... by Mp3AACOpusAV1

Share this post


Link to post
Posted ... (edited)

Good news! After tinkering a bit with OpenVPN logging capabilites I traced the problem back to "Replay-window backtrack occurred", which points to my ISPs connection beeing too unstable for UDP usage. After switching to TCP the problem is gone!
Since UDP worked fine for years, I'm guessing this is due to some problems my ISP might currently be facing in my area.
Anyway TDP performance is absolutely fine for my use cases - so for now I consider this issue resolved and will try to switch back to UDP in a few weeks.

Or do you have any other ideas what the reason for this error might be except ISP related stuff?

EDIT: So after googling a little more I stumbled across this (german) thread, which points to some bug in the current Firmware of AVM Fritzbox devices. Since I'm using a Fritzbox 6591 I'm confident I've now found the reason for my problems! Here's hoping that AVM will fix this in a future update.

Edited ... by Mp3AACOpusAV1

Share this post


Link to post
26 minutes ago, Mp3AACOpusAV1 said:

EDIT: So after googling a little more I stumbled across this (german) thread, which points to some bug in the current Firmware of AVM Fritzbox devices. Since I'm using a Fritzbox 6591 I'm confident I've now found the reason for my problems! Here's hoping that AVM will fix this in a future update.


No, it's not the Fritz!Box. I'm running a 7590 and have never experienced this.
Now that I know you've got a DOCSIS connection, if you also happen to be with Vodafone, I've found your problem. :D

NOT AN AIRVPN TEAM MEMBER. USE TICKETS FOR PROFESSIONAL SUPPORT.

LZ1's New User Guide to AirVPN « Plenty of stuff for advanced users, too!

Want to contact me directly? All relevant methods are on my About me page.

Share this post


Link to post
Posted ... (edited)

Nope, I'm using NetCologne and they do some mixture of DOCSIS 3.1 for the downstream and DOCSIS 3.0 for the upstream. 
Native Dual Stack, no DS-Lite.
I'm pretty confident its the Fritzbox since i can replicate some of the results in the thread. Maybe a mixture of specific models and Firmware versions.
Also I failed to mention before that I recently upgraded my Fritzbox from a 6490 to a 6591. This was some weeks ago, so I've never considered it to be the culprit... but in hindsight I didn't really use AirVPN over the past weeks so I probably didn't notice the issue until now - but it might have existed since the Fritzbox swap.
What issue are you referring to regarding Vodafone?

Edited ... by Mp3AACOpusAV1

Share this post


Link to post
8 hours ago, Mp3AACOpusAV1 said:

I'm pretty confident its the Fritzbox since i can replicate some of the results in the thread.


Well, as Sherlock would say, "one possible explanation of some of the facts" :)
 
8 hours ago, Mp3AACOpusAV1 said:

What issue are you referring to regarding Vodafone? 


Different story, different problem. Actually, not quite pertaining to your issue. :)
Also, the thread you linked talks about MTU sizes. If you're worried about those, just set the tun-mtu to 1450.
It does not explain how qB might force a link downgrade to 10 Mbit/s.
Do you actually see the link downgraded to 10 Mbit/s via ip link show or something?

NOT AN AIRVPN TEAM MEMBER. USE TICKETS FOR PROFESSIONAL SUPPORT.

LZ1's New User Guide to AirVPN « Plenty of stuff for advanced users, too!

Want to contact me directly? All relevant methods are on my About me page.

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...