检查Erlang崩溃转储 - 如何解释所有内存? [英] Examining Erlang crash dumps - how to account for all memory?

查看:226
本文介绍了检查Erlang崩溃转储 - 如何解释所有内存?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我已经在这个Erlang崩溃转储中移动了,这个虚拟机已经用完了堆内存。问题是,没有明显的罪魁祸首分配所有记忆。

I've been poring over this Erlang crash dump where the VM has run out of heap memory. The problem is that there is no obvious culprit allocating all that memory.

使用一些严重的黑色 awk magic I' ve总结了 Stack + heap OldHeap 堆未使用 OldHeap unused ,并按内存使用量排序。问题是,这个数字不会接近代表所有进程的总内存的数字 processes_used 根据 Erlang崩溃转储指南

Using some serious black awk magic I've summed up the fields Stack+heap, OldHeap, Heap unused and OldHeap unused for each process and ranked them by memory usage. The problem is that this number doesn't come even close to the number that is representing the total memory for all the processes processes_used according to the Erlang crash dump guide.

我有已经尝试过 Crashdump查看器,或者我错过了某些东西对我的问题很有帮助。

I've already tried the Crashdump Viewer and either I'm missing something or there isn't much help there for my kind of problem.

我得到的数字是525 MB,而$ code> processes_used 是1348 MB。在哪里可以找到其余的内存?

The number I get is 525 MB whereas the processes_used value is at 1348 MB. Where can I find the rest of the memory?

编辑:堆未使用 OldHeap未使用的不应该被包括,因为它们是 Stack + Heap OldHeap ,加上为 Stack + Heap OldHeap 显示的号码列为单词而不是字节是问题。

The Heap unused and OldHeap unused shouldn't have been included since they are a sub-part of Stack+Heap and OldHeap, that plus the fact that the number displayed for Stack+Heap and OldHeap are listed as number of words, not bytes, was the problem.

推荐答案

有一个模块叫做 crashdump_viewer ,这对于这些分析是非常有用的。

There is an module called crashdump_viewer which is great for these kinds of analysis.

另一件要记住的是,堆+堆是用字来表示的,而不是字节,这意味着你必须在32和8上乘以4 + 4堆在64位。在手册中找不到参考,但 进程 / a>谈论一下。

Another thing to keep in mind is that Heap+Stack is afaik in words, not bytes which would mean that you have to multiply Heap+Stack with 4 on 32 and 8 on 64 bit. Can't find a reference in the manual for this but Processes talks about it a bit.

这篇关于检查Erlang崩溃转储 - 如何解释所有内存?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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