"Once we started profilinglibc
, one of initial assumptions appeared to be true - our heap was awfully fragmented, slowing downmalloc()
."
"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)libc
function, 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 standardlibc
implementations."
Domas' blog has further details.
hmmm....decent enough for a beginner...thanks..:)
ReplyDeleteDid you try comparing tcmalloc to other allocators optimized for multi-threading such as hoard, mtmalloc or ptmalloc?
ReplyDelete