How to test the speeds of VPN Server at the NAS?

OpenVPN seems to be slower lately and I’m wondering how I can test the connection speed at the NAS to compare that to the client?

I tried a docker setup a while back and gave up. Will that be faster than the native VPN Server? I’m not looking for the same speed as without the VPN, but 3-15Mbps isn’t cutting it and seems especially lagged at time lately. Think the server has 75 up, client 300 down.

I turned off compression with no real change.

Does the NAS free storage space matter for this?

Should I switch to L2TP IPsec or to having the router handle things instead of the NAS?

What’s your upload speed of your ISP?

I know I get 6 Mbit/s upload so that’s the best I could expect from my VPN.

The only way to really test to see if there is a difference would be possibly trying out having 3 different gateways locally.

A main one that connects to the internet and two separate routers that are providing your own ISP space. This would in turn segment off the throttled upload speeds your ISP is providing.

You would then just VPN from network A to network B and see how much speed is being lost between the VPN.

To go further I would just port forward traffic between your NAS in network B and transfer a large file over to get a baseline. Over Gbit ethernet you should see something like 100-125 MB/s or 1 Gbit transfer speeds.

There’s still some loss due to other factors such as the hops the traffic has to take, other traffic traversing the lines, and CPU/drive performance of your NAS and PC.

Once you have the baseline VPN in and try the test again and see how much you lose. If it is something like 5-10 MB/s then yeah your VPN server might be suffering from some sort of performance hit.

Something to consider is that if you have something like the 218 there’s only one NIC and one line and so that VPN is sharing resources with the host machine and any other VMs, docker containers you’re running. A solution for that is upgrading to a unit with a NIC that has multiple ports which can help increase the network throughput of the NAS.

If you’re getting something like 80 MB/s transfer speeds with the VPN I would say the limiting factor was your ISP’s uploading speed.

Install speedtestcli Speedtest CLI: Internet speed test for the command line

  1. https://github.com/librespeed/speedtest
  2. install Web Station, Apache 2.2, and PHP 7.2 on the Synology
  3. Setup a virtual host to the local directory on the NAS where librespeed’s working dir is, enable for port 80/443, select apache 2.2 and PHP 7.2
  4. PHP Settings> PHP7.2, enable OpenSSL
  5. Browse to http://Synology-IP/Virtual-Host to start a local on box speed test from anywhere in your network.

If you just want to test the speed from your NAS and have ssh access to it - you can use wget or curl
to do so.

Those are preinstalled on your NAS.

At NAS i test with speedtest cli in docker.

But the best test is on router which covers vpn for the whole network which makes sense as you hardly will place vpn on tiny devices or e.g. Shield plus you will run out of max connections.

Ultimately I wouldn’t use old protocols and rather switch to wireguard. My VPN speed expectation is historically strictly 100% of ISP max, and it works with all ISP and VPN providers however not always with OpenVPN protocol which is demanding on cpu. When upgraded to 500Mbps ISP i had to switch to wireguard to reclaim 100% speed, getting 500Mbps now. Htop will tell me how much power is left for further increase to 1000Mbps, just like it did before. I also monitor wan interface with bwm-ng or similar as i am running either speedtest or ISPs own test on a desktop.

Tested a random large file and get about 1.5-2MB/s for what I think is a 75Mb/s ISP upload.

Great tip. Did that quick and dirty without increasing shared memory. Thanks.

Not a good test as ssh will usually won’t max out bandwidth.

Do you have wireguard setup in docker?

Is this a commercial line?

75 MB/s up is something like 650 Mbit line.
300 MB/s down is something like a 2.5 Gbit down line.

You would have to be running 10Gb out to even take advantage of that download speed. That or have 2-3 1Gbit ethernet lines to take advantage of that. That shouldn’t necessarily affect the total speed of uploading since that wouldn’t use the full capacity of a 1Gbit line.

You missed the point.
ssh into the NAS.
Then use wget or curl on the NAS, from its CLI.

on Router (OpenWRT) in kernel (pretty opposite of semivirtualization), as i dont want NAS to deal with any connectivity especially WAN related.

Edited it as I meant Mb/s for the ISP speed.

Got it but still poor choice. In most cases at least for me the speed would be limited/random on the other end, and you test only one direction. The reason why speed tests exist are to provide enough bandwidth and 4 resulting numbers, so I would stick to speedtest-cli or simply desktop https as bottleneck on nas to desktop is none.

So 1 Megabyte(MB) is 8 Megabits(Mb).

So on a 75 Mb/s line that is something like 9 MB/s.

How are you testing speeds?

Copying a file on windows? When doing that the pop up window show MBps while if you do a speedtest.net run it will come up as Mbps.

Using speedtest.net isn’t necessarily that accurate since you would be factoring in not just the hop from your device to your VPN server but also back out of your LAN to the server that is acting as the speed test which all would see loss in bandwidth.

Actually you continue to miss the point. Have you even looked at curl or wget and what they can do?

curl can be used for both uploading and downloading. Giving one the ability for a bidirectional test without the need to install some unvetted software.
Repeat it as many times as you want to obtain enough statistical samples.

You’re welcome to stick to whatever you’re used to.

I’ve tried both. I don’t seem to get anything close to 75 Mb/s with either method.

i see but it doesn’t fit the purpose, because what server will you reach and what server will allow you to upload? Likely you will get 1 result out of 4 (no upload, ping and jitter). And that server better be faster than the one chosen by speed service… You gonna end up finding out speedtest’s test file and curl it as a download test, why not simply skip this hassle…

Then it probably has something to do with the NAS. Have you tested the speed between the host OS such as transferring file from a share on the NAS?

If you’re getting solid speeds there then yeah you can point at the VPN server doing something which could be that it needs more system resources. Maybe give it access to more ram.