带有 jemalloc 的 Ruby 2.6.5 [英] Ruby 2.6.5 with jemalloc

查看:53
本文介绍了带有 jemalloc 的 Ruby 2.6.5的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我已经使用 jemalloc 从源代码构建并安装了 rub 2.6.5.但是,当我检查它是否在那里时,我没有看到条目.还有什么我应该做的吗?

I've built and installed rub 2.6.5 from source with jemalloc. However when I check to see if its there I'm not seeing an entry. Is there something else I should have been doing?

ubuntu:~$ uname -a
Linux ip-10-0-3-198 4.15.0-1032-aws #34-Ubuntu SMP Thu Jan 17 15:18:09 UTC 2019 x86_64 x86_64 x86_64 GNU/Linux
ubuntu:~$ ./configure --enable-shared --with-jemalloc
ubuntu:~$ make
ubuntu:~$ make install

结果:

ubuntu:~$ ruby -r rbconfig -e "puts RbConfig::CONFIG['LIBS']"
-lm 

一旦部署就跟踪内存使用情况,与没有 jemalloc 的类似配置的服务器相比,我也没有看到下降.

Tracking memory usage once deployed I'm also not seeing a drop compared to similarly configured servers without jemalloc in place.

我不确定我需要做什么才能让 jemalloc 正常工作.

I'm not sure what I need to be doing in order to get jemalloc working.

谢谢!

推荐答案

尝试:

puts RbConfig::CONFIG['MAINLIBS']

并检查输出中的 -ljemalloc.

此行为最近发生了变化(准确地说是在 2.6.x 中).

This behavior has changed recently (in 2.6.x, to be precise).

这篇关于带有 jemalloc 的 Ruby 2.6.5的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆