[erlang-questions] kpoll still using select
Thu Jul 9 12:08:17 CEST 2009
Joel Reymont wrote:
> On Jul 9, 2009, at 10:28 AM, Sverker Eriksson wrote:
>> In case of kernel poll, driver_select may in some
>> cases fall back to use select or poll for individual file descriptors
>> if the
>> OS does not support kernel poll for that device.
> ./configure --enable-threads --enable-smp-support --enable-kernel-poll
> checking for working poll()... broken or based on select()
> checking whether kqueue() fd can be select()ed on... yes
> checking whether kernel poll support should be enabled... yes; kqueue
> It should be using kqueue and the Erlang prompt reports that it's
> using kqueue. In fact, I distinctly remember being able to go to at
> least 20k connections (descriptors) when banging on OpenPoker last year.
> It puzzles me greatly that I cannot do better than 1024 this time around.
> Any suggestions on how to troubleshoot?
Put some printf's in erts/emulator/sys/common/erl_poll.c. This is where
the file descriptor limit is set at start:
pollsets = NULL;
errno = 0;
max_fds = erts_vxworks_max_files;
max_fds = sysconf(_SC_OPEN_MAX);
max_fds = NOFILE;
max_fds = OPEN_MAX;
#if ERTS_POLL_USE_SELECT && defined(FD_SETSIZE)
if (max_fds > FD_SETSIZE)
max_fds = FD_SETSIZE;
if (max_fds < 0)
fatal_error("erts_poll_init(): Failed to get max number of files: %s\n",
More information about the erlang-questions