Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

snet: investigate overhead of port checks during Listen #4550

Open
matzf opened this issue Jun 11, 2024 · 0 comments
Open

snet: investigate overhead of port checks during Listen #4550

matzf opened this issue Jun 11, 2024 · 0 comments
Labels
workitem Something needs doing

Comments

@matzf
Copy link
Contributor

matzf commented Jun 11, 2024

Follow up on #4344.

snet.Listen/Dial/OpenRaw open ephemeral ports in a the range of the router-dispatched ports.
For this, it attempts to open a UDP socket for each port in the range, iterating from end to the start of the range.
As the order is the same for every application, the ports toward the end of the range will frequently already be in use.
Investigate how significant the overhead of this port checking is.
If necessary, find alternatives; one alternative could be to randomize the order of checking. This would reduce the number of expected checks necessary as long as the number of simultaneously open ports is well below the size of the range.

@matzf matzf added the workitem Something needs doing label Jun 11, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
workitem Something needs doing
Projects
None yet
Development

No branches or pull requests

1 participant