10.12 Problem With
Incorrect Subnet Mask
To avoid fragmentation of kernel memory and the overhead of numerous calls to xmalloc(), common buffer pools are shared by the various layers of the communication subsystem. The mbuf management facility controls two pools of buffers: a pool of small buffers (256 bytes each), which are simply called mbufs, and a pool of large buffers (4096 bytes each), which are usually called mbuf clusters, or just clusters. The pools are created from system memory by making an allocation request to the Virtual Memory Manager (VMM). The pools consist of pinned pieces of virtual memory; this means that they always reside in physical memory and are never paged out. The result is that the real memory available for paging in application programs and data has been decreased by the amount that the mbuf pools have been increased. On the other hand, network problem will arise if there is not enough memory available for the buffer pools to satisfy network sessions.
The maximum amount of memory, in kilobytes, allocated to the mbuf pools is specified in the thewall parameter of the no command. The default values for thewall in various AIX versions are:
When the no command is used to change parameters, the change is in effect only until the next system boot. At that point all parameters are initially reset to their defaults. To make the change permanent, you should put the appropriate no command in the /etc/rc.net file.
The mbuf allocation mechanism in AIX Version 4 is substantially different. In AIX Version 4, you can set the maximum amount of memory that will be used by the network allocator in the same way you set this in AIX Version 3.2.5-with the no command and thewall parameter. All other tuning options that were available in AIX Version 3.2.5 have been removed from AIX Version 4 because the AIX Version 4 mbuf allocation mechanism is much more self-tuning.
While you will not be able to alter the lowclust and lowmbuf attributes as in AIX Version 3, you can increase the amount defined to thewall and observe from the kernel malloc statistics from the netstat -m command that the number of mbufs has been raised.
The initial default value of thewall and the output from netstat -m are:
# no -o thewall thewall = 65488 # netstat -m Kernel malloc statistics: ******* CPU 0 ******* By size inuse calls failed free hiwat freed 32 163 313 0 93 640 0 64 88 158 0 40 320 0 128 71 316 0 25 160 0 256 99 2726 0 13 384 0 512 76 375 0 4 40 0 1024 32 104 0 4 100 0 2048 0 4 0 2 100 0 4096 35 68 0 3 120 0 16384 1 1 0 18 24 7 32768 1 1 0 0 511 0 By type inuse calls failed memuse memmax mapb Streams mblk statistic failures: 0 high priority mblk failures 0 medium priority mblk failures 0 low priority mblk failures #
The value of thewall is then increased from 65488 to 98232:
# no -o thewall=98232 #
The change takes effect immediately for new connections. However, there will not be any change to the kernel malloc statistics until some network traffic has occurred. Perform an FTP session to transfer some files from another system. This updates the kernel malloc statistics. The netstat -m command output is:
# netstat -m Kernel malloc statistics: ******* CPU 0 ******* By size inuse calls failed free hiwat freed 32 163 321 0 93 640 0 64 88 160 0 40 320 0 128 71 355 0 25 160 0 256 99 16439 0 29 384 0 512 76 662 0 4 40 0 1024 32 120 0 4 100 0 2048 0 7858 0 12 100 0 4096 35 68 0 1 120 0 16384 1 1 0 18 24 7 32768 1 1 0 0 511 0 By type inuse calls failed memuse memmax mapb Streams mblk statistic failures: 0 high priority mblk failures 0 medium priority mblk failures 0 low priority mblk failures #
The number of 256-byte mbufs has increased from 112 to 128. The number of 2048-byte mbufs has increased from 2 to 12. However, the number of 4096-byte mbufs has decreased from 38 to 36. Overall, there is an increase of mbufs available when the thewall value is raised. The decrease in the number of 4096-bye mbufs demonstrates the self-tuning function of the AIX Version 4 mbuf allocation mechanism.
The network tuning parameters available in AIX Version 4 are:
The thewall parameter of the network option provides an absolute upper bound on the amount of real memory that can be used by the communication subsystem. Change the value of thewall parameter in kilobytes, preferably in multiples of 4, using the no -o thewall= command. Usually, the size is increased during tuning.
In AIX Version 4.3.1 or later, the sockthresh parameter of the network option provides a way to prevent new sockets from being created when almost all the network memory is in use. The default is 85 percent of thewall. Change the value in the range of 1 to 100 percent of thewall using the no -o sockthresh= command. Usually, the percentage is decreased during tuning.
The sb_max parameter of the network option provides an absolute upper bound on the size of TCP and UDP socket buffers. The default value is 65536. Change the value, preferably in multiples of 4096, using the no -o sb_max= command. Usually, the size is increased during tuning.
The rfc1323 parameter of the network option has a value of 1 to indicate that tcp_sendspace and tcp_recvspace can exceed 64 KB. The default value is 0 (zero). Change the value to 1 (one) using the command no -o rfc1323= command before attempting to set tcp_sendspace and tcp_recvspace to more than 64 KB.
The udp_sendspace parameter of the network option provides the default value for the size of the UDP socket send buffer. The value must not be greater than that of sb_max. The default value is 9216. Change the value in the range of 0 (zero) to 65536, preferably in multiples of 4096, using the no -o udp_sendspace= command. Usually, the size is increased during tuning.
The udp_recvspace parameter of the network option provides the default value of the size of the UDP socket receive buffer. The value must not be greater than that of sb_max. The default value is 41600. Change the value, preferably in multiples of 4096, using the no -o udp_recvspace= command. Usually, the size is increased during tuning.
The tcp_sendspace parameter of the network option provides the default value of the size of the TCP socket send buffer. The default value is 16384. The allowed range is 0 to 64 KB if rfc1323=0, and 0 to 4 GB if rfc1323=1. The value must be less than or equal to sb_max and should be equal to tcp_recvspace and uniform on all frequently accessed AIX systems. Change the value, preferably in multiples of 4096, using the no -o tcp_sendspace= command. Usually, the size if increased during tuning to fix the poor-throughout problem.
The tcp_recvspace parameter of the network option provides the default value of the size of the TCP socket receive buffer. The default value is 16384. The allowed range is 0 to 64 KB if rfc1323=0, and 0 to 4 GB if rfc1323=1. The value must be less than or equal to sb_max, and should be equal to tcp_sendspace and uniform on all frequently accessed AIX systems. Change the value, preferably in multiple of 4096, using the no -o tcp_recvspace= command. Usually, the size is increased during tuning to fix the poor-throughout problem.
The ipqmaxlen parameter of the network option specifies the maximum number of entries on the IP input queue. The default value is 50. Change the value using the no -o ipqmaxlen= command. Usually, the size is increased during tuning.
The xmt_que_size parameter specifies the maximum number of send buffers that can be queued up for the device. The default value is 30. The allowed range is 20 to 150. To display the value of the first token-ring adapter on the system, use the lsattr -E -l tok0 -a xmt_que_size command. To change the value, you must first remove the network interface configuration, change the device xmt_que_size value, and then activate the network interface configuration:
ifconfig tr0 detach chdev -I tok0 -a xmt_que_size=newvalue ifconfig tr0 hostname up
The change is effective across system boot. Usually, the size is increased during tuning. It should be set to 150 as a matter of course on network-oriented systems, especially servers.
This is only tunable in AIX Version 3. The rec_que_size specifies the maximum number of receive buffers that can be queued up for the interface. The default value is 30. The allowed range is 20 to 150. To display the value of the first token ring adapter in the system, us the lsattr -E -l tok0 -a rec_que_size command. To change the value, you must first remove the network interface configuration, change the device xmt_que_size value, and then activate the network interface configuration:
ifconfig tr0 detach chdev -I tok0 -a rec_que_size=newvalue ifconfig tr0 hostname up
The change is effective across system boot. Usually, the size is increased during tuning. It should be set to 150 as a matter of course on network-oriented systems, especially servers.
The maximum transmission unit (MTU) limits the size of packets that are transmitted on the network.The default value for 16 Mb token-ring adapters is 1492, and for Ethernet adapters it is 1500. Use the lsattr -E -l tr0 command to display the MTU of the first token ring adapter in the system. Use the chdev -l tr0 -a mtu=NewValue command to change the MTU size of the first token-ring adapter on the system.
Note |
---|
The MTU size cannot be changed while the interface is in use. Because all systems on a LAN must have the same MTU, they must all change simultaneously. |
Apart from token-ring and loopback definition on AIX Version 3, the default should be kept for other interfaces. Usually, the size is increased during tuning. Change is effective across system boots.