Page 1 of 1

Troubleshotting the load balancer

Posted: Tue Feb 09, 2016 10:00 pm
by paulogurgel
Hi guys, can you give me a advice?

I have a RB750r2 (RouterOS 6.2 if I'm not wrong, will check tomorrow, together with any information you need). This RB is used as a load balancer using PCC, for 4 "wan" links. They are links for 120/4, 60/3, 60/3 and 10/10 (Down and Up respectively, all values in Mbps). I will call then W1 trought W4 from now.

The objective is to provide internet connection for about 70-100 users at a medium sized office.

Now, whenever I do a Speedtest at the "Wan's" from any machine, every link except the W1 gives full throughtput. When I connect directly to the W1 Router from ISP, I get the full speed, but not behind the RB. When I check TX/RX from WinBox, I see that I get a max of 10/2 from this link if I have some people using this connection, or about 2/2 when I use it alone.

How can I troubleshoot what is happening? I don't see any bottleneck on CPU or Memory. Currently the PCC rules are marking connections to not use this link, but when everyone is at office, we have problems.

Speed limits are currently not set. The better scenario is to have only a minimum of 2 / 0.25, but I need to leave this elastic for some specific uses.

We currently do not have availability for a ISP that offers a more fair upload link.

Re: Troubleshotting the load balancer

Posted: Tue Feb 16, 2016 2:12 pm
by andrzejs
hi.
i have similar problem on 951G-2HnD FW: 3.24 and version 6.33.5
[wan1] have 160/20 on gbit link
[wan2] 80/40 on 100mbit link.
Together download speed does't exceed 100Mbps but should be +200Mbps
if disabe wan2 then wan1 reaches full speed 160Mbps.
if disabe wan1 then wan2 also reaches full speed 80Mbps.

But if wan1 and wan2 was enabled then speed was less 10Mbps?
Strange...
Help ;/

Re: Troubleshotting the load balancer

Posted: Tue Feb 16, 2016 2:59 pm
by Caci99
It's all about how you configure the PCC. You can't possibly load balance providers which have different factor. If one is giving you 160/20 the other 80/40 it just can't be load balanced at full use. One has a ratio of 8/1 the other 2/1.
Post your PCC rules and see how packets are divided.

Re: Troubleshotting the load balancer

Posted: Tue Feb 16, 2016 3:36 pm
by andrzejs
13 ;;; WAN1 3/0
chain=prerouting action=mark-connection new-connection-mark=WAN1_conn passthrough=yes dst-address-type=!local src-address-list=!vpnusers dst-address-list=!vpnusers in-interface=bridge-local connection-mark=no-mark
per-connection-classifier=both-addresses-and-ports:3/0 log=no log-prefix=""

14 ;;; WAN1 3/1
chain=prerouting action=mark-connection new-connection-mark=WAN1_conn passthrough=yes dst-address-type=!local src-address-list=!vpnusers dst-address-list=!vpnusers in-interface=bridge-local connection-mark=no-mark
per-connection-classifier=both-addresses-and-ports:3/1 log=no log-prefix=""

15 ;;; WAN2 3/2
chain=prerouting action=mark-connection new-connection-mark=WAN2_conn passthrough=yes dst-address-type=!local src-address-list=!vpnusers dst-address-list=!vpnusers in-interface=bridge-local connection-mark=no-mark
per-connection-classifier=both-addresses-and-ports:3/2 log=no log-prefix=""

Re: Troubleshotting the load balancer

Posted: Thu Feb 18, 2016 9:05 pm
by Caci99
13 ;;; WAN1 3/0
chain=prerouting action=mark-connection new-connection-mark=WAN1_conn passthrough=yes dst-address-type=!local src-address-list=!vpnusers dst-address-list=!vpnusers in-interface=bridge-local connection-mark=no-mark
per-connection-classifier=both-addresses-and-ports:3/0 log=no log-prefix=""

14 ;;; WAN1 3/1
chain=prerouting action=mark-connection new-connection-mark=WAN1_conn passthrough=yes dst-address-type=!local src-address-list=!vpnusers dst-address-list=!vpnusers in-interface=bridge-local connection-mark=no-mark
per-connection-classifier=both-addresses-and-ports:3/1 log=no log-prefix=""

15 ;;; WAN2 3/2
chain=prerouting action=mark-connection new-connection-mark=WAN2_conn passthrough=yes dst-address-type=!local src-address-list=!vpnusers dst-address-list=!vpnusers in-interface=bridge-local connection-mark=no-mark
per-connection-classifier=both-addresses-and-ports:3/2 log=no log-prefix=""
I see you have divided it in three streams, two of them on the Wan1 and the other on Wan2, which is logical since you have 160Mbps on Wan1 and 80Mbps on the next.
But flow isn't exactly like that. What you are actually dividing are packets. Packets can be of different sizes, some are 64B some 512 and some 1500. So what you need to look at is the average of packets that went through an interface during a period of time, say during a day. Also, flow isn't only about downloading, but uploading as well. Since the ratio of downloading between the two ISP is 2 to 1, but upload is 1 to 2, they are never gonna be perfectly balanced. You would need wan1=160/20 and wan2=80/10 or anything that has the same ratio in down and up. And latency plays it's part as well.