Upload "throttled" to ~100mbit on Ubuntu 19.04. Due to tun0 txqueuelen set to 100

edited October 2019 in Linux VPN Setup
Hi All,

TL;DR - Known limiter in OpenVPN affects PIA Linux client and will limit upload bandwidth to 100 mbit.

I've enjoyed being a user of this service for years now, and recently moved more in to learning the Linux side of things.  I recently noticed an issue where my Ubuntu 19.04 system was struggling to send over 100mbit over a PIA VPN (which was installed via the .sh script downloaded off the site). This same application ran on the Windows server I was moving it off of much faster than I was getting once moved. (great service!)

After eliminating other parts and pulling out much hair I noticed that when connected, an "ip addr" command would show my ethernet with a 1000 after it and the tunnel had 100.  It seemed at first the difference between gigabit and fastethernet but reading in to it, I learned it is the transmit queue length and is a known limiter in OpenVPN (which PIA uses).

I found this link https://community.openvpn.net/openvpn/wiki/Gigabit_Networks_Linux#txqueuelen and after a bit of learning I can confirm that if the VPN/tunnel is connected then the command "sudo /usr/bin/ip link set dev tun0 txqueuelen 1000" will adjust it and it more than doubled my upload speed. I did notice a minor system load increase which I would expect by pushing more data through, but thought I"d mention to others.

My two questions:  Could a knowledge base article or more be done to raise awareness so others don't burn energy on finding this bottleneck?  Is there a way I can add this setting to a .config (I did a weak attempt at the pia.ovpn file but didn't have an effect)?.... dare I dream of a checkbox to enable Large Transmit Queue?  Currently I have to open a terminal and run the above command after reboot/reconnect.

I welcome any correction or education, but I think I've got it pretty nailed down to this.

- Thank you

Comments

  • That is certainly not a hard limit for OpenVPN on Linux, i'm getting over 350 on mine. I recommend trying different ovpn with other ports and protocols. The one you may be using could be restricted.
  • edited October 2019
    Thomas,

    Thanks for the reply.  To be clear this would only affect upload speed.  Can you confirm you can SEND 350mbit on default?  Thanks also for the food for thought.  I don't think a lot of people send that much, or even have the bandwidth available at home to do so. But to be clear I'm still learning too so i might be off.  But it is super reproduce-able...... I see my up speed in qBT flatline at about 9MBytes, then run the command and it doubles to about 20-22 MBytes immediately.
Sign In or Register to comment.