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

Fix inefficient use of buffers that reduces the potential throughput of basicPublish #142

Merged
merged 2 commits into from
Dec 21, 2022

Conversation

fadams
Copy link
Contributor

@fadams fadams commented Dec 19, 2022

As per issue #141

Improve the performance of Channel sendOpen method by adding an sendUnflushed method to Connection that allows us to use the write buffer more efficiently by writing all the Frames of the message and then flushing the buffer rather than flushing each Frame. This significantly improves the performance of basicPublish for small messages where the bulk of the CPU load tends towards Syscall so with small messages we might have a Syscall per message vice per Frame.

…shed method to Connection that allows us to use the write buffer more efficiently by writing all the Frames of the message and *then* flushing the buffer rather than flushing each Frame. This significantly improves the performance of basicPublish for small messages where the bulk of the CPU load tends towards Syscall so with small messages we might have a Syscall per message vice per Frame.
Copy link
Contributor

@Zerpet Zerpet left a comment

Choose a reason for hiding this comment

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

Thank you for contributing to this project. This looks good to me 👍 There's commented code that can be removed. I'm going to QA this locally before I give the approval ✅

connection.go Outdated Show resolved Hide resolved
Signed-off-by: Aitor Pérez Cedres <[email protected]>
@Zerpet Zerpet merged commit 5bf455f into rabbitmq:main Dec 21, 2022
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.

3 participants