Community discussions

MikroTik App
 
imamic
just joined
Topic Author
Posts: 18
Joined: Fri Jan 14, 2022 9:52 am

RB4011gs+ speed issue

Sun Apr 03, 2022 2:58 pm

Hi everyone,

Hope everyone doing well in these chaotic days :(

I have issue with speed with RB4011GS. I have PPoE configured (bridge+VLAN) with directly from ONT to Mikrotik.

I have 1 gbit download and 500 upload, but issue is that data over TCP goes around 500-600 mbit max (download)
When I do iperf and choose UDP it goes 1 gigabit as should. Only TCP is ssue ....

I enabled fastpath but it didnt helped. Can someone can help me to solve this issue?

CAT7 lan cable is everywhere. LAN cards are 1 gigabit

Thank you for help
Nice day
 
User avatar
anav
Forum Guru
Forum Guru
Posts: 22041
Joined: Sun Feb 18, 2018 11:28 pm
Location: Nova Scotia, Canada
Contact:

Re: RB4011gs+ speed issue

Sun Apr 03, 2022 3:36 pm

/export file=anynameyouwish
 
imamic
just joined
Topic Author
Posts: 18
Joined: Fri Jan 14, 2022 9:52 am

Re: RB4011gs+ speed issue

Sun Apr 03, 2022 3:52 pm

Here it is .. thank you :)
You do not have the required permissions to view the files attached to this post.
 
User avatar
mkx
Forum Guru
Forum Guru
Posts: 13011
Joined: Thu Mar 03, 2016 10:23 pm

Re: RB4011gs+ speed issue

Sun Apr 03, 2022 4:22 pm

I have 1 gbit download and 500 upload, but issue is that data over TCP goes around 500-600 mbit max (download)
When I do iperf and choose UDP it goes 1 gigabit as should. Only TCP is ssue ....

When running the TCP test, run profiler to see if any single CPU core is utilized 100%.

What kind of TCP test is it? If it's iperf, run multiple (e.g. 4) parallel streams. It's a well known fact that TCP streams don't scale throughput well due to various reasons (speedtest.net has gone to multiple parallel streams ages ago for this reason). One of reasons is that ROS (for example) processes all packets of same TCP connection using same core to avoid possibility of causing out-of-order packet delivery (which is one of thing most detrimental to TCP flows) and if this is the problem, you'll see one CPU core at 100% while others will be almost idle. RB4011 throughput tests do indicate that it's capable of around 2.5Gbps real-life, but that involves number of parallel streams (and multiple interfaces).
 
User avatar
bpwl
Forum Guru
Forum Guru
Posts: 3124
Joined: Mon Apr 08, 2019 1:16 am

Re: RB4011gs+ speed issue

Sun Apr 03, 2022 4:27 pm

And, who knows, TCP congestion control might kick in and limit the data rate, if not compensated by using enough TCP streams ...
https://en.wikipedia.org/wiki/TCP_congestion_control
 
imamic
just joined
Topic Author
Posts: 18
Joined: Fri Jan 14, 2022 9:52 am

Re: RB4011gs+ speed issue

Sun Apr 03, 2022 4:28 pm

No issue with CPU, just tested.

CPU1 is from 12-15%
CPU2 is from 7-20%
CPU3 is from 2-4%
CPU4 is from 2-4%

Tried with iperf3 from linux machine
Also tried speedtest.net from windows and linux machine

This is TCP

[ ID] Interval Transfer Bandwidth Retr Cwnd
[ 4] 0.00-5.00 sec 272 MBytes 456 Mbits/sec 28 504 KBytes
[ 4] 5.00-10.00 sec 283 MBytes 474 Mbits/sec 54 538 KBytes
[ 4] 10.00-15.00 sec 283 MBytes 475 Mbits/sec 431 278 KBytes
[ 4] 15.00-20.00 sec 285 MBytes 478 Mbits/sec 296 380 KBytes
[ 4] 20.00-25.00 sec 279 MBytes 469 Mbits/sec 256 297 KBytes
[ 4] 25.00-30.00 sec 278 MBytes 467 Mbits/sec 226 381 KBytes
- - - - - - - - - - - - - - - - - - - - - - - - -
[ ID] Interval Transfer Bandwidth Retr
[ 4] 0.00-30.00 sec 1.64 GBytes 470 Mbits/sec 1291 sender
[ 4] 0.00-30.00 sec 1.64 GBytes 469 Mbits/sec receiver

UDP test

CPu1 is around 75%
CPU2-4 are 0%

But here I get speed that is ok

[ ID] Interval Transfer Bandwidth Total Datagrams
[ 4] 0.00-5.00 sec 538 MBytes 902 Mbits/sec 68841
[ 4] 5.00-10.00 sec 547 MBytes 918 Mbits/sec 70073
[ 4] 10.00-15.00 sec 550 MBytes 922 Mbits/sec 70355
[ 4] 15.00-20.00 sec 549 MBytes 921 Mbits/sec 70262
[ 4] 20.00-25.00 sec 549 MBytes 921 Mbits/sec 70241
[ 4] 25.00-30.00 sec 547 MBytes 918 Mbits/sec 70004
- - - - - - - - - - - - - - - - - - - - - - - - -
[ ID] Interval Transfer Bandwidth Jitter Lost/Total Datagrams
[ 4] 0.00-30.00 sec 3.20 GBytes 917 Mbits/sec 0.000 ms 0/0 (-nan%)
[ 4] Sent 0 datagrams
 
User avatar
mkx
Forum Guru
Forum Guru
Posts: 13011
Joined: Thu Mar 03, 2016 10:23 pm

Re: RB4011gs+ speed issue

Sun Apr 03, 2022 4:47 pm

This is TCP
... and it's single stream. Try multiple streams.

And beware that by default iperf runs test where client is transmitting. If internet site hosts iperf in server mode and your LAN machine is used as iperf client, then by default you're testing uplink direction.
 
imamic
just joined
Topic Author
Posts: 18
Joined: Fri Jan 14, 2022 9:52 am

Re: RB4011gs+ speed issue

Sun Apr 03, 2022 6:30 pm

This is TCP
... and it's single stream. Try multiple streams.

And beware that by default iperf runs test where client is transmitting. If internet site hosts iperf in server mode and your LAN machine is used as iperf client, then by default you're testing uplink direction.
Then I would also have 500 mbits with UDP because the upload is 500 mbits.
 
imamic
just joined
Topic Author
Posts: 18
Joined: Fri Jan 14, 2022 9:52 am

Re: RB4011gs+ speed issue

Sun Apr 03, 2022 6:34 pm

I use this command for TCP

iperf3 -c 195.29.4.150 -t 30 -p 5201 -i 5 -b 1G

Approx 500 mbit

And this one for UDP

iperf3 -c 195.29.4.150 -t 30 -p 5201 -i 5 -b 1G -u

Approx 1gbit


Internet connection is 1000/500mbit

Thanks
 
imamic
just joined
Topic Author
Posts: 18
Joined: Fri Jan 14, 2022 9:52 am

Re: RB4011gs+ speed issue

Sun Apr 03, 2022 6:37 pm

Tried with 5 threads, same issue

[ ID] Interval Transfer Bandwidth Retr
[ 4] 0.00-30.00 sec 343 MBytes 95.8 Mbits/sec 218 sender
[ 4] 0.00-30.00 sec 342 MBytes 95.7 Mbits/sec receiver
[ 6] 0.00-30.00 sec 350 MBytes 97.9 Mbits/sec 184 sender
[ 6] 0.00-30.00 sec 350 MBytes 97.8 Mbits/sec receiver
[ 8] 0.00-30.00 sec 360 MBytes 101 Mbits/sec 225 sender
[ 8] 0.00-30.00 sec 360 MBytes 101 Mbits/sec receiver
[ 10] 0.00-30.00 sec 369 MBytes 103 Mbits/sec 214 sender
[ 10] 0.00-30.00 sec 368 MBytes 103 Mbits/sec receiver
[ 12] 0.00-30.00 sec 362 MBytes 101 Mbits/sec 187 sender
[ 12] 0.00-30.00 sec 362 MBytes 101 Mbits/sec receiver

[SUM] 0.00-30.00 sec 1.74 GBytes 499 Mbits/sec 1028 sender
[SUM] 0.00-30.00 sec 1.74 GBytes 498 Mbits/sec receiver
 
User avatar
anav
Forum Guru
Forum Guru
Posts: 22041
Joined: Sun Feb 18, 2018 11:28 pm
Location: Nova Scotia, Canada
Contact:

Re: RB4011gs+ speed issue

Sun Apr 03, 2022 6:48 pm

Its called divine justice. The router is mad at you cause you dont have any credible firewall setup to protect the router or network. ;-P
 
imamic
just joined
Topic Author
Posts: 18
Joined: Fri Jan 14, 2022 9:52 am

Re: RB4011gs+ speed issue

Sun Apr 03, 2022 7:19 pm

Sure sure ... do you know what issue is ? Can you help me to solve it :=)
 
User avatar
chechito
Forum Guru
Forum Guru
Posts: 3144
Joined: Sun Aug 24, 2014 3:14 am
Location: Bogota Colombia
Contact:

Re: RB4011gs+ speed issue

Sun Apr 03, 2022 7:49 pm

try with cpu at 1800mhz on system routerboard you can set that (its safe, i have dozens of rb4011 without problem at 1800mhz)

as you are using 6.49.5 you dont need to reboot to see clock speed aplyied

then test and see if performance improves

then return to stock cpu clock speed
 
imamic
just joined
Topic Author
Posts: 18
Joined: Fri Jan 14, 2022 9:52 am

Re: RB4011gs+ speed issue

Sun Apr 03, 2022 8:11 pm

Changed, tested. Same issue :)

UDP 1 gigabit
TCP 500 mbit

CPU 1800 mhz

:( anything else?
 
User avatar
mkx
Forum Guru
Forum Guru
Posts: 13011
Joined: Thu Mar 03, 2016 10:23 pm

Re: RB4011gs+ speed issue

Sun Apr 03, 2022 10:48 pm

I use this command for TCP

As I wrote, default is that client sends traffic, if client is LAN host, you're testing uplink speed. If you want to test downlink, use command line parameter
-R, --reverse
              reverse the direction of a test, so that the server sends data to the client

A short explanation about UDP tests: UDP has no feedback (TCP has acknowledgements) which means that iperf3 client sending UDP traffic will send packets at rate specified. The only feedback application (iperf) gets is from local IP stack which will throttle Tx rate to the interface capability. If there's a bottlebeck further upstream, then the router at the bottleneck entrance will drop packets and sending party will not get any feedback about it. Which means that when performing UDP iperf3 tests, it's vital to check test results on the receiving side (by default that's where iperf3 is run in server mode).

I still think you're actually testing uplink speed with your iperf3 tests.
 
imamic
just joined
Topic Author
Posts: 18
Joined: Fri Jan 14, 2022 9:52 am

Re: RB4011gs+ speed issue

Mon Apr 04, 2022 12:18 am

Here is with reverse mode

Reverse mode, remote host is sending

[ ID] Interval Transfer Bandwidth
[ 4] 0.00-5.00 sec 332 MBytes 557 Mbits/sec
[ 4] 5.00-10.00 sec 337 MBytes 565 Mbits/sec
[ 4] 10.00-15.00 sec 337 MBytes 565 Mbits/sec
[ 4] 15.00-20.00 sec 337 MBytes 565 Mbits/sec
[ 4] 20.00-25.00 sec 337 MBytes 565 Mbits/sec
[ 4] 25.00-30.00 sec 336 MBytes 564 Mbits/sec
- - - - - - - - - - - - - - - - - - - - - - - - -
[ ID] Interval Transfer Bandwidth Retr
[ 4] 0.00-30.00 sec 1.97 GBytes 564 Mbits/sec 1085 sender
[ 4] 0.00-30.00 sec 1.97 GBytes 564 Mbits/sec receiver


Here is with "normal" mode

Connecting to host
[ 4] local 192.168.1.52 port 52079 connected
[ ID] Interval Transfer Bandwidth Retr Cwnd
[ 4] 0.00-5.00 sec 300 MBytes 503 Mbits/sec 66 706 KBytes
[ 4] 5.00-10.00 sec 304 MBytes 510 Mbits/sec 15 638 KBytes
[ 4] 10.00-15.00 sec 304 MBytes 511 Mbits/sec 39 573 KBytes
[ 4] 15.00-20.00 sec 304 MBytes 511 Mbits/sec 17 522 KBytes
[ 4] 20.00-25.00 sec 304 MBytes 510 Mbits/sec 10 672 KBytes
[ 4] 25.00-30.00 sec 303 MBytes 508 Mbits/sec 32 613 KBytes
- - - - - - - - - - - - - - - - - - - - - - - - -
[ ID] Interval Transfer Bandwidth Retr
[ 4] 0.00-30.00 sec 1.78 GBytes 509 Mbits/sec 179 sender
[ 4] 0.00-30.00 sec 1.78 GBytes 508 Mbits/sec receiver

Same issue
 
User avatar
Buckeye
Forum Veteran
Forum Veteran
Posts: 906
Joined: Tue Sep 11, 2018 2:03 am
Location: Ohio, USA

Re: RB4011gs+ speed issue

Mon Apr 04, 2022 1:47 am

-R and -P are not mutually exclusive. In other words you can use both at the same time, and because of latency and window size, you may need more than one stream.

Go back and read the previous responses.

TCP throughput calculator

And it also assumes the iperf3 server is willing/able to send data to you at 1Gbps, and that the path between you and the server is able to pass that data.

If you want to test the RB4011, you should be running a local server and client with the RB4011 between. Then you are in control of the environment.

Here's an example of a controlled test with a baseline test using only a wire between the two test PCs running iperf (yes, iperf as in iperf2, which is not the same as iperf3): How to test router performance with iperf (with preliminary baseline test) Testing Ubiquiti’s 5 Port EdgeRouter Using iperf by Tony Fortunato (The Technology Firm)
 
imamic
just joined
Topic Author
Posts: 18
Joined: Fri Jan 14, 2022 9:52 am

Re: RB4011gs+ speed issue

Mon Apr 04, 2022 12:51 pm

Tried everything ... same issue. Reverse and normal.

Will try today with different mikrotik ....
 
imamic
just joined
Topic Author
Posts: 18
Joined: Fri Jan 14, 2022 9:52 am

Re: RB4011gs+ speed issue

Tue Apr 05, 2022 1:47 pm

Same issue with another mikrotik. Will try to change ONT if you thin configuration is good

Who is online

Users browsing this forum: net4gyh, Pigsfoot and 85 guests