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

Create a socket pool of multiple sockets bound to the same port #293

Merged
merged 24 commits into from
Oct 22, 2024

Conversation

JonathanLennox
Copy link
Member

So we can send from the same local IP and port from multiple threads simultaneously on Java 18+.

@JonathanLennox JonathanLennox marked this pull request as draft October 15, 2024 20:30
@JonathanLennox JonathanLennox marked this pull request as ready for review October 21, 2024 21:24
@JonathanLennox JonathanLennox changed the title WIP: Create a socket pool of multiple sockets bound to the same port Create a socket pool of multiple sockets bound to the same port Oct 22, 2024
requestedNumSockets
} else {
// TODO: set this to 1 in situations where pools aren't needed?
2 * Runtime.getRuntime().availableProcessors()
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I suggest logging the number we end up using.

Why does it default to twice the number of processors? Running your test on an A2 with 8 CPUs I see optimal performance for 8 sockets.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I was testing on a 4-core machine, but if JVB is using an 8 core one your tests are probably more representative. (My tests were also pretty noisy; I suspect the host my lonely instance is on is pretty busy.)

bgrozev
bgrozev previously approved these changes Oct 22, 2024
@JonathanLennox JonathanLennox merged commit 1373788 into jitsi:master Oct 22, 2024
4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants