
The effect of switching to TCMalloc on RocksDB memory use
2/3/2021
This post details the investigation into high memory consumption in a RocksDB-based service (Quicksilver) and the successful resolution by switching the memory allocator from glibc malloc to TCMalloc. It explains the memory fragmentation issues with glibc's multiple arenas and how TCMalloc's design, with its front-end, middle-end, and back-end components, significantly improves memory reuse and reduces fragmentation, leading to a 2.5x decrease in memory usage.