首页
Search
1
v2ray异常错误之二
3,310 阅读
2
linux时区设置
2,698 阅读
3
DB2常用操作
2,173 阅读
4
websphere修改jvm内存xmx和xms
1,929 阅读
5
nfs客户端文件属主为nobody的现象
1,552 阅读
技术
生活
运动
游戏
电影
登录
Search
标签搜索
docker
linux
troubleshooting
nginx
secure
truenas
mysql
windows
python
esxi
docker swarm
oracle
zabbix
tomcat
blog
dsm
群晖
rpa
freenas
db
yuc
累计撰写
291
篇文章
累计收到
0
条评论
首页
栏目
技术
生活
运动
游戏
电影
页面
搜索到
3
篇与
的结果
2022-06-15
MySQL更换jemalloc内存分配器
0x1 前提是jemalloc已经安装好。有以下几种方式更换为jemalloc 方式1:编译安装mysql,增加编译参数 -DCMAKE_EXE_LINKER_FLAGS="-ljemalloc" -DWITH_SAFEMALLOC=OFF 方式2:增加mysql脚本环境变量 LD_PRELOAD=/usr/local/lib/libjemalloc.so 参考 https://www.percona.com/blog/2020/12/02/enabling-jemalloc-on-percona-server-for-mysql-5-7-and-8-0-series/
2022年06月15日
843 阅读
0 评论
0 点赞
2022-06-15
nginx更换默认内存分配器为jemalloc
0x1 虽然nginx的性能很高,但是在互联网高并发的场景下长期运行,仍然需要尽可能提升其性能/保持稳定,那么修改默认内存分配器glibc为jemalloc是一个不错的选择 0x2 nginx的默认内存分配器,通过以下命令做了简单的判断: lsof | grep nginx # 无malloc相关的内容 strings ./nginx # 有malloc关键字,但是无明显jemalloc或者tcmalloc ldd ./nginx # 无malloc相关的内容 通过以上内容,我们无法判断nginx显示使用了jemalloc或者tcmalloc,那么应该是使用了linux默认的glibc的内存分配器 0x3 nginx使用jemalloc的前提是安装了jemalloc,这里不再重复说明。要想更换为jemalloc,仅增加编译参数: --with-ld-opt="-ljemalloc" 0x4 确定已经使用jemalloc。启动nginx,执行如下命令,保证回显有jemalloc关键字 lsof | grep nginx
2022年06月15日
829 阅读
0 评论
0 点赞
2022-06-15
jemalloc的安装
安装依赖 yum -y install autoconf make 下载jemalloc并且编译安装 https://github.com/jemalloc/jemalloc/releases tar -xf jemalloc-x.x.x.tar.bz2 cd jemalloc-x.x.x ./configure --prefix=/usr/local/jemalloc --libdir=/usr/local/lib make && make install make clean cd ../ echo "/usr/local/lib" >/etc/ld.so.conf.d/usr_local_lib.conf /sbin/ldconfig
2022年06月15日
1,022 阅读
0 评论
0 点赞