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 CephContext* from BmapEntry. #13651
Conversation
Each BmapEntry instance stores a pointer to the same CephContext. As we expect to have thousands of instances the overhead might be too high. For instance, serving 1 TiB SSD disk on x86-64, while using the default settings, results in 32 MiB of extra memory consumption: # assuming sizeof(unsigned long) * CHAR_BIT == 64 >>> 1024 * 1024 * 1024 * 1024 / 4096 / 64 4194304 >>> 4194304 * 8 / 1024 32768 Although memory is cheap, CPU's caches are not. Signed-off-by: Radoslaw Zarzynski <rzarzynski@mirantis.com>
agent issue, retest this please. |
retest this please. |
@@ -123,8 +123,7 @@ void BmapEntry::_init_bit_mask() | |||
BmapEntry::m_bit_mask_init = true; | |||
} | |||
|
|||
BmapEntry::BmapEntry(CephContext* cct, bool full) | |||
: cct(cct) | |||
BmapEntry::BmapEntry(CephContext*, const bool full) |
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.
Suggest to remove CephContext parameter...
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.
You're right. I deferred the clean-up to not introduce dependencies between patches as I'm going to touch BitMapZone
as well. Having CephContext*
there costs us additional 2 MiB in the case of 1 TiB SSD. :-(
Each
BmapEntry
instance stores a pointer to the sameCephContext
.As we expect to have thousands of instances the overhead might
be too high. For example, serving 1 TiB SSD disk on x86-64,
while using the default settings, results in 32 MiB of extra
memory consumption:
Although memory is cheap, CPU's caches are not.
Signed-off-by: Radoslaw Zarzynski rzarzynski@mirantis.com