Community discussions

MikroTik App
 
User avatar
halacs
Frequent Visitor
Frequent Visitor
Topic Author
Posts: 88
Joined: Thu Jul 06, 2017 5:45 pm
Location: Hungary

Performance of Mikrotik 951G-2HnD

Sat Feb 02, 2019 9:50 pm

Hi,

I have a Mikrotik 951G-2HnD router. I suspect it is the bottleneck of my network why I cannot reach Internet with 500Mbps/20Mbps what my ISP should provide. I would like to know what can cause this: configuration of my device or hardware failure.

I can measure maximum 100-120Mbps download speed even if I am connected to my Mikrotik 951G-2HnD device directly with CAT5e cable.
To make sure, not my ISP is the guilty, I connected a PC to the WAN port and did measurements between that WAN side PC and another one in my LAN but I could measure the same speeds so it seems my router is the bottleneck somehow.

What my router do?
- NAT (DHCP client on WAN)
- IPv6 tunnel
- DHCP server
- L2TP VPN and OpenVPN site2site VPN (less then 5 clients and minimal traffic between my flats). L2TP VPN is configured as Layer2 connection because of DLNA server in my primary flat.
- Two WiFi network (guest SSID with only internet and "normal" for the family)
- Two tagged VLAN network (guest and "normal" as in case of wifi). Trunk VLAN cable towards my smart switch where all the PCs are connected.

I have checked the CPU usage when I'm measuring but it's under 90% always.

I highly appreciate your help and advice.

Thanks & br,
Halacs
 
User avatar
mkx
Forum Guru
Forum Guru
Posts: 11434
Joined: Thu Mar 03, 2016 10:23 pm

Re: Performance of Mikrotik 951G-2HnD

Sat Feb 02, 2019 10:04 pm

Do you have fasttrack rule in FW filter rule list?

Anyhow, 500Mbps with some decent FW is on the edge of what this device can deliver. And with fairly optimized FW rule list ...
 
Pea
Member Candidate
Member Candidate
Posts: 230
Joined: Fri Jul 17, 2015 11:07 pm
Location: Czech

Re: Performance of Mikrotik 951G-2HnD

Sat Feb 02, 2019 10:07 pm

Maybe Fasttrack rule missing in your firewall?
https://wiki.mikrotik.com/wiki/Manual:IP/Fasttrack
/ip firewall filter add chain=forward action=fasttrack-connection connection-state=established,related
/ip firewall filter add chain=forward action=accept connection-state=established,related
 
User avatar
halacs
Frequent Visitor
Frequent Visitor
Topic Author
Posts: 88
Joined: Thu Jul 06, 2017 5:45 pm
Location: Hungary

Re: Performance of Mikrotik 951G-2HnD

Sat Feb 02, 2019 10:27 pm

I have just added the above two fasttrack firewall rules and my connection immediately because 2 times faster then before so this was definitely the problem. Big thanks!
Just to make sure I understand correctly: they should be at the top of my firewall rules, right?

Mkx, you mentioned 500Mbps is the edge of what this device can deliver. Can you suggest a similar device what is good up to 1Gbps/1Gbps connection? 2Gbps/2Gbps is the max what my ISP offers but half of it is more then enough for me even if I take into consideration my multi-homed life too. If my device would have a higher capacity at an affordable price, even better of course. (I don't know where I can find this kind of info in the catalogs)
 
User avatar
mkx
Forum Guru
Forum Guru
Posts: 11434
Joined: Thu Mar 03, 2016 10:23 pm

Re: Performance of Mikrotik 951G-2HnD

Sat Feb 02, 2019 10:31 pm

I'd say that RBD52G (hAP ac2) would be able to get near Gbps ... not single connection though.
 
User avatar
halacs
Frequent Visitor
Frequent Visitor
Topic Author
Posts: 88
Joined: Thu Jul 06, 2017 5:45 pm
Location: Hungary

Re: Performance of Mikrotik 951G-2HnD

Sat Feb 02, 2019 10:56 pm

Great, thanks, I will check that one! Do you have any hint where I can find these performance related parameters? Where do you know these from?
 
Pea
Member Candidate
Member Candidate
Posts: 230
Joined: Fri Jul 17, 2015 11:07 pm
Location: Czech

Re: Performance of Mikrotik 951G-2HnD

Sat Feb 02, 2019 11:43 pm

 
User avatar
halacs
Frequent Visitor
Frequent Visitor
Topic Author
Posts: 88
Joined: Thu Jul 06, 2017 5:45 pm
Location: Hungary

Re: Performance of Mikrotik 951G-2HnD

Sun Feb 03, 2019 9:04 am

In case of RB951G-2HnD device, "Routing, 25 ip filter rules, 689.8 Mbps" is shown under the test results for 1518 byte packet size.

Does this mean, that if I have just 25 IP filter rules (under IP / Firewall / Filter Rules), then I should be able to reach this throughput without fast track rules? Well, in my case, with no fast track rules, I could reach a much worst speed, however, I have actually exactly 25 (with the 3 disabled ones).
 
Pea
Member Candidate
Member Candidate
Posts: 230
Joined: Fri Jul 17, 2015 11:07 pm
Location: Czech

Re: Performance of Mikrotik 951G-2HnD

Sun Feb 03, 2019 9:56 am

*)
All tests are done with Xena Networks specialized test equipment (XenaBay),and done according to RFC2544 (Xena2544)
Max throughput is determined with 30+ second attempts with 0,1% packet loss tolerance in 64, 512, 1518 byte packet sizes
Test results show device maximum performance, and are reached using mentioned hardware and software configuration, different configurations most likely will result in lower results


Translation: These results are reached only within ideal and specific conditions, this is the maximum which is unreachable in other setups.
You should read this the same way as car fuel consumption, electric car drive distance, display contrast, WiFi speed, ... :)

Just use these numbers to compare the huge performance difference of both devices an upgrade if you need better router.
 
User avatar
halacs
Frequent Visitor
Frequent Visitor
Topic Author
Posts: 88
Joined: Thu Jul 06, 2017 5:45 pm
Location: Hungary

Re: Performance of Mikrotik 951G-2HnD

Sun Feb 03, 2019 10:15 am

Thanks! This helped me a lot!
 
User avatar
mkx
Forum Guru
Forum Guru
Posts: 11434
Joined: Thu Mar 03, 2016 10:23 pm

Re: Performance of Mikrotik 951G-2HnD

Sun Feb 03, 2019 10:36 am

My rule of thumb is to look at number for most loaded firewall (i.e. the lowest line in the table) and packet size of 512 bytes. My feeling is that this number gives best approximation for max performance for typical SOHO use.

Surely if one gets overboard with number of rules (we've seen some examples on this forum), then performance might be even lower.
When squeezing router for every last bit of performance, the order of filter rules does matter and can bring a few percent of performance.
 
zaqik
newbie
Posts: 30
Joined: Mon Apr 13, 2020 5:31 pm

Re: Performance of Mikrotik 951G-2HnD

Tue Jul 05, 2022 4:14 pm

Hello. I have exactly the same problem. ISP gives 300Mbit, but my maximum with 951G-2HnD is around 150Mbit. Fasttrack rules don't help, the only difference is CPU load becomes lower: ~30% with fasttrack rules and ~90% without (with queues). Any suggestions what it can be? Generally speaking, can speed be limited somewhere else except queues? Because it doesn't look like a hardware limitation. But review of exported config showed me nothing suspicious.
This solution viewtopic.php?t=96398 didn't help (changed pfifo for ethernet-default, changed only-hardware for lan and wan interfaces with ethernet-default)
This solution viewtopic.php?t=105649 didn't help either (used another media converter, both are 1Gbit, used different SFPs)
 
sindy
Forum Guru
Forum Guru
Posts: 10205
Joined: Mon Dec 04, 2017 9:19 pm

Re: Performance of Mikrotik 951G-2HnD

Tue Jul 05, 2022 6:06 pm

Generally speaking, can speed be limited somewhere else except queues? Because it doesn't look like a hardware limitation.
Do you happen to have a fast ethernet device connected to one of the LAN ports? Not the one from which you measure the speed, some other one which is also connected while you run the test.
 
User avatar
chechito
Forum Guru
Forum Guru
Posts: 2990
Joined: Sun Aug 24, 2014 3:14 am
Location: Bogota Colombia
Contact:

Re: Performance of Mikrotik 951G-2HnD

Tue Jul 05, 2022 9:47 pm

My rule of thumb is to look at number for most loaded firewall (i.e. the lowest line in the table) and packet size of 512 bytes. My feeling is that this number gives best approximation for max performance for typical SOHO use.
X2
 
zaqik
newbie
Posts: 30
Joined: Mon Apr 13, 2020 5:31 pm

Re: Performance of Mikrotik 951G-2HnD

Tue Jul 05, 2022 11:13 pm

Do you happen to have a fast ethernet device connected to one of the LAN ports? Not the one from which you measure the speed, some other one which is also connected while you run the test.
There's nothing connected directly to Mikrotik's ports except 1Gbit fiber media converter (ether1) and 1Gbit Cisco switch (ether2). There could be 100Mbit devices somewhere in the network though. Can you tell more how and why they can be the cause of my problem?
 
User avatar
mkx
Forum Guru
Forum Guru
Posts: 11434
Joined: Thu Mar 03, 2016 10:23 pm

Re: Performance of Mikrotik 951G-2HnD

Tue Jul 05, 2022 11:22 pm

There could be 100Mbit devices somewhere in the network though. Can you tell more how and why they can be the cause of my problem?

Not in your case. Some switch chips have performance problems if they have to adapt between different rates on different ports (e.g. one port 100M, another 1G), affecting not only traffic between pair of ports with mismatched speeds but also the rest of traffic. It seems AR8327 (which is part of SoC used in RB951G) suffers from this problem to certain extent as well.

In your case most likely RB951G is simply too slow to handle the traffic. You mentioned queues, which means no fasttrack. If there's IPv6 in the mix: ROS doesn't fasttrack IPv6 so far. All of that means high hit on CPU.
 
sindy
Forum Guru
Forum Guru
Posts: 10205
Joined: Mon Dec 04, 2017 9:19 pm

Re: Performance of Mikrotik 951G-2HnD

Tue Jul 05, 2022 11:33 pm

There could be 100Mbit devices somewhere in the network though. Can you tell more how and why they can be the cause of my problem?
The switch chip tells the CPU not to send more packets until it manages to deliver the one being currently processed. It is theoretically possible that the pause frames would be sent by downstream switches, but it is not very likely.

On the other hand, it is still strange as you say that the CPU load is only about 30 % with fasttracking. So maybe try disconnecting the rest of the network and see whether it helps?

On yet another hand, where do you see those 150 Mbit/s? In some speedtest application or in output of /interface monitor-traffic output? Could it be that the connected network devices also download some data (or upload them, the total load matters, not the direction) while you are testing, so the speedtest only gets the rest of the bandwidth?
 
zaqik
newbie
Posts: 30
Joined: Mon Apr 13, 2020 5:31 pm

Re: Performance of Mikrotik 951G-2HnD

Wed Jul 06, 2022 12:01 pm

On yet another hand, where do you see those 150 Mbit/s?
I see them in winbox on the on Traffic tab of wan interface properties
Image
 
sindy
Forum Guru
Forum Guru
Posts: 10205
Joined: Mon Dec 04, 2017 9:19 pm

Re: Performance of Mikrotik 951G-2HnD

Wed Jul 06, 2022 12:33 pm

No idea then. What does the Status tab show? The last thing to come to my mind would be that it somehow managed to negotiate half-duplex on the Gigabit interface...
 
zaqik
newbie
Posts: 30
Joined: Mon Apr 13, 2020 5:31 pm

Re: Performance of Mikrotik 951G-2HnD

Wed Jul 06, 2022 3:45 pm

sindy
I'm terribly sorry, but it happened to be an ISP issue. After N-th call to the support they fixed the speed, which obviously somehow somewhere was left locked to previous 150Mbit limit. As some valuable addition to the thread I can say, that fasttrack rules aren't strictly required in my case: if there's no queues I still get 300Mbit despite 100% CPU load. With fasttrack rules CPU load is under 60%. With a single simple queue speed drops to <180 Mbit.
Many thanks for participation in solving :)
 
sindy
Forum Guru
Forum Guru
Posts: 10205
Joined: Mon Dec 04, 2017 9:19 pm

Re: Performance of Mikrotik 951G-2HnD

Wed Jul 06, 2022 4:42 pm

:D

The best possible outcome.

The documentation states that queues whose root parent is an interface queue can work even with fasttracking. I have never tried this because my routers are usually powerful enough to deal with the uplink bandwidth (which is often cased by low link bandwidth, not by high capacity of the router), but if you have a use case where packet marking in mangle is not necessary, you can try that too.
 
zaqik
newbie
Posts: 30
Joined: Mon Apr 13, 2020 5:31 pm

Re: Performance of Mikrotik 951G-2HnD

Thu Jul 07, 2022 11:21 am

queues whose root parent is an interface queue can work even with fasttracking
I didn't find where I can specify an Interface as the Parent for a Simple queue so I guess it's about Queue Tree. So for Queue Tree they work indeed. At least I see the correct counters so far.
Image

Not sure if they actually do or can do something similar to a simple queue which equally share the bandwidth between all hosts though.
Image

Looks like they can but - funny thing - on speeds lower than... 150 Mbit :D Having such queues with total limit 300 Mbit along with fasttrack create a 100% CPU load anyway. But it's a topic for another thread...

Who is online

Users browsing this forum: CedrikAlton, jamesperks, popecix and 74 guests