[erlang-questions] Increase the handle limit
Mon Oct 24 22:31:06 CEST 2011
On 21 October 2011 23:19, Jon Watte <> wrote:
> FD_SETSIZE is 64 on Windows, probably because that is the limit for
> efficient implementation of select() using MsgWaitForMultipleObjectsEx().
> However, all efficient I/O on Windows uses I/O completion ports, which are a
> lot more efficient than select() (more like epoll on Linux). I imagine
> Erlang uses IOCP as well on Windows, but I don't know for sure.
> The erl environment has various "raise these limits" options. We start ours
> with something like:
> -env ERL_MAX_PORTS 200500
> +P 1001001
> This lets us spawn over a million processes and open two hundred thousand
> sockets and files. (The machine itself also has increased the ulimit for the
> number of file descriptors)
> Hope this helps!
Re-running Peer's test module with raised higher ERL_MAX_PORTS yielded
over 250000 open files before I decided the point was proven.
For reference the most docs I found on this are in open_port/2 in erts
 and some comments in the archives .
More information about the erlang-questions