全球注册流程的最大数量 [英] Maximum number of globally registered processes

查看:148
本文介绍了全球注册流程的最大数量的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

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

Is there a limit to the number of processes that can be register globally? Or is this only limited by the memory/ max number of atoms ?

Ubuntu 12.04和Erlang R15B01。

Ubuntu 12.04 and Erlang R15B01.

推荐答案

好问题!如果您考虑以下因素,我会打赌原子数。 效率指南有一个关于系统限制的部分:

Good question! I'd bet on the number of atoms, if you take into account the following. The Efficiency Guide has a section on system limits:

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手册部分描述了可用于更改节点中进程数的标志:

Also, the erl manual section describes the flag you can use to alter the number of processes in your node:

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

由于您可以更改每个节点的并发进程数,允许的原子数,过程名称是复制在每个节点的原子,应该是全局注册过程的总允许数。

Since you can alter the number of concurrent processes per node, but you cant alter the number of allowed atoms, and the process names are atoms which are copied in replica per node, that should be the total allowed number of globally registered processes.

希望它有帮助: )

编辑:实际上,原来你可以改变允许的原子数:)

EDIT: Actually, turns out you can change the number of allowed atoms :)

    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.

这篇关于全球注册流程的最大数量的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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