"Once we started profiling
libc, one of initial assumptions appeared to be true - our heap was awfully fragmented, slowing down
"Here comes our steroids part: Google has developed a drop-in malloc replacement, tcmalloc, that is really efficient. Space efficient, cpu efficient, lock efficient. This is probably the most-used (and sophisticated)
libcfunction, that was suffering performance issues that not many people wanted to actually tackle. The description sounded really nice, so we ended up using it for our suffering Squids."
"The results were what we expected - awesome :) Now the nice part is that the library is optimized for multi-threaded applications, doing lots of allocations for small objects without too much of lock contention, and uses spinlocks for large allocations. MySQL exactly fits the definition, so just by using simple drop-in replacement you may achieve increased performance over standard
Domas' blog has further details.