gtpc1m1rTransmission Control Protocol/Internet Protocol

Tuning TCP/IP Native Stack Support

This section describes how to tune parameters in the TPF system and in the network.

Tuning Major Control Block Structures

The ZTTCP DISPLAY STATS command display includes the maximum number of socket block entries and maximum number of IPMT entries that were in use at any time since the last IPL of the TPF system. Monitor this information to see if either control block is approaching the limit that you defined and, if so, increase the number of control block entries:

Tuning the IP over CDLC Link Layer

Examine IP trace data during a peak traffic period to see how many IP packets are sent and received in each write and read channel program. The value of the IPRBUFFS parameter on the SNAKEY macro in CTK2 defines the maximum number of packets that can be sent or received in one channel program. Packets that were sent or received in the same channel program will have the same time stamp in the IP trace display. If the average number of packets in each write or read channel program is at or near the maximum that you defined, increase the value of the IPRBUFFS parameter so more data can be sent in each channel program.

The value of the IPRBUFSZ parameter on the SNAKEY macro in CTK2 defines the maximum size of a packet that can be sent or received. For stream sockets, the maximum amount of user data that can be sent or received in a packet is the value of IPRBUFSZ minus the combined size of the link header, IP header, and TCP protocol header. Code IPRBUFSZ based on the average size of TCP messages (amount of user data in each message) in your network as follows:

Average Message Size IPRBUFSZ Value
1-976 1024
977-2000 bytes 2048
Over 2000 bytes 4096

Even if you set IPRBUFSZ to a value that is smaller than your average message size, you can still send large messages. However, those messages will be sent in smaller pieces causing more packets to flow.

Setting IPRBUFSZ to a large value does not guarantee that large packets will flow. When a stream socket is started, the two sides negotiate the maximum size of a packet that can be sent on the socket. If the remote node suggests a maximum packet size that is less than the value of IPRBUFSZ, the value suggested by the remote node is used.

Tuning the IP Network

The ZTTCP DISPLAY STATS command display shows the number of IP fragments received. If the display shows that a large amount of fragmented messages are being received, examine the network and take the following actions to avoid IP packets from being fragmented:

  1. Identify the intermediate network device that is fragmenting the packets and increase the maximum packet size of that network device to a value large enough to avoid fragmentation.
  2. Lower the value of the maximum packet size used by TCP connections with the TPF system by doing the following:

The ZTTCP DISPLAY STATS command display also shows the number of TCP packets that were retransmitted by the TPF system. If the number of retransmitted packets is high, this usually indicates congestion problems in the network that should be investigated.