Tuesday, June 28, 2011

How to use google tcmalloc on mysql

1)install libunwind
CPPFLAGS="-I /usr/local/libunwind/include"
LDFLAGS="-L/usr/local/libunwind/lib"
export CPPFLAGS
export LDFLAGS
./configure --prefix=/usr/local/google-malloc --enable-shared --enable-static --enable-frame-pointers

make && make install
2)add the export comand to mysqld_safe file and restart mysql service.
export LD_PRELOAD=/usr/local/google-malloc/lib/libtcmalloc.so

3)give the tcmalloc and malloc test report.

No comments:

Post a Comment