It's worth noting that there are certain (relatively unusual) cases where epoll() has significantly worse performance than poll(). The particular case i'm thinking of is where you have a high number of open sockets and, each time (e)poll is called, a significant majority have data waiting on them. This is, as I said, a pretty unusual use pattern, and not something 95% of people will ever strike. But it's worth keeping in mind that the blanket statement "epoll is always faster/better" is not /always/ true. Of course, in the case I just described, it would be well worth asking whether you need poll/epoll at all, but that's beside my point.<br>
All I'm really saying is that, in the vast majority of cases enabling kernel polling will indeed improve matters, sometimes drastically, but if your application does anything even slightly interesting network-wise then it's well worth measuring rather than assuming.<br>
<br>Cheers,<br><br>B<br><br><div class="gmail_quote">On 9 April 2011 04:12, Kaiduan Xie <span dir="ltr"><<a href="mailto:kaiduanx@gmail.com">kaiduanx@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">
Some OS, for example, Windows, does not have kernel poll support. So<br>
it is not enabled by default.<br>
<br>
On Linux, it uses ePoll and is quite stable. It improves the<br>
performance dramatically if you have a lot of concurrent open sockets.<br>
<font color="#888888"><br>
/Kaiduan<br>
</font><div><div></div><div class="h5"><br>
On Thu, Apr 7, 2011 at 1:54 AM, Alexey Romanov<br>
<<a href="mailto:alexey.v.romanov@gmail.com">alexey.v.romanov@gmail.com</a>> wrote:<br>
> From reading, e.g.<br>
> <a href="http://developer.sipphone.com/ejabberd/erlang_epoll_patch/" target="_blank">http://developer.sipphone.com/ejabberd/erlang_epoll_patch/</a>, it seems<br>
> supposed to be a performance improvement which only some applications<br>
> can benefit from, but with no downsides. Presumably it's now<br>
> considered stable (after inclusion into OTP and 3 major versions).<br>
> Rebar enables it by default (see<br>
> <a href="https://github.com/basho/rebar/blob/master/priv/templates/simplenode.vm.args" target="_blank">https://github.com/basho/rebar/blob/master/priv/templates/simplenode.vm.args</a>).<br>
> But why is it required to enable it and "+K true" isn't the default?<br>
> Are there circumstances when it's a bad idea to enable it?<br>
><br>
> Yours, Alexey Romanov<br>
> _______________________________________________<br>
> erlang-questions mailing list<br>
> <a href="mailto:erlang-questions@erlang.org">erlang-questions@erlang.org</a><br>
> <a href="http://erlang.org/mailman/listinfo/erlang-questions" target="_blank">http://erlang.org/mailman/listinfo/erlang-questions</a><br>
><br>
_______________________________________________<br>
erlang-questions mailing list<br>
<a href="mailto:erlang-questions@erlang.org">erlang-questions@erlang.org</a><br>
<a href="http://erlang.org/mailman/listinfo/erlang-questions" target="_blank">http://erlang.org/mailman/listinfo/erlang-questions</a><br>
</div></div></blockquote></div><br>