IBM i Network Performance

LANSA Integrator

IBM i - Network Performance

Network Tuning

Network performance is influenced by the Maximum Transmission Unit size, send and receive buffer size, port filtering, duplex settings and Domain Name lookup.

The Maximum Transmission Unit Size (MTU) parameter affects the actual size of the line flows.

By increasing the value of this parameter you can reduce the overall number of transmissions, and therefore, increase the potential capacity of the CPU and the IOP (input/output processor).

Similar parameters also exist on the client.

The negotiated value will be the minimum of the server and client (and perhaps any bridges/routers), so increase them all.

Setting the Maximum Transmission Unit

The maximum transmission unit (MTU) parameter is available on the following commands.

Add TCP/IP Interface (ADDTCPIFC)

Add TCP/IP Route (ADDTCPRTE)

Change TCP/IP Interface (CHGTCPIFC)

Change TCP/IP Route (CHGTCPRTE)

Following is a list of the maximum MTU values that you can specify, based on the line type:

Asynchronous (SLIP)

1006

DDI

4352

Ethernet 802.3

1492

Ethernet Version 2

1500

Frame relay

8177

Point-to-Point (PPP)

4096

Token ring (4 meg)

4060

Token ring (16 meg)

16388

Wireless 802.3

1492

Wireless Version 2

1500

X.25

4096

 

 

TCP/IP processing uses a small part of each datagram. Therefore, the whole datagram size is unavailable for user data.

The value of the maximum transmission unit used by TCP/IP processing depends on the value that you specify for the route on the MTU parameter of the route or interface commands mentioned previously. It also depends on the type of physical line that you use, the maximum frame size of the network line, and the SSAP maximum frame size.

Determining the Maximum Size of Datagrams

For a communications line, specify the maximum frame size on the appropriate Create Line Description command.

The maximum frame size is compared to the MTU value of the route or interface.

TCP/IP uses the lesser of these two values to determine the maximum size of datagrams that it sends by over this line.

For example, if you specify 1024 for the MTU parameter for a route attached to a communications line and the line description contained a value of 512 for a maximum frame size, the maximum datagram size value for the route that TCP/IP uses is 512.

If the line is varied off and you change the maximum frame size on the Token-ring line description to 1994, and then the line is varied on, the maximum transmission unit used for the route is reset to 1024 when the next TCP/IP operation occurs that causes a datagram to be sent.

 

Display TCP/IP Route

 

Route destination                          *DFTROUTE

Subnet mask                                *NONE

Type of service                            *NORMAL

Next hop                                   10.2.0.1

Preferred binding interface                *NONE

Maximum transmission unit                  *IFC

Duplicate route priority                   5

Route metric                               1

Route redistribution                       *NO

 

Display TCP/IP Interface

 

Internet address                           10.2.0.169

Subnet mask                                255.255.0.0

Line description                           ETHLINE

Line type                                  *ELAN

Associated local interface                 *NONE

Interface status                           Active

Type of service                            *NORMAL

Maximum transmission unit                  1492

Automatic start                            *YES

 

TCP/IP Buffer Size

Server performance can be improved by tuning the buffer size that is used by TCP/IP.

If your network is very reliable, try increasing the buffer size from the default value.

If your network experiences a significant amount of collisions or congestion, you may be able to improve performance by decreasing the TCP/IP send and receive buffers. This is because it will take less time to detect a bad packet, and less data will need to be re-transmitted.

Select a size in the range of 32K to 128K, and use the same size for both buffers.

Setting the buffer size to a large value, 8388608 for example, can cause storage allocation problems on your machine. This is because every TCP/IP connection allocates 8MB of storage for its receive buffer.

For best use of resources the buffer size should be a multiple of the amount of data a datagram can hold, this is called the maximum segment size (MSS).

To determine the MSS is problematic as the IP header and the TCP header may vary in length. An optimistic position assumes that both the IP header and the TCP header are minimum size, that is, 20 octets each.

The value of the MSS is the MTU minus (20 + 20), which is 1492 - 40 = 1452 bytes.

You need to make the buffers' size a multiple of the MSS.

For a buffer size of about 32K, you calculate it as follows: 32,000 / 1,452 = 22.04.

Discard the decimal places in the result and multiply the whole number by the MSS.

22 * 1,452 = 31,944

That's the number to set your send and receive buffer sizes too.

 

Change TCP/IP Attributes

 

TCP keep alive                             120

TCP urgent pointer                         *BSD

TCP receive buffer size                    31944

TCP send buffer size                       31944

TCP R1 retransmission count                3

TCP R2 retransmission count                16

TCP closed timewait timeout                120

UDP checksum                               *YES

 

Duplex

Ethernet supports both half and full duplex.

The best performance will be with full duplex.

However, the duplex setting on the line description must match the setting on the port on the switch if the line is hooked up to a switch.

Be especially careful if you set your ethernet switch or your line description to *AUTO. It has been found in many cases that performance is severely degraded because the duplex setting did not auto-negotiate correctly.

It is probably best to configure switches and line descriptions to either *FULL or *HALF explicitly.

If the line is connected to a 'stackable' hub, then the duplex setting on the line should be set to *HALF to match the hub setting.

Domain Name Server Lookup

TCP/IP connection performance can be improved if the registered DNS servers are available and performing well.

The JSM_OPEN Built-In Function performs a DNS lookup to resolve the host name address. Using a dotted decimal IP address does not get around this DNS lookup.

If the JSM_OPEN Built-In Function is slow to open a connection then you could have a DNS lookup issue. Add an entry to the local host table to improve performance.

 

Change TCP/IP Domain

Host name search priority           *LOCAL

Domain name server

Internet address                    139.130.4.4

                                    203.48.48.13

 

If the first Domain Name Server (DNS) in the list does not respond, the second DNS server in the list will be contacted. If the second DNS server does not respond, the third DNS server will be contacted.