[PATCH 0/2] increase maximum number of possible opened sockets per application
Julien Courtat
julien.courtat at 6wind.com
Thu Jun 4 08:07:15 PDT 2015
Hello,
The current libnl 3.2.26 allows to create 1024 sockets at maximum per application.
This value is too short on systems using lots of netns.
For example, a program that needs 8 sockets per netns is limited to 128 netns.
The following two patches propose to increase the maximum number of possible opened
socket per program with a single parameter NL_BITS_FOR_PID.
Since a portid is a bitmask split between a pid and a random number, number of bits
dedicated to pid should be decreased to allow more bits for the possible random value
and de facto increase the possible number of opened sockets per application.
First patch proposes to separate values that handle the size of the used_port_map[]
from the values inside each entry of this table, which were a bit messy since they were
both hardcoded to 32.
The second patch, only set the proposed value for NL_BITS_FOR_PID to 18, which allows
16384 opened sockets on systems with max pid of 262144.
Julien
More information about the libnl
mailing list