Jemalloc 5.0.1 설치|nginx mysql 사용

698 단어 Jemalloclnmp
cd     /usr/local/src
wget       https://github.com/jemalloc/jemalloc/releases/download/5.0.1/jemalloc-5.0.1.tar.bz2
tar     -xjvf     jemalloc-5.0.1.tar.bz2

cd jemalloc-5.0.1/
./configure  -prefix=/usr/local/jemalloc    --libdir=/usr/local/lib
make  && make install

echo /usr/local/lib >> /etc/ld.so.conf
ldconfig

nginx :     --with-ld-opt="-ljemalloc"   ##           
mysql:   ##         my.cnf

cp /usr/local/lib/libjemalloc.so  /usr/lib

vim  /etc/my.cnf
[mysqld_safe]
malloc-lib=/usr/lib/libjemalloc.so

/etc/init.d/mysqld restart

lsof -n | grep jemalloc                                       

좋은 웹페이지 즐겨찾기