os/bluestore: use std::unordered_map for SharedBlob lookup #11394

Merged
merged 1 commit into from Oct 11, 2016

Projects

None yet

1 participant

@liewegas
Member

Many blobs aren't shared. Save 8 bytes per SharedBlob by using a normal
unordered_map instead of instrusive::set.

More importantly, perhaps, it avoids us having to tune the intrusive
unordered_set size manually. std::unordered_map does this automatically
for you, but the intrusive one does not. And it's unclear how to
statically size it given that it's a per-collection structure and we have
no idea how many objects we'll have, how many blobs per object, and how
many objects will be cloned.

Signed-off-by: Sage Weil sage@redhat.com

@liewegas liewegas added the bluestore label Oct 10, 2016
@liewegas liewegas os/bluestore: use std::unordered_map for SharedBlob lookup
Many blobs aren't shared.  Save 8 bytes per SharedBlob by using a normal
unordered_map instead of instrusive::set.

More importantly, perhaps, it avoids us having to tune the intrusive
unordered_set size manually.  std::unordered_map does this automatically
for you, but the intrusive one does not.  And it's unclear how to
statically size it given that it's a per-collection structure and we have
no idea how many objects we'll have, how many blobs per object, and how
many objects will be cloned.

Signed-off-by: Sage Weil <sage@redhat.com>
7260166
@liewegas liewegas merged commit dbd22b7 into ceph:master Oct 11, 2016

2 checks passed

Signed-off-by all commits in this PR are signed
Details
default Build finished.
Details
@liewegas liewegas deleted the liewegas:wip-bluestore-shared-blob-intrusive branch Oct 11, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment