jemalloc vs malloc vs tcmalloc: Why Your Server's Default Allocator Is Killing P99 Latency


A few months ago, I was chasing a P99 latency spike on a multi-threaded service handling roughly 40,000 requests per second. The flame graphs pointed at an unusual suspect: malloc. Not a slow database query. Not a network timeout. The standard glibc memory...