]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commit
bluestore: remove CephContext* from BmapEntry. 13651/head
authorRadoslaw Zarzynski <rzarzynski@mirantis.com>
Sat, 25 Feb 2017 20:21:16 +0000 (21:21 +0100)
committerRadoslaw Zarzynski <rzarzynski@mirantis.com>
Sat, 25 Feb 2017 21:21:57 +0000 (22:21 +0100)
commit19ca16b856397256ba9142867e8e3cfb3712db44
treed15fe8aae39ab494032eacb38d3cc6d51035a8bf
parentaf5dab0613b11f779f426ca2dd685df78ce0bf15
bluestore: remove CephContext* from BmapEntry.

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>
src/os/bluestore/BitAllocator.cc
src/os/bluestore/BitAllocator.h