MySQL 通过Tcmalloc管理内存

一: Tcmalloc 安装 

1. libunwind 安装
#如果你是在 64 位系统安装 Tcmalloc ,强烈建议先安装 libunwind,详细原因请见:
https://github.com/gperftools/gperftools/blob/master/INSTALL
1) 下载 libunwind
wget http://download.savannah.gnu.org/releases/libunwind/libunwind-0.99-beta.tar.gz
2)编译安装 libunwind
tar -xvf libunwind-0.99-beta.tar.gz
cd libunwind-0.99-beta/
./configure
make && make install

#也可以通过 yum 安装,但请注意版本
yum install libunwind libunwind-devel -y

#查看 yum 安装的包
rpm -qa|grep -i libunwind
libunwind-devel-1.2-2.el7.x86_64
libunwind-1.2-2.el7.x86_64

#删除 yum 安装的相关包
rpm -e libunwind-devel
rpm -e libunwind

2. gperftools 安装

wget https://github.com/gperftools/gperftools/releases/download/gperftools-2.10/gperftools-2.10.tar.gz
tar -zxvf gperftools-2.10.tar.gz
cd gperftools-2.10
./configure --prefix=/usr
make && make install

##注意这里要指定编译路径,否则mysql启动的时候会报如下错误
mysqld_safe --malloc-lib must be located in one of the directories: /usr/lib /usr/lib64 /usr/lib/i386-linux-gnu /usr/l
评论 1
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包

打赏作者

渔夫数据库笔记

你的鼓励将是我创作的最大动力

¥1 ¥2 ¥4 ¥6 ¥10 ¥20
扫码支付:¥1
获取中
扫码支付

您的余额不足,请更换扫码支付或充值

打赏作者

实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值