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

Add buffering of outgoing messages #287

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

talex5
Copy link
Contributor

@talex5 talex5 commented Nov 16, 2024

Sending each message in its own TCP packet isn't very efficient, and also interacts very badly with Nagle's algorithm. See https://roscidus.com/blog/blog/2024/07/22/performance/ for details.

Note: The Prometheus metrics messages_outbound_sent_total and messages_outbound_dropped_total have gone. They weren't very useful and we no longer know the number of messages by the time the connection is dropped (could report dropped bytes if needed though).

dune exec -- ./test-bin/echo/echo_bench.exe
echo_bench.exe: [INFO] rate = 522.989613	# Before
echo_bench.exe: [INFO] rate = 62439.433376  # After

Sending each message in its own TCP packet isn't very efficient,
and also interacts very badly with Nagle's algorithm. See
https://roscidus.com/blog/blog/2024/07/22/performance/ for details.

Note: The Prometheus metrics `messages_outbound_sent_total` and
`messages_outbound_dropped_total` have gone. They weren't very useful
and we no longer know the number of messages by the time the connection
is dropped (could report dropped bytes if needed though).

    dune exec -- ./test-bin/echo/echo_bench.exe
    echo_bench.exe: [INFO] rate = 522.989613	# Before
    echo_bench.exe: [INFO] rate = 62439.433376  # After
@talex5 talex5 added this to the v2.0 (Eio) milestone Nov 16, 2024
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.

1 participant