用Google-perftools的TCMalloc优化MySQL


TCMalloc(Thread-Caching Malloc)可以提高MySQL在内存分配方面的性能和效率,具体请看官方文档
http://google-perftools.googlecode.com/svn/trunk/doc/tcmalloc.html

一.下载软件
wget http://google-perftools.googlecode.com/files/google-perftools-1.4.tar.gz
如果是64位系统请安装libunwind,32位请跳过
wget http://ftp.twaren.net/Unix/NonGNU/libunwind/libunwind-0.99.tar.gz

tar -zxvf libunwind-0.99.tar.gz
cd libunwind-0.99/
CFLAGS=-fPIC ./configure
make CFLAGS=-fPIC
make CFLAGS=-fPIC install

二.安装

tar -zxvf google-perftools-1.4.tar.gz
cd google-perftools[......]

继续阅读