IBM Support

How to get the better listening performance for multiple listening sockets using the same port number via the SO_REUSEPORT.

How To


Summary

SO_REUSEPORT option set to socket specifies that the rules used in validating addresses supplied by a bind subroutine should allow reuse of a local port/address combination. Each binding of the port/address combination must specify the SO_REUSEPORT socket option. This option enables or disables the reuse of local port/address combinations.

If the socket is bound to the address and port , no other socket can bound to exactly same address and port. It can only be achieved by using SO_REUSEPORT.

The AIX the listening performance for multiple TCP listening sockets using the same port number via the SO_REUSEPORT option was
not good compared to Linux.Because Current implementation uses only first listening socket in PCB lookups( Protocol Control Block Lookup).
Recently AIX version 7.2 (7.2.5.0 or above ) added the feature that would add the capability to distribute incoming connections across all listening ports. But by default this feature will be disabled


We have to enable this feature to improve the listening performance for multiple TCP listening sockets using the same port number via the SO_REUSEPORT. 

New tunable "soreuseport_lb" is added to no command to configure this load balancing capabilities .


# no -h soreuseport_lb
Help for tunable soreuseport_lb:
Purpose:
Specifies whether SO_REUSEPORT load balancing is enabled (1) or disabled (0).
Values:
        Default: 0
        Range: 0 - 1
        Type: Dynamic
        Unit: boolean
Tuning:
This option allows the SO_REUSEPORT socket option to utilize load balancing techniques.
Default Configuration :

#  no -L  soreuseport_lb
--------------------------------------------------------------------------------
NAME                      CUR    DEF    BOOT   MIN    MAX    UNIT           TYPE
     DEPENDENCIES
--------------------------------------------------------------------------------
soreuseport_lb            0      0      0      0      1      boolean           D
--------------------------------------------------------------------------------

To enable the load balancing capabilities :
# no -o  soreuseport_lb=1
Setting soreuseport_lb to 1
(0)
Then execute the program that needs better listening performance for multiple TCP listening sockets using the same port number via the SO_REUSEPORT.

Objective

To get the better listening performance for multiple TCP listening sockets using the same port number via the SO_REUSEPORT.

  

Environment

AIX 7.2 environment ( 7.2.5.0)

# lslpp -l bos.adt.include

  Fileset                      Level  State      Description         

  ----------------------------------------------------------------------------

Path: /usr/lib/objrepos

  bos.adt.include            7.2.5.0  COMMITTED  Base Application Development

                                                 Include Files

# lslpp -l  bos.net.tcp.client_core

  Fileset                      Level  State      Description         

  ----------------------------------------------------------------------------

Path: /usr/lib/objrepos

  bos.net.tcp.client_core    7.2.5.0  COMMITTED  TCP/IP Client Core Support

Path: /etc/objrepos

  bos.net.tcp.client_core    7.2.5.0  COMMITTED  TCP/IP Client Core Support

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Author: Chetan Gaonkar
Operating System: AIX and VIOS
Hardware: Power
Feedback: aix_feedback@wwpdl.vnet.ibm.com, cgaonkar@in.ibm.com
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

 

Document Location

Worldwide

[{"Business Unit":{"code":"BU058","label":"IBM Infrastructure w\/TPS"},"Product":{"code":"SWG10","label":"AIX"},"ARM Category":[{"code":"a8m0z0000001fMuAAI","label":"AIX General Support"},{"code":"a8m0z000000cw0aAAA","label":"APARS->AIX 7.2 environment"}],"Platform":[{"code":"PF025","label":"Platform Independent"}],"Version":"All Version(s)","Line of Business":{"code":"LOB08","label":"Cognitive Systems"}}]

Document Information

Modified date:
08 August 2020

UID

ibm16257733