Window Size

The window size associated with a TCP connection determines the amount of unacknowledged data that can be outstanding between the sender and the receiver. Generally, it is the amount of data that can be in transit, somewhere in the network, between the two. The optimal window size for a particular connection can be calculated using the formula:
    optimal window size = round-trip time * network bandwidth
For example, with a round-trip time of 15 milliseconds on a 16 megabit (that is, 2 MB) token ring, the optimal window size is
    .015 seconds * 2,000,000 bytes/second = 30,000 bytes

The window size for data being received by TCP/IP for z/VM is determined by the size of the z/VM client's buffer. For example, the z/VM FTP client uses the size of the data buffer, specified by the DATABUFFERPOOLSIZE configuration statement, as its receive window size.

The window size for data being transmitted by TCP/IP for z/VM is set by the receiving system. Some systems have explicit controls that permit the window size to be set. For example, AIX® allows the sizes of its send and receive windows to be set either temporarily or permanently.

TCP/IP for z/VM provides a way to increase window sizes for incoming TCP data regardless of the client's buffer size. By implementing window scaling, it allows window sizes to be as large as 1 GB. In order to take advantage of window scaling, both the sending and receiving TCP/IPs must support it, as specified in RFC 1323. Without window scaling, the maximum window size is 65,535 bytes.

Window scaling in TCP/IP for z/VM is controlled by several parameters. Unless the NORFC1323 option of the ASSORTEDPARMS statement is specified, TCP/IP for z/VM attempts to establish window scaling for any TCP connection it initiates. Regardless of this setting, requests to support window scaling from other systems are accepted. The window size is set by multiplying the data buffer size, specified by the DATABUFFERPOOLSIZE statement, by the appropriate (i.e., send or receive) buffer limit, specified by the DATABUFFERLIMITS configuration statement.

The settings of these parameters can affect the number of data buffers required for a given TCP/IP workload and may require increasing the size of the data buffer pool. This in turn may increase TCP/IP storage requirements, leading to additional paging. As a result, the parameter settings should be selected with care.

When window scaling is active, the receive window size determines the size of the window that is advertised to the communicating partner. The send window size determines the maximum amount of data that the local z/VM client can have in transmission through the network at any one time.

Window scaling is most effective for networks that have large round trip times and large bandwidths (that is, networks whose optimal window size exceeds the actual window size when window scaling is not used).