利用jemalloc优化mysql

一.下载安装jemalloc

#wget http://www.canonware.com/download/jemalloc/jemalloc-3.6.0.tar.bz2
#tar jxvf jemalloc-3.6.0.tar.bz2
#cd jemalloc-3.6.0
#./configure --prefix=/usr/local/jemalloc
#make && make install

 

二.在mysqld_safe文件中导入

# executing mysqld_safe

#jemalloc
export LD_PRELOAD=/usr/local/jemalloc/lib/libjemalloc.so

 

三.查看是否导入成功

#lsof -n | grep jemalloc

  

 

posted @ 2016-05-03 19:40  rorshach  阅读(762)  评论(0编辑  收藏  举报