[erlang-questions] Why does "+K true" degrade TCP/IP performance?

Bernard Duggan bernie@REDACTED
Fri Jan 16 06:06:38 CET 2009


Richard Andrews wrote:
>> Is there people who using benefits of "+K true"? Please tell me, what
>> should I use it for?
> 
> I've never used the erl +K option but my understanding is that epoll provides enefits when you have a large number of open sockets to watch. The
benefits are because the file-descriptor set is stored in the kernel and
only needs to be modified when there are changes, not marshalled and
resent completely every call like for poll().

That's pretty much the case.  We have a bit of network device simulation
software that holds open 5000+ TCP connections, but with relatively low
bandwith usage on each.  Without kernel polling, it would peg a CPU at
100% more or less permanently.  With kernel polling turned on, it barely
hits 10% or  so (all this is on my relatively low specced laptop).  So
yeah, it definitely has a use :)

Cheers,

Bernard



More information about the erlang-questions mailing list