-
Notifications
You must be signed in to change notification settings - Fork 1.1k
chore: Make snapshotting more responsive #4910
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
Conversation
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.
Copilot reviewed 6 out of 7 changed files in this pull request and generated 2 comments.
Files not reviewed (1)
- helio: Language not supported
Comments suppressed due to low confidence (2)
src/server/snapshot.cc:176
- Removing the conditional PushSerialized calls and related yield logic may lead to less frequent flushing of the serialization buffer, potentially impacting memory usage and server responsiveness under heavy load; please verify that this change maintains the intended performance characteristics.
ThisFiber::Yield();
src/server/snapshot.cc:427
- Ignoring the return value in the OnJournalEntry method might suppress error conditions that could be critical; ensure that this behavior is safe for all execution scenarios.
std::ignore = serializer_->WriteJournalEntry(item.data);
063cc01
to
271ec8d
Compare
why do you pull helio in this PR? lets make it in a seprate PR |
please dont merge yet, wait for my review |
I pulled helio because of cycle timer that I added recently for this. |
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.
Copilot reviewed 6 out of 7 changed files in this pull request and generated no comments.
Files not reviewed (1)
- helio: Language not supported
Comments suppressed due to low confidence (1)
src/server/rdb_save.cc:913
- Returning an empty buffer when mem_buf_.InputLen() is zero may lead to unexpected behavior if downstream code expects the original mem_buf_.InputBuffer() output. Consider reviewing the downstream usage and either preserving the original behavior or ensuring that returning an empty buffer is handled appropriately.
return {};
This should improve situation around #4787 - maybe not solve it completely but improve it significantly. On my tests when doing snapshotting under read traffic with master (memtier_benchmark --ratio 0:1 -d 256 --test-time=400 --distinct-client-seed --key-maximum=2000000 -c 5 -t 2 --pipeline=3) I got drop from 250K qps to 8K qps during the full sync phase. With this PR, the throughput went up to 70-80K qps. Signed-off-by: Roman Gershman <[email protected]>
2b69677
to
caabc1d
Compare
Signed-off-by: Roman Gershman <[email protected]>
@adiholden PTAL |
* chore: Make snapshotting more responsive This should improve situation around #4787 - maybe not solve it completely but improve it significantly. On my tests when doing snapshotting under read traffic with master (memtier_benchmark --ratio 0:1 -d 256 --test-time=400 --distinct-client-seed --key-maximum=2000000 -c 5 -t 2 --pipeline=3) I got drop from 250K qps to 8K qps during the full sync phase. With this PR, the throughput went up to 70-80K qps. --------- Signed-off-by: Roman Gershman <[email protected]>
This should improve situation around #4787 -
maybe not solve it completely but improve it significantly.
On my tests when doing snapshotting under read traffic with master (memtier_benchmark --ratio 0:1 -d 256 --test-time=400 --distinct-client-seed --key-maximum=2000000 -c 5 -t 2 --pipeline=3) I got drop from 250K qps to 8K qps during the full sync phase.
With this PR, the throughput went up to 45K qps - 5x more but still much lower than 250K qps.