Using Tcmalloc to optimize MySQL
Http://download.savannah.gnu.org/releases/libunwind/libunwind-1.1.tar.gz
Http://gperftools.googlecode.com/files/gperftools-2.1.tar.gz
Install by referring to MySQL management path 19 page
TAR-XF libunwind-1.1.tar.gz
CD libunwind-1.1
Cflags=-fpic./configure--enable-shared
Make Cflags=-fpic
Make Cflags=-fpic Install
TAR-XF gperftools-2.1.tar.gz
CD gperftools-2.1
./configure
Make
Make install
Ls-l/usr/local/lib/libtcmalloc.so
Ls-l/usr/local/lib/libunwind.so
Will/usr/local/lib >>/etc/ld.so.conf
Ldconfig
This step is important. The first time you start MySQL, it's an error.
Modify
Vim/usr/local/mysql/bin/mysqld_safe
# executing Mysqld_safe below this sentence add the following:
Export ld_preload=/usr/local/lib/libtcmalloc.so
Then start MySQL:
/usr/local/mysql/bin/mysqld_safe--DEFAULTS-FILE=/USR/LOCAL/MYSQL/ETC/MY.CNF &
Verify that MySQL is in effect
[Email protected] ~]# lsof-n |grep tcmalloc
Mysqld 21167 mysql mem REG 8,3 1951006 3358698/usr/local/lib/libtcmalloc.so.4.1.2
[Email protected] ~]# lsof |grep-i libtcmalloc.so
Mysqld 21167 mysql mem REG 8,3 1951006 3358698/usr/local/lib/libtcmalloc.so.4.1.2
Looking for Linux IP conflict situations
Arp-scan-i eth0-l
This article is from the "Drunken Cold river" blog, please be sure to keep this source http://cjlozbg.blog.51cto.com/3513565/1723380
Using Tcmalloc to optimize MySQL