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

os/bluestore: remove unneeded indirection in BitMapZone. #13743

Merged
merged 1 commit into from Mar 6, 2017

Conversation

Projects
None yet
3 participants
@rzarzynski
Contributor

rzarzynski commented Mar 2, 2017

BitMapZone aggregates BmapEntries through a pointer to independently-
allocated std::vector which in turn has its own pointer to the real
data. This indirection is unnecessary as std::vector is pretty cheap
in the terms of memory overhead. For instance, on x86-64 & GCC 5.4.0
sizeof(std::vector) == 24, which translates to 3 raw pointers.

Stripping the indirection could have positive impact on processor's
caches and allow to minimize the number of memory accesses.

Signed-off-by: Radoslaw Zarzynski rzarzynski@mirantis.com

@rzarzynski rzarzynski added the bluestore label Mar 2, 2017

@ifed01

This comment has been minimized.

Show comment
Hide comment
@ifed01

ifed01 Mar 2, 2017

Contributor

Do you have any estimates on the number of BitMapZone instances in the usual system? How many of them are usually uninitialized?

Contributor

ifed01 commented Mar 2, 2017

Do you have any estimates on the number of BitMapZone instances in the usual system? How many of them are usually uninitialized?

@rzarzynski

This comment has been minimized.

Show comment
Hide comment
@rzarzynski

rzarzynski Mar 2, 2017

Contributor

On 1 TiB SSD, served under the default settings, the number of BitMamZone instances is:

>>> 1024 * 1024 * 1024 * 1024 / 4096 / 1024
262144
Contributor

rzarzynski commented Mar 2, 2017

On 1 TiB SSD, served under the default settings, the number of BitMamZone instances is:

>>> 1024 * 1024 * 1024 * 1024 / 4096 / 1024
262144
os/bluestore: remove unneeded indirection in BitMapZone.
BitMapZone aggregates BmapEntries through a pointer to independently-
allocated std::vector which in turn has its own pointer to the real
data. This indirection is unnecessary as std::vector is pretty cheap
in the terms of memory overhead. For instance, on x86-64 & GCC 5.4.0
sizeof(std::vector) == 24, which translates to 3 raw pointers.

Stripping the indirection could have positive impact on processor's
caches and allow to minimize the number of memory accesses.

Signed-off-by: Radoslaw Zarzynski <rzarzynski@mirantis.com>

@liewegas liewegas added the needs-qa label Mar 3, 2017

@ifed01

ifed01 approved these changes Mar 3, 2017

@liewegas liewegas merged commit 30db52f into ceph:master Mar 6, 2017

3 checks passed

Signed-off-by all commits in this PR are signed
Details
Unmodifed Submodules submodules for project are unmodified
Details
default Build finished.
Details
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment