Hardware Infrastructure & Performance Optimization
The effect of switching to TCMalloc on RocksDB memory use

The effect of switching to TCMalloc on RocksDB memory use

2/3/2021 · Dmitry Vorobev

What this post added

This post details how Cloudflare identified and resolved a significant memory consumption issue in its Quicksilver configuration distribution system after migrating its storage engine to RocksDB. By analyzing unexpected memory growth and heap profiling, the team discovered that the default glibc malloc allocator was causing memory fragmentation and inefficient memory reuse in a highly concurrent environment. Switching to TCMalloc, a memory allocator designed for multithreading, resulted in a 2.5x reduction in memory usage, demonstrating a key optimization in Cloudflare's memory management strategies for performance and efficiency.

Read the original post ↗