グローバルに登録できるプロセス数に制限はありますか? それとも、これはメモリ/原子の最大数によってのみ制限されますか?
Ubuntu 12.04 および Erlang R15B01。
グローバルに登録できるプロセス数に制限はありますか? それとも、これはメモリ/原子の最大数によってのみ制限されますか?
Ubuntu 12.04 および Erlang R15B01。
良い質問!次のことを考慮すれば、原子の数に賭けます。効率ガイドには、システムの制限に関するセクションがあります。
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.