Jump to content

Why is Open Media Vault (OMV) so slow when connecting to it via Open VPN (OVPN)

Linus No Beard
Go to solution Solved by Akima,

A couple of tests you can perform to determine which side of the network - Client (Your laptop/computer) or Server (Your OMV install).

 

On the Server side, you can run some simple benchmarks to determine a ballmark estimated "upper" speed OpenVPN will perform at on your RPI. I've just done the following on a RPI 3b.

 

openvpn --genkey --secret /tmp/secret

This creates a temporary key that you can then get openVPN to run a bunch of benchmark tests with against different ciphers.

 

time openvpn --test-crypto --secret /tmp/secret --verb 0 --tun-mtu 20000 --cipher aes-256-gcm

The results should be outputted in seconds. I ran the above on my RPI 3b and got the following:

real    0m17.093s
user    0m17.079s
sys     0m0.012s

Take either the real or user result, and use the following calculation:

 

3200 / <time in seconds>

3200 / 17.09 = 187.24 (Or 187.23Mbps)

 

You can also run it with a bunch of different ciphers:

 

time openvpn --test-crypto --secret /tmp/secret --verb 0 --tun-mtu 20000 --cipher aes-128-cbc
time openvpn --test-crypto --secret /tmp/secret --verb 0 --tun-mtu 20000 --cipher aes-256-cbc
time openvpn --test-crypto --secret /tmp/secret --verb 0 --tun-mtu 20000 --cipher aes-128-gcm
time openvpn --test-crypto --secret /tmp/secret --verb 0 --tun-mtu 20000 --cipher aes-256-gcm

 

This just helps to narrow down if it's an encryption bottleneck (CPU limitations, or resource availability). If it's hardware limitations, then it'll be a bit more complicated to figure out.

 

After that, i'd review OpenVPN's settings. Compression is often a culprit. In /etc/config/openvpn (or /etc/openvpn depending how it's installed) and look for the line that says comp-lzo.

 

comp-lzo should be set to no. You might need to check the ovpn file settings on the client side to make sure compression isnt enabled.

 

Just some things to start with first. It's always a process of elimination. 

I have a pi4 4 running an OMV instance and an OVPN instance but when using the VPN to connect to the nas the file transfer rates are painfully slow like 2 GB taking an estimated 10 hr to transfer according to windows can this be fixed

Link to comment
Share on other sites

Link to post
Share on other sites

18 minutes ago, Linus No Beard said:

I have a pi4 4 running an OMV instance and an OVPN instance but when using the VPN to connect to the nas the file transfer rates are painfully slow like 2 GB taking an estimated 10 hr to transfer according to windows can this be fixed

What is your internet upload speed?

 

Maybe try WireGuard instead? WireGuard is much lighter weight, but it should be able to handle ovpn fine (I have used both on a pi 4, both worked fine for me), I more suspect it’s your internet upload speed….

Rig: i7 13700k - - Asus Z790-P Wifi - - RTX 4080 - - 4x16GB 6000MHz - - Samsung 990 Pro 2TB NVMe Boot + Main Programs - - Assorted SATA SSD's for Photo Work - - Corsair RM850x - - Sound BlasterX EA-5 - - Corsair XC8 JTC Edition - - Corsair GPU Full Cover GPU Block - - XT45 X-Flow 420 + UT60 280 rads - - EK XRES RGB PWM - - Fractal Define S2 - - Acer Predator X34 -- Logitech G502 - - Logitech G710+ - - Logitech Z5500 - - LTT Deskpad

 

Headphones/amp/dac: Schiit Lyr 3 - - Fostex TR-X00 - - Sennheiser HD 6xx

 

Homelab/ Media Server: Proxmox VE host - - 512 NVMe Samsung 980 RAID Z1 for VM's/Proxmox boot - - Xeon e5 2660 V4- - Supermicro X10SRF-i - - 128 GB ECC 2133 - - 10x4 TB WD Red RAID Z2 - - Corsair 750D - - Corsair RM650i - - Dell H310 6Gbps SAS HBA - - Intel RES2SC240 SAS Expander - - TreuNAS + many other VM’s

 

iPhone 14 Pro - 2018 MacBook Air

Link to comment
Share on other sites

Link to post
Share on other sites

1 minute ago, LIGISTX said:

What is your internet upload speed?

 

Maybe try WireGuard instead? WireGuard is much lighter weight, but it should be able to handle ovpn fine (I have used both on a pi 4, both worked fine for me), I more suspect it’s your internet upload speed….

My home network speed is 100Mbps up 10Mbps down at both locations but i am getting transfer rates of Kbps

Link to comment
Share on other sites

Link to post
Share on other sites

6 hours ago, Linus No Beard said:

My home network speed is 100Mbps up 10Mbps down at both locations but i am getting transfer rates of Kbps

That sounds... backwards. Connections are usually lopsided in favor of download bandwidth.

I sold my soul for ProSupport.

Link to comment
Share on other sites

Link to post
Share on other sites

9 hours ago, Linus No Beard said:

My home network speed is 100Mbps up 10Mbps down at both locations but i am getting transfer rates of Kbps

Assuming it’s 10 up, should still get close to 10 when reading files while away from LAN. All I can say is try WireGuard. It’s so much simpler anyways. 

Rig: i7 13700k - - Asus Z790-P Wifi - - RTX 4080 - - 4x16GB 6000MHz - - Samsung 990 Pro 2TB NVMe Boot + Main Programs - - Assorted SATA SSD's for Photo Work - - Corsair RM850x - - Sound BlasterX EA-5 - - Corsair XC8 JTC Edition - - Corsair GPU Full Cover GPU Block - - XT45 X-Flow 420 + UT60 280 rads - - EK XRES RGB PWM - - Fractal Define S2 - - Acer Predator X34 -- Logitech G502 - - Logitech G710+ - - Logitech Z5500 - - LTT Deskpad

 

Headphones/amp/dac: Schiit Lyr 3 - - Fostex TR-X00 - - Sennheiser HD 6xx

 

Homelab/ Media Server: Proxmox VE host - - 512 NVMe Samsung 980 RAID Z1 for VM's/Proxmox boot - - Xeon e5 2660 V4- - Supermicro X10SRF-i - - 128 GB ECC 2133 - - 10x4 TB WD Red RAID Z2 - - Corsair 750D - - Corsair RM650i - - Dell H310 6Gbps SAS HBA - - Intel RES2SC240 SAS Expander - - TreuNAS + many other VM’s

 

iPhone 14 Pro - 2018 MacBook Air

Link to comment
Share on other sites

Link to post
Share on other sites

5 hours ago, Needfuldoer said:

That sounds... backwards. Connections are usually lopsided in favor of download bandwidth.

 

2 hours ago, LIGISTX said:

Assuming it’s 10 up, should still get close to 10 when reading files while away from LAN. All I can say is try WireGuard. It’s so much simpler anyways. 

my mistake i meant 10 up 100 down

Link to comment
Share on other sites

Link to post
Share on other sites

On 8/3/2022 at 10:39 PM, Linus No Beard said:

I have a pi4 4 running an OMV instance and an OVPN instance but when using the VPN to connect to the nas the file transfer rates are painfully slow like 2 GB taking an estimated 10 hr to transfer according to windows can this be fixed

 

If you try connecting to it while on LAN do you get the same types of speeds?  Have you run a speed test at the location where you are connecting from?  Since you said you have 100d 10u, but that's only at your  house.  What is the connection speed where you are trying to connect from.  If you are on a wireless connection, how stable is the connection (because breaking up and reconnecting could potentially mean that it needs to re-communicate)

 

How many files are you transferring and in what direction?  As with your connection it should take at minimum 27 minutes to transfer if you use upload speeds.  There is also overhead and such, but 27 would be the minimum transfer speed.

 

If you have a ton of files though it's going to take longer (and windows is going to get the estimate very very wrong). e.g. if you are transferring 502 files, where 1 or 2 files are like 1.9GB of the total space, but then the remaining like 0.2 MB each Windows will naturally estimate that slower.  As Windows doesn't handle transferring smaller files very well, and it seems sometimes they take the estimate  by seeing how long it's taking per file per then taking the total space left to transfer and calculating using that speed.  e.g. Transferred 1 million files before (mostly small programming text files but a few large ones).  Windows estimated 3 hours, it actually only took 10 minutes.

 

If it is a bunch of small files, try it with just a single large file to see. (like a 100mb file, transfer and see whether it takes under 5 minutes)

3735928559 - Beware of the dead beef

Link to comment
Share on other sites

Link to post
Share on other sites

  • 3 weeks later...

A couple of tests you can perform to determine which side of the network - Client (Your laptop/computer) or Server (Your OMV install).

 

On the Server side, you can run some simple benchmarks to determine a ballmark estimated "upper" speed OpenVPN will perform at on your RPI. I've just done the following on a RPI 3b.

 

openvpn --genkey --secret /tmp/secret

This creates a temporary key that you can then get openVPN to run a bunch of benchmark tests with against different ciphers.

 

time openvpn --test-crypto --secret /tmp/secret --verb 0 --tun-mtu 20000 --cipher aes-256-gcm

The results should be outputted in seconds. I ran the above on my RPI 3b and got the following:

real    0m17.093s
user    0m17.079s
sys     0m0.012s

Take either the real or user result, and use the following calculation:

 

3200 / <time in seconds>

3200 / 17.09 = 187.24 (Or 187.23Mbps)

 

You can also run it with a bunch of different ciphers:

 

time openvpn --test-crypto --secret /tmp/secret --verb 0 --tun-mtu 20000 --cipher aes-128-cbc
time openvpn --test-crypto --secret /tmp/secret --verb 0 --tun-mtu 20000 --cipher aes-256-cbc
time openvpn --test-crypto --secret /tmp/secret --verb 0 --tun-mtu 20000 --cipher aes-128-gcm
time openvpn --test-crypto --secret /tmp/secret --verb 0 --tun-mtu 20000 --cipher aes-256-gcm

 

This just helps to narrow down if it's an encryption bottleneck (CPU limitations, or resource availability). If it's hardware limitations, then it'll be a bit more complicated to figure out.

 

After that, i'd review OpenVPN's settings. Compression is often a culprit. In /etc/config/openvpn (or /etc/openvpn depending how it's installed) and look for the line that says comp-lzo.

 

comp-lzo should be set to no. You might need to check the ovpn file settings on the client side to make sure compression isnt enabled.

 

Just some things to start with first. It's always a process of elimination. 

Link to comment
Share on other sites

Link to post
Share on other sites

On 8/24/2022 at 11:32 AM, Akima said:

A couple of tests you can perform to determine which side of the network - Client (Your laptop/computer) or Server (Your OMV install).

 

On the Server side, you can run some simple benchmarks to determine a ballmark estimated "upper" speed OpenVPN will perform at on your RPI. I've just done the following on a RPI 3b.

 

openvpn --genkey --secret /tmp/secret

This creates a temporary key that you can then get openVPN to run a bunch of benchmark tests with against different ciphers.

 

time openvpn --test-crypto --secret /tmp/secret --verb 0 --tun-mtu 20000 --cipher aes-256-gcm

The results should be outputted in seconds. I ran the above on my RPI 3b and got the following:

real    0m17.093s
user    0m17.079s
sys     0m0.012s

Take either the real or user result, and use the following calculation:

 

3200 / <time in seconds>

3200 / 17.09 = 187.24 (Or 187.23Mbps)

 

You can also run it with a bunch of different ciphers:

 

time openvpn --test-crypto --secret /tmp/secret --verb 0 --tun-mtu 20000 --cipher aes-128-cbc
time openvpn --test-crypto --secret /tmp/secret --verb 0 --tun-mtu 20000 --cipher aes-256-cbc
time openvpn --test-crypto --secret /tmp/secret --verb 0 --tun-mtu 20000 --cipher aes-128-gcm
time openvpn --test-crypto --secret /tmp/secret --verb 0 --tun-mtu 20000 --cipher aes-256-gcm

 

This just helps to narrow down if it's an encryption bottleneck (CPU limitations, or resource availability). If it's hardware limitations, then it'll be a bit more complicated to figure out.

 

After that, i'd review OpenVPN's settings. Compression is often a culprit. In /etc/config/openvpn (or /etc/openvpn depending how it's installed) and look for the line that says comp-lzo.

 

comp-lzo should be set to no. You might need to check the ovpn file settings on the client side to make sure compression isnt enabled.

 

Just some things to start with first. It's always a process of elimination. 

thanks for write up I found out that it is just an upload limitation of my internet

Link to comment
Share on other sites

Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×