16. standalone running environment construction -- using tcmalloc in CentOS-6.4 to optimize mysql5.6

Source: Internet
Author: User
1. Install the libunwind library.
CD/usr/local
Wget http://download.savannah.gnu.org/releases/libunwind/libunwind-1.1.tar.gz
Tar xf libunwind-1.1.tar.gz CD libunwind-1.1
Cflags =-FPIC./configure # Add the compilation parameter make cflags =-FPIC install
Ii. Install gpperftools:
CD/usr/local

Download https://gperftools.googlecode.com/files/gperftools-2.0.tar.gz with thunder
Then upload the file to/usr/local, because it seems that wget cannot download the HTTPS stuff, or it is very troublesome.
Tar-zxvf gperftools-2.0.tar.gz CD gperftools-2.0

./Configure
make && make install 

echo "/usr/local/lib" > /etc/ld.so.conf.d/usr_local_lib.conf

/sbin/ldconfig
Iii. Adding MySQL to dynamic Databases
vi /usr/local/mysql/bin/mysqld_safe

Add the following line after "# executing mysqld_safe:

export LD_PRELOAD="/usr/local/lib/libtcmalloc.so"

The purpose is to load the tcmalloc dynamic library before starting MySQL.

4. Restart the MySQL service: Service MySQL restart 5. Verify that tcmalloc uses lsof to check whether the MySQL process has loaded the tcmalloc Library: "# lsof-N | grep tcmalloc

 

Reference:

Http://www.cnblogs.com/minglog/archive/2011/05/11/2043342.html

Further test:

Module pressure to test the memory usage and evaluate the execution efficiency.

Related Article

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.