-
Notifications
You must be signed in to change notification settings - Fork 24.4k
Reply Copy Avoidance #14608
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
base: unstable
Are you sure you want to change the base?
Reply Copy Avoidance #14608
Conversation
a4c387c to
b5206dd
Compare
|
@oranagra follow #14544 (comment) please take a look this commit: 852beaf the only place where refcount overflow is the test in propagate, but the behavior is not reasonable, so i think we can ignore it. |
|
@sundb which test in propagate? who holds all these references? |
|
|
ok. let's use 16 bits, and hope it'll be ok. |
This PR is based on valkey-io/valkey#2078
Reply Copy Avoidance Optimization
This PR introduces an optimization to avoid unnecessary memory copies when sending replies to clients in Redis.
Overview
Currently, Redis copies reply data into client output buffers before sending responses. This PR implements a mechanism to avoid these copies in certain scenarios, improving performance and reducing memory overhead.
Key Changes
replies with copy avoid replies in client reply buffers
indicated by I/O threads
starting certain number of threads. So it will be enabled only starting
certain number of threads. (TODO)
Note: When copy avoidance disabled content and handling of client
reply buffers remains as before this PR
Signed-off-by: Alexander Shabanov [email protected]
Signed-off-by: xbasel [email protected]
Signed-off-by: Madelyn Olson [email protected]
Co-authored-by: Alexander Shabanov [email protected]
Co-authored-by: xbasel [email protected]
Co-authored-by: Madelyn Olson [email protected]