Tcmalloc 安装配置

  

 一、安装libunwind-1.0.tar.gz

 

  1.   ./configure
  2.   make
  3.   autoreconf -i -f
  4.   make install

 

二、安装gperftools-2.0.tar.gz

 

  1.   ./configure --enable-frame-pointers
  2.   make
  3.   make install

 

三、MYSQL 和NGNINX 编译配置

 

  1.   ./configure --prefix=/usr/local/mysql --localstatedir=/var/lib/mysql --with-charset=utf8 --enable-thread-safe-client \  --with-extra-charsets=complex --with-big-tables --with-ssl --enable-assembler --enable-local-infile --with-plugins=innobase --with-plugins=partition \
    --with-mysqld-ldflags=-ltcmalloc
  2. ./configure --with-http_stub_status_module --with-google_perftools_module
  3. google_perftools_profiles /tmp/tcmalloc; 在nginx 主配置 worker_rlimit_nofile 添加此行

 

四、查看是否加载成功

 

[root@localhost webinstall]# lsof -n|awk '{if($0~/tcmalloc/)print $0}'
nginx      6870    nobody   41w      REG              253,0        0     937989 /tmp/tcmalloc.6870
mysqld    22530     mysql  mem       REG              253,0  2216045     948539 /usr/local/lib/libtcmalloc.so.4.1.0









本文转自 ibelieveme 51CTO博客,原文链接:http://blog.51cto.com/skyson/912463,如需转载请自行联系原作者
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值