[erlang-questions] Increase the handle limit
Jon Watte
jwatte@REDACTED
Fri Oct 21 23:19:06 CEST 2011
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!
Sincerely,
jw
--
Americans might object: there is no way we would sacrifice our living
standards for the benefit of people in the rest of the world. Nevertheless,
whether we get there willingly or not, we shall soon have lower consumption
rates, because our present rates are unsustainable.
On Fri, Oct 21, 2011 at 12:35 AM, Joel Reymont <joelr1@REDACTED> wrote:
> I don't think you can.
>
> I bump against this all the time on the Mac.
>
> Erlang uses the FD_SETSIZE setting from the system header files when
> compiled, normally 1024.
>
> Editing this value and re-compiling Erlang causes epmd to stop working.
>
> My solution is to save the old epmd and recompile after editing the system
> header files.
>
> On Oct 21, 2011, at 7:25 AM, Martin Dimitrov wrote:
>
> > Hi all,
> >
> > I am developing on a Windows 7 machine, Erlang R14B04. The limit of open
> > handles seems to be 1200. But this is not imposed by the operating
> > system (Windows has a hard coded limit of 16 million handles). So my
> > question is how can I increase the handle limit in Erlang?
>
> --------------------------------------------------------------------------
> - for hire: mac osx device driver ninja, kernel extensions and usb drivers
> ---------------------+------------+---------------------------------------
> http://wagerlabs.com | @wagerlabs | http://www.linkedin.com/in/joelreymont
> ---------------------+------------+---------------------------------------
>
> _______________________________________________
> erlang-questions mailing list
> erlang-questions@REDACTED
> http://erlang.org/mailman/listinfo/erlang-questions
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://erlang.org/pipermail/erlang-questions/attachments/20111021/e9fc2da4/attachment.htm>
More information about the erlang-questions
mailing list