So let's go through a scenario. I have 2 DCs (in 2 different cities) and
have 1 Gig link between them. However, max throughput I get between 2 servers
is nowhere near my link capacity. So what could be the reason?
This is how the TCP throughput is calculated.
TCP Window size (in bits) / Latency in seconds = TCP Throughput.
So in above example, if my TCP windows size is standard 64K and assumes the latency between 2 DCs is 20 milliseconds, then the maximum throughput I will get is
524288 / .02 = 26214400 that is 26.21 Mbps
Now as we can see, 2 factors that decide the maximum throughput on a link are
·
TCP window size
·
Latency in seconds
Now, what can we do to maximize
the throughput? One such solution is to increase the TCP window size on the
servers. So in my case, what should be
the maximum window size on my servers to get the 1Gig throughput? Let's calculate
X / 0.02 = 1Gbps, that is 2500000 bytes or 2441.4 KBs
But then there are issues with increasing the TCP window size like the retransmission of the whole window is needed if a packet is dropped and it also requires deep buffered on servers until the acknowledgement is done from the other side.
For solving the above issues, we
can have a WAN optimization device at the edge. This device can do the TCP
selective retransmission and also the local ack to the server. They also do
layer 7 optimization which can increase the link utilization.
No comments:
Post a Comment