Using Tcmalloc to optimize MySQL

Source: Internet
Author: User

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

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.