placeholder

The effect of switching to TCMalloc on RocksDB memory use

Memory allocator is an important part of the system, so choosing the right allocator for a workload can give huge benefits. Here is a story of how we decreased service memory usage by almost three times.

Click to view the original at blog.cloudflare.com

Hasnain says:

Memory allocators are hard!

“Usage of an allocator which is not optimal for a workload can cause a huge waste of memory. If you have a long-running application with a lot of threads and care about memory usage then glibc malloc is probably not your choice. Allocators that are designed for multithreaded services, like TCMalloc, jemalloc and others can provide much better memory utilization. So be conscious of this factor and go and check how much memory your application wastes.”

Posted on 2021-02-15T02:56:48+0000