> I only have 3Gb of memory in my accelerator at Joyent and I'm trying
> to launch 10 nodes. beam starts with RSS of about 135Mb and quickly
> goes to 500Mb+.
>
> How can I minimize the footprint of my running nodes?
>
> I'm starting slaves like this:
>
> common_args() ->
> "+K true +P 134217727 -smp disable".
>
You will lower the memory footprint significantly by removing +P option or
using a much lower value for it (the number of simultaneously existing
processes that
the system can handle). I am pretty sure you don't need the maximum
value there, you will run out of memory in one node before you reach
134 millions of processes and I am
pretty sure that your system will not handle millions of simultaneous
poker players (in one Erlang-node)
The value +P 134217727 will result in a memory requirement of 4 times
134217727 bytes = 536870908 bytes = 536 Mbytes for the Erlang node
just to hold the process-table.
/Kenneth Erlang/OTP, Ericsson
536M内存呀, 我们完全用不到这么多进程, 所以系统微调真的要很小心。
> to launch 10 nodes. beam starts with RSS of about 135Mb and quickly
> goes to 500Mb+.
>
> How can I minimize the footprint of my running nodes?
>
> I'm starting slaves like this:
>
> common_args() ->
> "+K true +P 134217727 -smp disable".
>
You will lower the memory footprint significantly by removing +P option or
using a much lower value for it (the number of simultaneously existing
processes that
the system can handle). I am pretty sure you don't need the maximum
value there, you will run out of memory in one node before you reach
134 millions of processes and I am
pretty sure that your system will not handle millions of simultaneous
poker players (in one Erlang-node)
The value +P 134217727 will result in a memory requirement of 4 times
134217727 bytes = 536870908 bytes = 536 Mbytes for the Erlang node
just to hold the process-table.
/Kenneth Erlang/OTP, Ericsson
536M内存呀, 我们完全用不到这么多进程, 所以系统微调真的要很小心。
本文探讨了在Joyent加速器中启动10个Erlang节点时遇到的内存占用问题。通过调整启动参数+P的具体数值可以有效降低每个节点的内存消耗。
197

被折叠的 条评论
为什么被折叠?



