下载google-perftools-1.6.tar.gz wget http://google-perftools.googlecode.com/files/google-perftools-1.6.tar.gz tar zxvf google-perftools-1.6.tar.gz 执行./configure make && make install echo "/usr/local/lib" > /etc/ld.so.conf.d/usr_local_lib.conf ldconfig Nginx 优化 编译nginx时 增加 --with-google_perftools_module --prefix=/usr/local/nginx --user=www --group=www --with-google_perftools_module 修改 nginx.conf 增加以下参数 mkdir /tmp/tcmalloc/ google_perftools_profiles /tmp/tcmalloc/; Mysql 优化 编译nginx时 增加 --with-google_perftools_module --prefix=/usr/local/mysql --with-pthread --with-big-tables --with-charset=utf8 --with-extra-charsets=all --enable-static --with-client-ldflags=-all-static --with-mysqld-ldflags=-all-static --with-mysqld-ldflags=-ltcmalloc --enable-thread-safe-client --enable-assembler -- (责任编辑:IT) |