On a Windows machine, the standard TCP Window Size is 64KB. 64KB converted to bits = 524288
64KB = 65536 Bytes
65536 Bytes * 8 = 524288 bits
Calculate TCP throughput:
Formula:
Window Size / RTT = Throughput
Windows Size in bps (bits per second)
RTT in seconds
Throughput in bps (bits per second)
Lets say you have a 1Gig link between Miami and NY and your latency is 33 milliseconds.
524288 bits / 0.033 = 15,887,515 = 15.8 Mbps MAX Possible Throughput
What this is saying is that if you have two servers, one in Miami and one in NY, and you start a file transfer between the two of them, the most throughput you will get is 15.8Mbps. It doesn’t matter that you have a 1Gig link.
Calculate the Optimal TCP Window Size:
Formula:
Bandwidth * RTT = Windows Size /8 = Window Size
Bandwidth in bps (bits per second)
RTT in seconds
Windows Size in bps (bits per second)
Windows Size in bytes
Now let’s say you want to use the full 1Gig link to do the transfer. What TCP Windows Size will you need?
1,000,000,000 * 0.033 = 30,303,030,303 / 8 = 3,787,878,787 = 3787KB
The TCP Windows Size will have to be set to 3787KB on both servers.
Calculate Maximum Latency for a Desired Throughput:
Formula:
Windows Size / Desired Throughput = MAX RTT
Windows Size in bps (bits per second)
Desired Throughput in bps (bits per second)
RTT Max in seconds
What is the maximum amount of latency to achieve 1Gig data transfer speeds?
524288 / 1,000,000,000 = 0.000524288 seconds = 0.5242 ms
So the maximum amount latency on a 1 Gig pipe is 0.5242 ms.