Community discussions

MikroTik App
 
kalto
just joined
Topic Author
Posts: 18
Joined: Wed Jan 09, 2013 3:29 am

Slow VPN performance?

Tue Jan 26, 2021 1:05 am

Hi all,

I recently bought a RB952Ui-5ac2nD (HAP AC lite) to connect the cottage to my home lab with a VPN. The home lab is running a 3011UiAS.

The cottage has a 100Mbps down and 15Mbps up link. The home lab has a 300/300Mbps link. I have around 100ms latency between the sites.

I was not expecting the HAP to be able to pass the whole 100Mbps in the VPN. But I was still expecting more than 4-5Mbps. Somewhere around 15-20 would have been perfect. CPU of the HAC never goes over 20%. The RB3011 doesn't even feel it.

I tried different VPN configuration (openvpn, l2tp/ipsec), I played with fasttrack (https://blog.johannfenech.com/mikrotik- ... ipsec-vpn/). Played with MTU. So far, nothing seems to have any impact.

Does anyone have any suggestion or were my expectations just too high?

Thanks for your help.
 
ramirez
Member Candidate
Member Candidate
Posts: 157
Joined: Sun May 12, 2013 9:48 pm

Re: Slow VPN performance?

Tue Jan 26, 2021 8:31 am

Like I mentioned here viewtopic.php?f=2&t=171995 I get about 21Mbits which is very low ...and have no Idea why is so slow :-)
 
kalto
just joined
Topic Author
Posts: 18
Joined: Wed Jan 09, 2013 3:29 am

Re: Slow VPN performance?

Tue Jan 26, 2021 12:59 pm

Well, 21Mbps would be ok for me. But I'm far from getting that.
 
kalto
just joined
Topic Author
Posts: 18
Joined: Wed Jan 09, 2013 3:29 am

Re: Slow VPN performance?

Tue Jan 26, 2021 1:15 pm

Ok, problem is clearly with IPsec.

If I disable IPsec and just go L2TP, I'm getting 40-42Mbps.

I would definitely prefer to keep the IPsec though....
 
User avatar
erkexzcx
Member Candidate
Member Candidate
Posts: 265
Joined: Mon Oct 07, 2019 11:42 pm

Re: Slow VPN performance?

Tue Jan 26, 2021 1:28 pm

Your router is not mentioned here: https://wiki.mikrotik.com/wiki/Manual:I ... celeration

So it means that you will get terrible performance. I would also suggest bypassing fasttrack (either by using "notrack" or "allowing" traffic before fastrack rule) and tuning MSS size might be required (which I believe is not).

You might get some hints here and here.

EDIT: So you say that performance penalty is mostly because of IPSEC. Your only option would be:
  • No encryption at all
  • Lower encryption = faster speeds and lower security
  • Wireguard = should be fast and safe enough, but only in ROS7.
 
kalto
just joined
Topic Author
Posts: 18
Joined: Wed Jan 09, 2013 3:29 am

Re: Slow VPN performance?

Tue Jan 26, 2021 1:48 pm

I know that the HAP ac lite doesn't have hardware acceleration for encryption. Which is why I was expecting much slower performance on encryption.

Still, with no dedicated ASIC for encryption, I was expecting the CPU to max out doing the encryption, but I'm still stuck at 5Mbps but with only 20-30% CPU usage.

I played with fast path, fasttrack and fast forward, couldn't see any impact on any change.

No matter what, I'll stay unencrypted for now. Most of the traffic going through that link will be encrypted anyway (ex.: https).

Thanks for the hints.
 
kalto
just joined
Topic Author
Posts: 18
Joined: Wed Jan 09, 2013 3:29 am

Re: Slow VPN performance?

Tue Jan 26, 2021 4:28 pm

Just an additional note, I tried using low encryption (md5, des and modp768). I got as far as 7Mbps and 30% CPU usage. I don't know if these are the lowest encryption available on the Mikrotik though.
 
ramirez
Member Candidate
Member Candidate
Posts: 157
Joined: Sun May 12, 2013 9:48 pm

Re: Slow VPN performance?

Tue Jan 26, 2021 11:02 pm

Through a Bandwidth Test, I get max 24Mbits over either OVPN / IPsec with a 100% CPU usage :-) ...
 
Van9018
Long time Member
Long time Member
Posts: 558
Joined: Mon Jun 16, 2014 6:26 pm
Location: Canada - Abbotsford

Re: Slow VPN performance?

Fri Jan 29, 2021 5:07 am

With IPSec and the hap lite I would max out at 8 mbps, but packets would drop so bad that users who's traffic was not using the IPSec tunnel would complain. So I had to limit my IPSec throughput to 3 to prevent dropped packets.

I upgraded to Hex and ran some tests, I can max out my internet speed over the IPSec tunnel now.

Worth noting, when I did have to transfer a lot of data over the hap lite IPSec VPN, I would set encryption to null to temporarily increase speeds.
 
User avatar
16again
Frequent Visitor
Frequent Visitor
Posts: 78
Joined: Fri Dec 29, 2017 12:23 pm

Re: Slow VPN performance?

Sat Jan 30, 2021 12:03 am

Maybe the latency is forming the bottleneck. Can you test having both devices direct connected?

Who is online

Users browsing this forum: johnson73, vic666, wispmikrotik and 91 guests