Skip to content

Performance improvement on unconfirmed map #374

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

Merged
merged 13 commits into from
Jan 20, 2025

Conversation

hiimjako
Copy link
Collaborator

@hiimjako hiimjako commented Jan 20, 2025

This is a sub-branch of check_close_during_send, so please ensure that PR #372 is merged first.

This PR introduces performance improvements by leveraging slice preallocation and reducing the average size of the unConfirmed map, which now only stores the currently in-flight messages.

Note: Additionally, I identified the root cause of the performance degradation observed in the client under high traffic or client reconnections in cloud environments. This issue appears to be related to Issue #293 and is associated with the default TCP socket settings. I suspect this is OS-related, as it manifests on Linux (tested on an AWS cluster with ARM64 nodes running Linux). Again this was solved setting in the stream SetWriteBuffer(-1) and SetReadBuffer(-1).

@hiimjako hiimjako added the enhancement New feature or request label Jan 20, 2025
@Gsantomaggio Gsantomaggio marked this pull request as ready for review January 20, 2025 10:01
Copy link
Member

@Gsantomaggio Gsantomaggio left a comment

Choose a reason for hiding this comment

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

tested also with reliable_client.go with a cluster. Everything is ok ! Thank you @hiimjako

@Gsantomaggio Gsantomaggio merged commit fb01bca into rabbitmq:main Jan 20, 2025
2 checks passed
@hiimjako hiimjako deleted the fix-performance-unconfirmed branch January 20, 2025 10:32
@Gsantomaggio Gsantomaggio added this to the 1.5.0 milestone Jan 20, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants