-
Notifications
You must be signed in to change notification settings - Fork 650
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
use segregated hashmap to boost the freelist allocate and release performance #141
Conversation
ed79fac
to
f6fcd69
Compare
902e89d
to
d73f0dc
Compare
376ff9b
to
cec1f50
Compare
@xiang90 ptal |
@WIZARD-CXY Awesome work! can you ask @hormes to give this a final look (especially on the tests)? |
/cc @jpbetz |
For the compatibility reason, I keep all the old test which is used to test the old array freelist type and make them pass. The new approach is using the same test and make it fully passed. |
Everything looks good to me. @xiang90 |
lgtm |
Relevant changes: - ectd-io/bbolt#139 update the freelist readIDs - etcd-io/bbolt#140 add getFreePageIDs - etcd-io/bbolt#141 use segregated hashmap to boost the freelist allocate and release performance Signed-off-by: Sebastiaan van Stijn <[email protected]>
Hello, may I ask |
yeah |
Hi @WIZARD-CXY Thanks so much for the etcd performance optimization contribution. |
In this pr, I use segregated hashmap to replace the original freeids allocating and releasing approach.
It is much faster than the original version, especially when the db size is large or the fragmentation in the db is large, we can gain 1000x faster performance.