Thanks to visit codestin.com
Credit goes to github.com

Skip to content

[erl_nif][socket] socket:accept rate performance regression between OTP 27 and OTP 28 #10322

@potatosalad

Description

@potatosalad

Describe the bug

socket:accept rate for multiple processes may drop 25-50% between OTP 27 and OTP 28 under high rate of connections.

To Reproduce

Select 2 nodes that are listening on a singular TCP socket and both have many inbound connections. The acceptor for the TCP socket should be a single process calling socket:accept in a loop.

Use the modules defined in this gist: https://gist.github.com/potatosalad/aa540429547a81e98b603956111b7ad2

  1. "server" node: run zeyu_socket_accept_regression_server:server(). in a debug shell
  2. "client" node: run zeyu_socket_accept_regression_client:client(...). in a debug shell where ... is the IP address of the "server" node

OTP 27: accept rate may be ~20k/sec

OTP 28: accept rate will drop to ~5-10k/sec

Expected behavior

OTP 28: accept rate should match OTP 27 of ~20k/sec

Affected versions

OTP 28

Regression was introduced in 55c4436

Additional context

Metadata

Metadata

Assignees

Labels

bugIssue is reported as a bugteam:PSAssigned to OTP team PSteam:VMAssigned to OTP team VM

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions