-
Notifications
You must be signed in to change notification settings - Fork 3k
Open
Labels
bugIssue is reported as a bugIssue is reported as a bugteam:PSAssigned to OTP team PSAssigned to OTP team PSteam:VMAssigned to OTP team VMAssigned to OTP team VM
Description
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
- "server" node: run
zeyu_socket_accept_regression_server:server().in a debug shell - "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
- https://gist.github.com/potatosalad/aa540429547a81e98b603956111b7ad2
- The problematic code has been isolated to this section: https://github.com/erlang/otp/blame/OTP-28.1/erts/emulator/sys/common/erl_check_io.c#L1347-L1361
michalmuskala and ilya-klyuchnikov
Metadata
Metadata
Labels
bugIssue is reported as a bugIssue is reported as a bugteam:PSAssigned to OTP team PSAssigned to OTP team PSteam:VMAssigned to OTP team VMAssigned to OTP team VM