Question

In theory, max tcp speed is min{rwnd,cwnd} / RTT, where cwnd is congestion window size and rwnd is the receive window size. Assuming cwnd is big enough, it would then just be rwnd/RTT. Now, if the max window size is 65Kbytes I get (using these calculations from some site):

RTT 10 ms => TCP throughput = 52428000 bps = 52Mbps
RTT 20 ms => TCP throughput = 26214000 bps = 26Mbps
RTT 50 ms => TCP throughput = 10485600 bps = 10Mbps
RTT 100 ms => TCP throughput = 5242800 bps = 5.2Mbps
RTT 150 ms => TCP throughput = 3495200 bps = 4.3Mbps
RTT 200 ms => TCP throughput = 2621400 bps = 2.5Mbps
RTT 300 ms => TCP throughput = 1747600 bps = 1.7Mbps
RTT 500 ms => TCP throughput = 1048560 bps = 1Mbps

How accurate is this? Since I can download from a website (not torrent, direct download) at 5Mbps while having more than 200ms RTT, so I'm above the theoretical max, why does this happen? Do browsers use more than 1 tcp connection for downloads?

Also, I would like to know where exactly rwnd/RTT actually comes from, since rwnd bytes can (and will surely be) be more than 1 TCP segment size, meaning you would be sending way more than 1 segment per RTT start, meaning 1 RTT won't be enough to send and receive ACKs from all the segments sent, so rwnd/RTT actually is pretty far away from the real throughput.

Was it helpful?

Solution 2

Do I understand you correctly that you wonder how you can receive "faster that possible"?

The formula you state is correct. The window(s) and the RTT determine your bandwidth (there are other factors, but in most cases these are the important ones).

But I'm wondering about your numbers.

Ad 1) Are you sure about the RTT? This seems pretty high for regular downloads, unless the are transcontinental. Check the RTT by using ping (e.g. ping simtel.net, replace the host name with the host name in question). You can use a more accurate ping utility like my hrping (http://www.cfos.de/ping) (for Windows).

Ad 2) Are you sure about the Window size? 64k is pretty low today, all modern OSes try to negotiate more than that through RFC 1323 Window Scaling (http://en.wikipedia.org/wiki/TCP_window_scale_option). You can use SG TCP/IP Analyzer (http://www.speedguide.net/analyzer.php) to check your RWIN. Another greate tool for checking your connection is Netalyzr (http://netalyzr.icsi.berkeley.edu).

I would be interested to see the measured figures.

OTHER TIPS

The max window size is not 65Kbytes. The max window size is 65,535 window size units, which may or may not be bytes.

I'm not quite sure I follow your last question. What does the segment size have to do with anything? You can send whatever data you're sending using as many segments as you need.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top