Ejabberd 内存消耗(或泄漏?)

发布于 2024-08-13 04:54:52 字数 353 浏览 2 评论 0原文

我在我们的服务器上使用 ejabberd + mochiweb。 ejabberd 和 mochiweb 运行的时间越长,消耗的内存就越多(昨晚它消耗了 35% 的内存。现在略高于 50%)。我认为这只是一个 mnesia 垃圾收集问题 - 所以我安装了 Erlang R13B3 并重新启动了 ejabberd。但这并没有解决问题。

所以我现在注意到,在略高于全部内存消耗的 50% 时,看起来 ejabberd 开始“释放”内存并保持在 50% 左右。这是正常的吗?大约 50% 是 ejabberd 的阈值,所以当它达到它时,它会说,“嘿,是时候真正释放一些内存了……”,也许它会保留其余部分以便快速访问(例如缓存 mnesia?)

我很欣赏输入。谢谢!

I'm using ejabberd + mochiweb on our server. The longer I keep ejabberd and mochiweb running, the more memory is consumed (last night it was consuming 35% of memory. right now it's a bit above 50%). I thought this was just a mnesia garbage collection issue - so I installed Erlang R13B3 and restarted ejabberd. This didn't fix it though.

So I'm noticing now that at a bit above 50% of full memory consumption, it looks like ejabberd's starting to "let go" of memory and stay at around 50%. Is this normal? Is ~50% a threshold for ejabberd, so that when it reaches it it says, "hey time to actually let some memory go..." and maybe it keeps the rest around for quick access (like caching mnesia?)

I appreciate any input. Thanks!

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(3

请止步禁区 2024-08-20 04:54:52

时不时地在 shell 中运行 erlang:memory(). 。您还可以尝试一下 erlang:system_info(Type).allocated_areasallocator
这些应该会提示您哪种类型的内存正在泄漏。

您还可以设置 memsup 来警告您进程分配过多内存。

Run erlang:memory(). in your shell every now and then. You can also give erlang:system_info(Type). with allocated_areas and allocator a try.
These should give you a hint on what kind of memory is leaking.

You can also setup memsup to warn you about processes allocating too much memory.

花想c 2024-08-20 04:54:52

事实证明,没有内存泄漏(耶!)Ejabberd 仅占用 << 40MB。当我看到 EngineYard 上的使用情况图时,我终于看到了曙光——实际仅使用了 288MB,正在缓冲 550MB,正在缓存 175MB。我的 ejabberd 服务器每 2.5 秒从每个客户端更新一次,这可以解释为什么有这么多的内容被缓冲/缓存。

感谢您的帮助。

Turns out, there is no memory leak (yay!) Ejabberd is taking up only < 40MB. Finally I saw the light when I saw the Usage Graphs on EngineYard - only 288MB is actually being used, 550MB is being buffered, and 175MB is being cached. My ejabberd server an update every 2.5 seconds from each client so that may explain why so much is being buffered/cached.

Thanks for all of your help.

南城旧梦 2024-08-20 04:54:52

Erlang 进程中新创建的原子永远不会被垃圾收集。当进程由随机创建原子名称的算法注册时,这可能是一个问题。随机创建的字符串。

Newly created atoms in erlang processes get never garbage collected. This might be an issue when processes are registered by an algorith that creates atom names from random eg. randomly created strings.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文