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

feat(s2n-quic-platform): add unstable option for multiple sockets #1867

Merged
merged 1 commit into from
Jul 13, 2023

Conversation

camshaft
Copy link
Contributor

@camshaft camshaft commented Jul 11, 2023

Description of changes:

While using the probes from #1866, I noticed that the sendmmsg syscall could take quite a long time (upwards of 1ms), especially when the total number of messages being sent was high.

One thing that did help was to use the multithreaded runtime and multiple TX sockets. This does increase CPU usage but also increases throughput and minimizes latency, since we're executing multiple syscalls in parallel, each with smaller buffers.

Call-outs:

I've made this an unstable option for now, in case we want to change how the socket initialization works. Currently, it just calls try_clone() on the single socket for each task, which might cause issues later down the line (not sure).

Testing:

$ S2N_QUIC_UNSTABLE_TX_SOCKET_COUNT=16 s2n-quic-qns perf server --port 4433 --stats --multithread

By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.

@camshaft camshaft marked this pull request as ready for review July 11, 2023 18:56
@camshaft camshaft merged commit 2499439 into main Jul 13, 2023
@camshaft camshaft deleted the camshaft/multi-socket branch July 13, 2023 21:48
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