KVM VM Internet Upload Speed Conciderably Slower

Zac8236

Member
Apr 27, 2018
20
0
21
24
Hello,

I have a ubuntu 18.04 guest running in a KVM due to kernal modifcations for a WireGuard server to run on it. When preforming a speedtest with speedtest-cli, I get the following output:

Code:
Testing download speed...
Download: 73.61 Mbit/s
Testing upload speed...
Upload: 3.60 Mbit/s

Which is much slower than what it should be, on proxmox, I get the following output:

Code:
Testing download speed...
Download: 73.67 Mbit/s
Testing upload speed...
Upload: 18.42 Mbit/s

I am using Virtio drivers and the guest is completly up to date. I have checked the settings and there are no rate limiting settings set in proxmox.

Has anyone got any ideas? Obviously as this VM is going to run a VPN, it is important for it to max the bandwidth.


Thanks in advanced
 
Just as general FYI, you could also install Wireguard for PVE as DKMS module (need pve-headers package) so that it becomes available for CTs, which share the hosts kernel, too.

Maybe switch the VM CPU to host, so that all flags and features get passed through, restricts live migration if a flag/feature isn't available on a cluster nodes, though.
Using multiqueues could also help for processing in parallel.

Testing it here I have comparable performance on host and VM (both PVE), using host as CPU architecture, besides that nothing special.
 
  • Like
Reactions: Zac8236
Just as general FYI, you could also install Wireguard for PVE as DKMS module (need pve-headers package) so that it becomes available for CTs, which share the hosts kernel, too.

Maybe switch the VM CPU to host, so that all flags and features get passed through, restricts live migration if a flag/feature isn't available on a cluster nodes, though.
Using multiqueues could also help for processing in parallel.

Testing it here I have comparable performance on host and VM (both PVE), using host as CPU architecture, besides that nothing special.

Thanks for the advice. I have changed the CPU type and enabled multiqueues in both PVE and the guest. Unfortunately, it hasn't worked. The download speed is saturating the connection, but the upload speed hasn't improved.

I ran the same test on the same speedtest server, in a Windows KVM, and it is saturating both download and upload. Both of the VMs use the same network bridge.

Looking at the progress, the upload test starts at full speed, but then drops and almost losses a connection which would bring down the overall average speed. This only happens in this one VM.

Is it safe to install the WireGuard DKMS module on PVE? If so could you point me in the right direction please?

Thanks for your time :)
 
Looking at the progress, the upload test starts at full speed, but then drops and almost losses a connection which would bring down the overall average speed. This only happens in this one VM.

Hmm strange, normally I'd say it could be an issue in the guests OS kernel, bus as it's Ubuntu 18.04 and Proxmox VE 5.X bases it's kernel of exactly that one (and I tested with a PVE guest) it would be a bit strange.

Maybe try another Linux distro too, plain Debian or something really bleeding edges like Arch Linux to see if it's general Linux related?

Is it safe to install the WireGuard DKMS module on PVE? If so could you point me in the right direction please?

I'm having it on my host here, no issues so far. I mean, it's not yet mainlined and the Wireguarg devs say that they did not go through a "real" security audit so the safeness is always a bit relative, although looking at what Jason Donenfeld does and the praise for his code from Linus himself I have reduced my trust issue in that project quite a bit ;-) I maybe wouldn't run it in very critical setups but for my personal use I'm very happy since over half a year and would go back to alternatives.

https://www.wireguard.com/install/ has a Debian paragraph which describes the process, there's also https://wiki.debian.org/Wireguard (which points to the former link) as resources to get started here.
 
I'm getting the same results, while testing internet bandwidth with speedtest-cli. Seems there is a bug with version 2.0.2
On the same host, I have VM01 and VM02 which has exactly the same configuration.

VM01 is running Debian stretch and speedtest-cli version is 1.0.0:
Testing download speed................................................................................
Download: 74.29 Mbit/s
Testing upload speed....................................................................................................
Upload: 28.29 Mbit/s

VM02 is running Debian Buster and speedtest-cli version is 2.0.2:
Download: 74.68 Mbit/s
Testing upload speed......................................................................................................
Upload: 3.65 Mbit/s

Cheers!
 
wireguard-dkms is also available from buster-backports nowadays :)
 
Same for me. KVM Host is an actual Debian und the Guest also. From Guest max. 3.8 MBit upload possible. Using speedtest-cli on the Host, 38 Mbit upload. Download is on Host and Guest ok.

In Guest:
speedtest-cli
Retrieving speedtest.net configuration...
Testing from Netcom-Kassel (188.74.11.196)...
Retrieving speedtest.net server list...
Selecting best server based on ping...
Hosted by goetel GmbH (Göttingen) [71.83 km]: 11.245 ms
Testing download speed................................................................................
Download: 90.24 Mbit/s
Testing upload speed......................................................................................................
Upload: 3.81 Mbit/s

On Host:
speedtest-cli
Retrieving speedtest.net configuration...
Testing from Netcom-Kassel (188.74.11.196)...
Retrieving speedtest.net server list...
Selecting best server based on ping...
Hosted by goetel GmbH (Göttingen) [71.83 km]: 12.246 ms
Testing download speed................................................................................
Download: 90.57 Mbit/s
Testing upload speed....................................................................................................
Upload: 37.27 Mbit/s

If I try ipperf between Host and Guest > 5GBit are possible (5 and 15 GBit).

I've updated speedtest-cli and it works now.
 
Last edited:
  • Like
Reactions: Stoiko Ivanov

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!