/plushcap/analysis/cloudflare/the-effect-of-switching-to-tcmalloc-on-rocksdb-memory-use

The effect of switching to TCMalloc on RocksDB memory use

What's this blog post about?

The text discusses the issue of unexpectedly high memory consumption in a distributed configuration system called Quicksilver after migrating its storage engine to RocksDB. It explains that the root cause was the default memory allocator, glibc malloc, which led to significant memory fragmentation and waste due to its design for multithreaded applications. The solution was switching to TCMalloc, a memory allocator designed specifically for multithreading, which improved service memory consumption by almost three times. The post emphasizes the importance of choosing an appropriate memory allocator based on workload requirements to optimize memory usage in long-running applications with multiple threads.

Company
Cloudflare

Date published
Feb. 3, 2021

Author(s)
Dmitry Vorobev

Word count
1701

Hacker News points
111

Language
English


By Matt Makai. 2021-2024.