TCP performance over Mikrotik
Posted: Mon May 28, 2012 10:01 am
Hey everyone,
I'm experiencing a strange problem with some of our gateways. It has already been here (unsolved) with some variations:
http://forum.mikrotik.com/viewtopic.php?f=7&t=60663
http://forum.mikrotik.com/viewtopic.php?f=7&t=60337
The general problem is following - Suppose you have three mikrotiks connected in line.
A <----> B <-----> C
A and C are "anything", B is a firewall with connection tracking and NAT turned on.
I do bandwidth test over TCP with a single connection (simulating real user http throughput).
A to B works okay, ~100Mbit of ethernet speed.
B to C works okay, same.
A to C gives only around 5-20Mbit.
There's no queueing on B's setup, nothing that could anyhow affect the performance of TCP. No layer7, no mangling, only the NAT+conntrack.
I have also tried with A and C being linux routers, single connection transfer also gives max. around 20Mbit.
I noticed that the limited speed scales exactly with TCP connection count, if you put 2 TCP connections, you got twice the speed.
I also noticed some dependency on CPU load (more like 5Mbit in the evening peaks, 20Mbit during early morning silence), but I cannot confirm this yet ('tis graphing right now).
I confirmed the problem when B was rb1100ah2x, rb1200, rb1000, with clean config except for a single SNAT rule, all recent versions (5.14-5.16). Problem doesn't happen when B is x86 PC and also on (some) RB1000's. I'm afraid this also happens on 711's and SXT's too (for me, it would mean fixing/replacing around 2000 of them), but wasn't able to confirm that yet.
Any idea what could cause such a limit?
Thanks
-exa
PS. This actually totally sucks for an ISP who is (sadly) deemed to rely on "speedtest.net" for showing/selling his service.
PPS. I cannot confirm this problem exists also with conntrack turned off - affected machines currently cannot be replaced, and I wasn't able to find a lab setup that would be affected by the problem yet (I don't have any spare 1100's to play with )
I'm experiencing a strange problem with some of our gateways. It has already been here (unsolved) with some variations:
http://forum.mikrotik.com/viewtopic.php?f=7&t=60663
http://forum.mikrotik.com/viewtopic.php?f=7&t=60337
The general problem is following - Suppose you have three mikrotiks connected in line.
A <----> B <-----> C
A and C are "anything", B is a firewall with connection tracking and NAT turned on.
I do bandwidth test over TCP with a single connection (simulating real user http throughput).
A to B works okay, ~100Mbit of ethernet speed.
B to C works okay, same.
A to C gives only around 5-20Mbit.
There's no queueing on B's setup, nothing that could anyhow affect the performance of TCP. No layer7, no mangling, only the NAT+conntrack.
I have also tried with A and C being linux routers, single connection transfer also gives max. around 20Mbit.
I noticed that the limited speed scales exactly with TCP connection count, if you put 2 TCP connections, you got twice the speed.
I also noticed some dependency on CPU load (more like 5Mbit in the evening peaks, 20Mbit during early morning silence), but I cannot confirm this yet ('tis graphing right now).
I confirmed the problem when B was rb1100ah2x, rb1200, rb1000, with clean config except for a single SNAT rule, all recent versions (5.14-5.16). Problem doesn't happen when B is x86 PC and also on (some) RB1000's. I'm afraid this also happens on 711's and SXT's too (for me, it would mean fixing/replacing around 2000 of them), but wasn't able to confirm that yet.
Any idea what could cause such a limit?
Thanks
-exa
PS. This actually totally sucks for an ISP who is (sadly) deemed to rely on "speedtest.net" for showing/selling his service.
PPS. I cannot confirm this problem exists also with conntrack turned off - affected machines currently cannot be replaced, and I wasn't able to find a lab setup that would be affected by the problem yet (I don't have any spare 1100's to play with )