ADC Home > Reference Library > Technical Q&As > Carbon > Networking >
|
Q: I'm developing some TCP software for an unusual networking environment (cable modem, satellite link, very fast network, etc) and I've been told that I might get performance benefits by changing the "TCP window size." How do I do this under Open Transport? A:
Technically, the TCP window size is a dynamic value that is calculated on the fly
by the TCP software; however, when most people talk about changing the TCP window
size, they are referring to the upper bound of this value. Under OT, you can
change this upper bound using the Note that TCP is a full duplex protocol, and therefore there are two window sizes: one advertised by your machine for incoming data, and another advertised by the remote machine for data that you send it. You can only directly affect the window size for your receiving side of the TCP connection. There is no way for you to influence the window size advertised by the remote machine without the explicit cooperation of some process on that machine. Depending on your situation, you may need to change this option on the remote machine to achieve the effect you want. Changing the Technical Q&A NW 28 provides a code snippet
that shows how to set an option on a TCP endpoint. You can use similar code to
set the Note that changing these values can yield unexpected results; it's not always a question of "bigger is faster." In certain circumstances (like those given in the question) it may be advantageous to change these values, but this isn't true for all cases. I recommend that you test your application in a variety of realistic circumstances before deciding to ship code that changes the window size. |
|