Introduction to AIX Network Performance Optimization

Source: Internet
Author: User

In Aix, network performance can be optimized in the following aspects:

Network memory Adjustment

Adjustment of Socket buffer

Network Interface Parameter Adjustment

Adjustment of the sending/receiving queue on the network adapter

Name resolution.

 

1. Adjust network memory

The value of theWall in Aix specifies the maximum number of physical memory in the system that can be used by network buffers. However, in aix5l, The theWall value cannot be modified and is determined at system startup:

The 32-Bit Core-theWall value is 1/2 physical memory and the minimum value of 1 GB, that is, the maximum value is 1 GB.

The 64-Bit Core-theWall value is 1/2 physical memory and the minimum value of 65 GB, that is, the maximum value is 65 GB.

If the netstat-M command result shows that the value of mbuf --- "rewuests for mbufs denied" is not 0.

# Netstat-m

2434 mbufs in use:

2432 mbuf cluster pages in use

10336 Kbytes allocated to mbufs

0 requests for mbufs denied

0 callto protocol drain routines

0 sockets not created because sockthresh was reached

Kernel malloc statistics:

* ****** CPU 0 *******

By size inuse CILS failed Delayed Free hiwat freed

32 172 426280 0 0 84 1440 0

64 84 2418 0 0 44 720 0

128 103 881463 0 0 313 360 17

...

Adjust the network memory using one of the following methods:

A. If it is a 32-bit core and the memory is smaller than 2 GB, the system memory will be increased.

B. If it is a 64-bit core and the memory is less than 65 GB, the system memory will be increased.

C. If possible, change the 32-bit core to the 64-Bit Core to increase the system memory.

D. Check the size of the sending/receiving cache area of the socket to determine whether it can be reduced.

E. Is there any mbuf leakage.

 

2. Socket buffer adjustment

The send buffer of TCP socket is the region used to temporarily store application data. The buffer size is defined by the no parameter tcp_sendspace. In your application, the system call setsockopt () can overwrite the definition of this parameter. To ensure a stable network throughput, The tcp_sendspace value is set to more than 10 times the MTU value.

You can use netstat-I to find the MTU value of each network interface:

$ Netstat-I

Name MTU network address ipkts ierrs opkts oerrs Coll

En0 1500 link #2 0.2.55.4f.4.bf 378329 0 411094 0

En0 1500 9.181.48.64 atstrs 378329 0 411094 0

Lo0 16896 link #1 375205 0 375243 0 0

Lo0 16896 127 loopback 375205 0 375243 0 0

Lo0 16896: 1 375205 0 375243 0 0

 

The TCP scoket receiving buffer is used to receive data from the network. After receiving the data packet, it must send the ACK message to the sender ), it also tells the sender how much space there is in the local receiving buffer. If there is not enough space to store new data, the sender suspends sending new data until the recipient can receive it again. The size of the receiving buffer is set by tcp_recvspace. Generally, the value of tcp_recvspace is set to more than 10 times that of MTU. You can adjust this parameter as needed.

The socket buffer also has the udp_sendspace and udp_recvspace parameters for UDP protocol. Because there is no traffic control function, too small udp_recvspace will cause packet loss.

In the system, the default value of tcp_sendspace is 16384, the value of udp_sendspace is 9216, and the value of udp_recvspace is 41600.

 

Note: The memory used by all scoket in the system cannot be greater than the value set by sb_max.

View the values of the current tcp_sendspace and tcp_revcspace:

$ No-o tcp_sendspace

$ No-o tcp_revcspace

Set the value of Socket buffer until the next restart:

$ No-o tcp_sendspace = 32768

$ No-o tcp_recvspace = 32768

Set the value of Socket buffer, which will remain valid after the next restart:

$ No-r-o tcp_sendspace = 32768

$ No-r-o tcp_recvspace = 32768

 

3. Adjust Network Interface Parameters

Before aix5, the definition of network parameters was valid throughout the system. All network interfaces were defined in a uniform manner and cannot be set separately for specific network interfaces.

Size of the sending/receiving buffer of TCP socket in aix5, rfc1323 (adjust window value), tcp_mssdflt (adjust maximum transmission size), and tcp_nodelay (whether to forward packets immediately) network parameters can be defined on network interfaces. The value defined on the Interface overwrites the value defined by the system. The value set by the setsockopt () system call in the application can also overwrite the unified definition of the system.

When adjusting parameters for a specific network interface, set isno (interface specific network options) to 1:

# No-r-o isno = 1

A. If only temporary modifications are made, run the ifconfig command:

# Ifconfig en0 ip_lable tcp_recvspace 65536 tcp_sendspace 65536.

 

B. Use the chdev command to modify parameters, for example:

# Chdev-l en0-A tcp_recvspace = 65536-A tcp_space = 65536

Changes the content in the ODM, so the parameter will take effect after the device is restarted.

 

 

4. Adjust the sending/receiving queue of the Network Adapter

If the adapter's transmission queue is not large enough, the value of "S/W transmit queue overflow" in the netstat-V result is not 0.

If the received resources are insufficient, "packets dropped", "Out of RCV buffers", or "no resource errors" will show non-0 values.

Use chdev or Smit to adjust the value of the corresponding queue, for example:

# Chdev-l entx-A tx_que_sz = 16384 

5. Search Order of name resolution

In Aix, the default name resolution order is DNS à NIS à/etc/hosts.

You can use/etc/netsvc. CONF file or nsorder environment variable to change the default name resolution order to speed up name resolution. If/etc/netsvc. if both the conf file and the nsorder environment variable exist, nsorder takes effect.

 

Use the nsorder variable to change the resolution sequence, which is defined using the following method:

Export nsorder = Local, NIS, bind

 

Use the/etc/netsvc. conf file and add the following to the file:

Hosts = Local, bind, NIS

Introduction to AIX Network Performance Optimization

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.