What is tcmalloc? TCMalloc (google-perftools) is a multi-threaded application for optimizing C++ writes, faster than glibc 2.3's malloc. This module can be used to make MySQL's memory usage more stable under high concurrency. Adding mysql and nginx to lnmp using the online method is not acceptable. Because nginx is added when compiling, mysql lnmp defaults to all static compilation. So to modify the lnmp installation script, install tcmalloc before installing lnmp due to static compilation. Download wget http://gperftools.googlecode.com/files/gperftools-2.0.tar.gz Unzip tar xf gperftools-2.0.tar.gz cd gperftools-2.0 Configuration ./configure Compile and install make && make install Everything goes well Echo “/usr/local/lib” > /etc/ld.so.conf.d/usr_local_lib.conf /sbin/ldconfig
Download wget -c http://soft.vpser.net /lnmp/lnmp0.9-full.tar.gz Unzip tar xf lnmp0.9-full.tar.gz cd lnmp0.9-full
Modify the installation script, I am using the centos vi. Centos.sh
Let mysql support tcmalloc increase at the end of line 306 –with-mysqld-ldflags=-ltcmalloc Approximate increase at the end of line 308 –with-mysqld-ldflags=-ltcmalloc
Let nginx support tcmalloc increase at the end of 460 lines –with-google_perftools_module
After wq exits saving, execute ./centos.sh and install lnmp
as usual. Some nginx parameters mkdir -p /tmp/tcmalloc/chown -R www:www /tmp/tcmalloc/Edit vi /usr/local/nginx/conf/nginx.conf worker_rlimit_nofile 51200; Line increase (on the outside anyway) google_perftools_profiles /tmp /tcmalloc /; wq save and exit
Then restart lnmp execute lsof -n |
Grep tcmalloc can see that the description is successful. Nginx 12256 www 9w REG 0,29 0 13011440 /tmp/tcmalloc/.12256 mysqld 13425 mysql mem REG 253,0 10685079 /usr/local/lib/libtcmalloc.so.4.1.0 (path dev=0,29)
Windows7 to install IIS, according to the online information, enter the Control Pa
Windows 2003 firewall function introduction The firewall provided by Windows 2003 is called Interne
Managing a server is not an easy task. Today, I will introduce some of the five W
phenomenon: After installing mysql, mysql find phpmyadmin can not log in, return
How to solve file fragmentation problems that plague server performance
Configuring Apache to disable the display of file lists
Windows Server 2008 IIS 7 running php configuration method
What is the HBA card What is the role of the HBA card?
NT and server software installation and setup steps
Blade Optimized Virtual Server Load Balancing Solution
Resolving data problems Server and storage management
Win2003 iis asp.net pseudo static configuration diagram
Take Apache 2.2 as an example: Mod
Re-adjust the priority of network services
Restore Display Desktop Button in Windows XP
The computer company win7 system prompts the disk to be protected.
How to change the win10 desktop path?
Win7 system installation theme tutorial
Win7 system e disk can not open how to do
Linux server backup: VPS backup script
Win10 system boot login password how to cancel