标签:process 管理 less 通过 http virt likely 堆栈 repo
The memory reported by the Erlang VM in most tools will be a variant of what is reported by erlang:memory() :
Erlang VM大多数检測内存的工具都是通过erlang:memory()来实现的。-------------------------------------------------------------------------------------1> erlang:memory().
[{total,13772400},
{processes,4390232},
{processes_used,4390112},
{system,9382168},
{atom,194289},
{atom_used,173419},
{binary,979264},
{code,4026603},
{ets,305920}]
--------------------------------------------------------------------------------------
?The total field contains the sum of the memory used for processes and system (which is incomplete, unless the VM is instrumented!). processes is the memory used by Erlang processes, their stacks and heaps. system is the rest: memory used by ETS tables, atoms in the VM, refc binaries11, and some of the hidden data I mentioned was missing.
?If you want the total amount of memory owned by the virtual machine, as in the amount that will trip system limits (ulimit), this value is more difficult to get from within the VM.
?If you want the data without calling top or htop, you have to dig down into the VM’s memory allocators to find things out12.
? allocated:VM占用的总内存。它包括已使用的内存。也包括还已由OS分配给VM但尚未被分配的内存。假设你在处理ulimit和
OS-reported的值,这个參数就非常实用。
? unused:OS分配给VM可是尚未被VM分配的那部分内存。
usage:返回各个功能使用内存的百分比。另一些额外的选项,只是你可能仅仅会在第七章的内存泄漏那里使用。
[11] See Section 7.2标签:process 管理 less 通过 http virt likely 堆栈 repo
原文地址:http://www.cnblogs.com/jhcelue/p/6800565.html