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

Optimize usage of the Netty's and MsgPack's buffers #438

Merged
merged 4 commits into from
Dec 28, 2023

Conversation

akudiyar
Copy link
Collaborator

@akudiyar akudiyar commented Nov 9, 2023

Previously we were creating a new buffer and MsgPack packer on each request. This resulted in dramatic overload of GC with short-lived byte arrays. The new approach tries to maximize reusing of these byte arrays.

@akudiyar akudiyar requested a review from ArtDu November 12, 2023 12:13
@akudiyar akudiyar changed the title Optimize usage of the Netty and MsgPack buffers Optimize usage of the Netty's and MsgPack's buffers Nov 12, 2023
@akudiyar akudiyar marked this pull request as ready for review November 16, 2023 22:15
@akudiyar akudiyar requested a review from ArtDu November 27, 2023 22:08
Previously we were creating a new buffer and MsgPack packer on each
request. This resulted in dramatic overload of GC with short-lived
byte arrays. The new approach tries to maximize reusing of these byte
arrays.
Previously the outbound requests were not flushed at all, causing
memory overload as Netty does not flush the requests automatically as
of version 4.1.x. But flushing each request will also affect the
performance significantly, so the built-in batch flushing handler is
added to the connection pipeline together with a config option for
tuning the request batch size.
@akudiyar akudiyar force-pushed the optimize-netty-handlers-tmp branch from 86cc79a to f7e1267 Compare December 27, 2023 02:36
Any Java exceptions that prevented connecting to the server
were swallowed and only the exception name was printed.
This patch adds logging of full stacktrace on connection exceptions.
@akudiyar akudiyar force-pushed the optimize-netty-handlers-tmp branch from f7e1267 to 42185ef Compare December 27, 2023 03:11
Copy link
Contributor

@ArtDu ArtDu left a comment

Choose a reason for hiding this comment

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

I don't see where is "long value" test?

@akudiyar
Copy link
Collaborator Author

The test changes were rewritten by subsequent updates unfortunately, will be added back in the upcoming PRs

@akudiyar akudiyar added this pull request to the merge queue Dec 28, 2023
Merged via the queue into master with commit 14e051a Dec 28, 2023
3 checks passed
@akudiyar akudiyar deleted the optimize-netty-handlers-tmp branch December 28, 2023 10:06
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