improve the performance of imported_keylist deconstruction#239
Merged
filipecosta90 merged 1 commit intoredis:masterfrom Jul 22, 2025
Merged
improve the performance of imported_keylist deconstruction#239filipecosta90 merged 1 commit intoredis:masterfrom
filipecosta90 merged 1 commit intoredis:masterfrom
Conversation
YaacovHazan
requested changes
Nov 1, 2023
YaacovHazan
requested changes
Nov 2, 2023
17956d6 to
ff46b67
Compare
Contributor
Author
Test command./memtier_benchmark -p 6379 -t 2 -c 8 -n 500000 --ratio 1:0 --data-import ./dump100.csv Test result:
Supplement |
ff46b67 to
fee7875
Compare
YaacovHazan
approved these changes
Nov 5, 2023
Contributor
Author
|
@filipecosta90 hi could you please check this PR? I think it is ready to be merged |
fee7875 to
efcaa4e
Compare
Collaborator
@DarrenJiang13 merged. sorry for missing this one! and thank you! will add a PR to extend test coverage to this as well. |
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.
Problem
When I run
memtier_benchmarkwith--data-import(including 500000 keys), it took a long time to quit after benchmark finished.With pstack, I found the process was waiting in
~imported_keylist()Solution
erase()one by one for a dead vector wastes some time. So I replacederase()withclear(), which makes it much faster.