10.12 Problem With Incorrect Subnet Mask

10.13 Value of thewall on Network Traffic

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:

AIX Version 4.2.1. and earlier
The default value is 1/8 of real memory or 65536 (64 megabytes), whichever is smaller.
AIX Version 4.3.0
The default value is 1/8 of real memory or 131072 (128 megabytes), whichever is smaller.
AIX Version 4.3.1 and later
The default value is 1/2 of real memory or 131072 (128 megabytes), whichever is smaller.

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.

10.13.1 Setting the Value of thewall to Raise the Number of mbufs

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.

10.13.2 Tuning Parameters for Buffer Pools and Others

The network tuning parameters available in AIX Version 4 are:

10.14 Errors when inetd is Not Started