-
Notifications
You must be signed in to change notification settings - Fork 23.9k
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
Mem efficiency, make full use of client struct memory for reply buffers #8968
Conversation
so there are 3 changes here:
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM two minor comments.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Added some more minor thoughts.
Hi @oranagra
I am not sure i understand you, firstly, AFAIK, static For you said 2, I refactor it to make it easy to test.
I think it also belongs to this PR, because we do not use the |
@ShooterIT now I see what you mean. |
regarding the 1,2,3 in my previous comment:
what i meant was that instead of declaring the last member of the client struct a the implication of doing that change i suggested is that you can't allocate client structs on the stack, and that anywhere that allocates one has to be changed. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM.
…rs (redis#8968) When we allocate a client struct with 16k reply buffer, the allocator we may give us 20K, This commit makes use of that extra space. Additionally, it tries to store whatever it can from the reply into the static 'buf' before allocating a new node for the reply list.
When we allocate a client struct with 16k reply buffer, the allocator we may give us 20K,
This commit makes use of that extra space.
Additionally, it tries to store whatever it can from the reply into the static 'buf' before
allocating a new node for the reply list.
Suggested by @oranagra in #8966 (review)
Similar changes (can all be mentioned in the release notes together): #8975, #8966