Google Perf tools - Debian, TCMalloc, Magento and Percona MySQL
For several years now we've been running complex Magento-based stores and on the client's that are very busy we've noticed some issues with MySQL locking when it shouldn't really need to.
After some searching around I came across the GitHub blog post that describes exactly what we found on our system. Here are the details in order to make this function on your Debian 6 installation (and in this case with Percona MySQL):
apt-get install libtcmalloc-minimal0 nano /etc/init.d/mysql
add just after export HOME
export LD_PRELOAD="/usr/lib/libtcmalloc_minimal.so.0" /etc/init.d/mysql restart