全球注册的进程的最大数量(Maximum number of globally registered

2019-07-29 09:29发布

有没有办法可以在全球注册的进程数有限制吗? 或者这只是原子的内存/最大数量的限制?

Ubuntu的12.04和Erlang R15B01。

Answer 1:

好问题! 我敢打赌上原子的数目,如果考虑到以下。 该效率指南对系统限制的部分:

Processes
The maximum number of simultaneously alive Erlang processes is by default 32768. This limit can be raised up to at most 268435456 processes at startup (see documentation of the system flag +P in the erl(1) documentation). The maximum limit of 268435456 processes will at least on a 32-bit architecture be impossible to reach due to memory shortage.

Distributed nodes
Known nodes
A remote node Y has to be known to node X if there exist any pids, ports, references, or funs (Erlang data types) from Y on X, or if X and Y are connected. The maximum number of remote nodes simultaneously/ever known to a node is limited by the maximum number of atoms available for node names. All data concerning remote nodes, except for the node name atom, are garbage-collected.

此外, ERL手册中介绍了可用于改变在您的节点的进程数的标志:

+P Number
Sets the maximum number of concurrent processes for this system. Number must be in the range 16..134217727. Default is 32768.

由于可以改变每个节点的并发进程的数量,但你不能改变允许原子的数目,并且该处理名是其在每个节点复制品复制原子,这应该是全局注册过程的总允许数量。

希望能帮助到你 :)

编辑 :其实,原来你可以更改允许的原子数:)

    Atoms
By default, the maximum number of atoms is 1048576. This limit can be raised or lowered using the +t option.

+t size
Set the maximum number of atoms the VM can handle. Default is 1048576.


文章来源: Maximum number of globally registered processes
标签: erlang otp