Skip to content

Commit

Permalink
crimson: Enable tcmalloc when using seastar
Browse files Browse the repository at this point in the history
classic-osds have always caused significant memory fragmentation
when using the libc memory allocator due to the way that Ceph
tends to utilize memory.  In recent testing, crimson-osd was found
to use 25-27GB of RAM with the stock 3GB bluestore cache settings
(osd_memory_target is only used when tcmalloc is available).  Upon
further testing, it was found that the classic OSD is even worse,
using between 32-33GB of RAM after a 5 minute 4K sequential
write test when using libc malloc.

The good news is that it appears that crimson-osd is able to use
tcmalloc for alienstore without significant modification. Better
still, it drastically reduces memory usage.  In the same test that
resulted in 25GB RSS memory usage for crimson-osd with libc malloc,
a tcmalloc linked version took around 9GB (with an 8GB
osd_memory_target).  Since we do not yet (afaik) expose classic OSD
debugging in crimson it is tough to tell why we are still a little
over, but it's clear that for alienstore we are going to need to
use tcmalloc as we do in classic.

Signed-off-by: Mark Nelson <mnelson@redhat.com>
  • Loading branch information
Mark Nelson committed May 2, 2022
1 parent c0c0eb8 commit 9f31ad7
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/perfglue/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
if(ALLOCATOR STREQUAL "tcmalloc" AND NOT WITH_SEASTAR)
if(ALLOCATOR STREQUAL "tcmalloc")
add_library(heap_profiler STATIC
heap_profiler.cc)
target_link_libraries(heap_profiler
Expand Down

0 comments on commit 9f31ad7

Please sign in to comment.