Implementation of recycling memory pool. - #72
Merged
Conversation
Lincong
reviewed
Feb 6, 2020
smccauliff
reviewed
Feb 9, 2020
|
sean is correct - lets drop down to something simpler (pre-allocated deque of the correct size) so we could measure impact on GC and decide on further optimizations later. |
smccauliff
reviewed
Feb 11, 2020
radai-rosenblatt
approved these changes
Feb 11, 2020
radai-rosenblatt
left a comment
There was a problem hiding this comment.
one last change requested :-)
|
failing unit test: |
gitlw
pushed a commit
that referenced
this pull request
Jun 1, 2020
TICKET = LI_DESCRIPTION = EXIT_CRITERIA = MANUAL [""]
gitlw
pushed a commit
that referenced
this pull request
Jun 12, 2020
TICKET = LI_DESCRIPTION = EXIT_CRITERIA = MANUAL [""]
gitlw
pushed a commit
that referenced
this pull request
Jun 13, 2020
TICKET = LI_DESCRIPTION = EXIT_CRITERIA = MANUAL [""]
lmr3796
pushed a commit
to lmr3796/kafka
that referenced
this pull request
Feb 9, 2022
TICKET = LI_DESCRIPTION = EXIT_CRITERIA = MANUAL [""]
lmr3796
pushed a commit
to lmr3796/kafka
that referenced
this pull request
Feb 9, 2022
TICKET = LI_DESCRIPTION = EXIT_CRITERIA = MANUAL [""]
lmr3796
pushed a commit
to lmr3796/kafka
that referenced
this pull request
Mar 25, 2022
TICKET = LI_DESCRIPTION = EXIT_CRITERIA = MANUAL [""]
lmr3796
pushed a commit
to lmr3796/kafka
that referenced
this pull request
Jun 2, 2022
TICKET = LI_DESCRIPTION = EXIT_CRITERIA = MANUAL [""]
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Add a new memory pool implementation in socket server.
This implementation is able to recycle the buffers of common request size(configurable via a new config,
SocketRequestCommonBytes) to reuse the buffers for future request. Doing so can avoid many expense system call if the incoming requests` size are relatively fixed or distributed in normal distribution.An example is like below,
received request1 of size1 byte -> allocate buffer for request 1
request 1 is processed by API layer -> instead of deallocate the buffer, clear it and save it in cache
received request2 of (size1- 100 byte) -> reuse the cached buffer for request 2 since request size is close and buffer is large enough
Committer Checklist (excluded from commit message)