Jemalloc for MySQL

Source: Internet
Author: User

Ptmalloc is GLIBC's memory allocation management

Tcmalloc is Google's memory allocation management module

Jemalloc is BSD's provided memory allocation management

The performance of the three Jemalloc and Tcmalloc is not the same, but the Ptmalloc is lower

1. Download

wget http://www.canonware.com/download/jemalloc/jemalloc-4.0.1.tar.bz2

2. Decompression and Installation

TAR-JXVF jemalloc-4.0.1.tar.bz2

CD jemalloc-4.0.1

./configure

Make & make Install

3. Configure MySQL to use Jemalloc

[Mysqld_safe]
Malloc-lib=/usr/local/lib/libjemalloc.so

4. Restart MySQL

Service mysqld Restart

5. See if Jemalloc is in effect

Lsof-n |grep Jemalloc

[Email protected] jemalloc-4.0.1]# lsof-n |grep jemalloc
Mysqld 28837 mysql mem REG 8,3 5894355 25433288/usr/local/lib/libjemalloc.so.2

Displays the above information stating that MySQL has successfully loaded Jemalloc

Jemalloc for 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.