cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
1158
Views
0
Helpful
3
Replies

TCP windows size problem

tanszewee
Level 1
Level 1

i have a 45M line between two locations with latency of 440ms. transfer file size 4MB between two file server take about 2.5min which is too long . any idea ?

Also

Can you show need how to calc the windows size and max byte/second i can transfer between this two location ?

3 Replies 3

tdrais
Level 7
Level 7

The TCP window size defaults and values vary based on the implementation of the tcp stack. In most cases you can set the maximum to 64k bytes. The default many times is 16k bytes

If your round trip time is 440ms this means if your were to transfer the total buffer as one big packet you would have to wait 440ms before you would get your acknowledgement back and could transfer the next buffer. Of course it is not really sent as a single big packet but it is simpler to understand than the calculating average bytes unacknowledged.

This equates to 1/.440 windows/second.

So with a windows size of 16k,32k,64kyou get

16kbytes*1/.44 36kbytes/second

32kbytes*1/.44 72kbytes/second

64kbytes*1/.44 144kbytes/second

You will notice that 144kbytes/second is still only 144*8 (1152k bits/second) which is well below your t3 line.

If we take your example your get 2.5*60 150seconds. 4096k/150 27kbytes/second. This is still below even the 36kbytes you should get with a 16k window.

In general the tcp window size will start small and the two end machine will raise this to their maximum over time. If they get lose they of course have to retransmit any lost data and then they reset the window back to a lower level. It depends on the stack and how it works. You can many times tune the stack for how quickly it increases the size.

First thing is to run a sniffer on one of the end machines and actually look at the window size being used. Then ensure you are seeing no lose or retransmission. The window size can be different on the sending and receiving side so you need to be sure you are looking at the correct one.

Some application also do not make use of the tcp window. They do their own acknoledgements and can be much smaller than the window size. Telnet is one of the worst offenders in that some implementation will send a single character at a time.

Hopefully this makes it a little more clear.

So many non technical people think its all a matter of buying more bandwidth.

Can you increase your TCP windows size to more than 64Kbytes ?

Nope its a field in the tcp header and is 2 bytes.

Review Cisco Networking for a $25 gift card