VM routing traffic from LAN to VPS via Wireguard is slow

jpdm

New Member
Aug 14, 2022
16
3
3
slow-transfer.png

UBUNTU-VM acts as a router to route traffic over wireguard (UBUNTU-VM is within a proxmox VE). NAS is an old WD EX2, which is not on wireguard, traffic from it passes through the proxmox UBUNTU-VM.

The problem is that bandwidth from NAS going outside to VPS is very slow, only 300KB/s (transfer C above) (NAS --> UBUNTU-VM --> VPS). If I mount the NAS on UBUNTU-VM using NFS, the transfer is acceptable (around 2.5 MB/s, my internet is 25 Mbits/s up and down).

I tried getting a file from another linux VM via scp (same as above) and the bandwidth is also slow (300KB/s). However, when I installed wireguard and scp directly using its wireguard IP, the transfer is OK (around 2.5MB/s).

I suspect there's some throttling happening in the UBUNTU-VM when routing traffic, but I don't know where to look. I already tried enabling multiqueue and set it to 8 (at the time of this writing my VM cores are 8), and ran "ethtool -L ens18 combine 8" per the documentation but it did not improve the bandwidth (still at 300KB/s).

I tried switching the VM Network Device model from VirtIO to Intel E1000 and the transfer initially begins with 1.6 MB/s speed and throttles back down to 300KB/s (VirtIO doesn't have a burst like this, same with the other models).

Also tried RPS using this guide but it didn't help.

What do you think is causing the bandwidth throttling when traffic is going through the UBUNTU-VM within the proxmox VE?
 
Last edited:
Hey :)

It 's seem that when your not using your VPN tunnel, you've a good connexion (relatively ...)

It's maybe a cryptograhic cause. Maybe your keys are too strong for your connexion, or your CPU is too old for the VPN algorithm your'triying to use?
 
Hey :)

It 's seem that when your not using your VPN tunnel, you've a good connexion (relatively ...)

It's maybe a cryptograhic cause. Maybe your keys are too strong for your connexion, or your CPU is too old for the VPN algorithm your'triying to use?

Heya!

I've narrowed it down to NIC + Debian + wireguard nat issue (though likely just the NIC and Debian). Something not working properly with that setup. The solution: I just bought a USB to LAN adapter and use that instead of the built-in port.

Detail here: https://forum.proxmox.com/threads/w...throttle-down-vm-with-wireguard-video.113668/
 
  • Like
Reactions: Pifouney

About

The Proxmox community has been around for many years and offers help and support for Proxmox VE, Proxmox Backup Server, and Proxmox Mail Gateway.
We think our community is one of the best thanks to people like you!

Get your subscription!

The Proxmox team works very hard to make sure you are running the best software and getting stable updates and security enhancements, as well as quick enterprise support. Tens of thousands of happy customers have a Proxmox subscription. Get yours easily in our online shop.

Buy now!