2
0
mirror of https://github.com/openvswitch/ovs synced 2025-09-02 23:35:27 +00:00

socket: Increase listen backlog to 64 everywhere.

Before the patch, the size of the backlog depended on the type of socket
(UNIX vs INET) as well as on the language (C vs Python), specifically:

- python used backlog size = 10 for all sockets;
- C used 64 for UNIX sockets but 10 for INET sockets.

This consolidates the values across the board. It effectively bumps the
number of simultaneous connections to python unixctl servers to 64. Also
for INET C servers too.

The rationale to do it, on top of consistency, is as follows:

- fmt_pkt in ovn testsuite is limited by python server listen backlog,
  and as was found out when adopting the tool, it is sometimes useful to
  run lots of parallel calls to fmt_pkt unixctl server in some tests.
  (See [1] for example.)

- there is a recent report [2] on discuss@ ML where the reporter noticed
  significant listen queue overflows in some scenarios (large openstack
  deployments; happens during leader transition when hundreds of neutron
  nodes - with dozens of neutron api workers each - simultaneously
  reconnect to the same northbound leader.) Note: While there is no
  clear indication that this backlog size bump would resolve the
  reported issues, it would probably help somewhat.

[1] 0baca3e519
[2] https://mail.openvswitch.org/pipermail/ovs-discuss/2024-April/053049.html

Signed-off-by: Ihar Hrachyshka <ihrachys@redhat.com>
Acked-by: Eelco Chaudron <echaudro@redhat.com>
Signed-off-by: Simon Horman <horms@ovn.org>
This commit is contained in:
Ihar Hrachyshka
2024-04-12 02:45:17 +00:00
committed by Simon Horman
parent 4f29804f24
commit 2b7efee031
2 changed files with 2 additions and 2 deletions

View File

@@ -620,7 +620,7 @@ class PassiveStream(object):
raise Exception('Unknown connection string')
try:
sock.listen(10)
sock.listen(64)
except socket.error as e:
vlog.err("%s: listen: %s" % (name, os.strerror(e.error)))
sock.close()