[erlang-questions] how to flush a gen_tcp socket on close?

Ulf Wiger ulf@REDACTED
Fri Apr 6 13:42:32 CEST 2012


On 6 Apr 2012, at 12:39, Per Hedeland wrote:

> Exactly - which raises the question, what *is* the point of having a
> send queue? I.e. the user-level queue that inet_drv maintains, and which
> is causing these problems. I don't know, but since Tony has joined the
> discussion, maybe he can answer.:-)

Far enough removed from the question - not having looked into the code - I may end up with egg on my face for butting in, but…

I recall diskussions about the send queue being there to make sending non-blocking from the erlang side, even if the socket returns EAGAIN.

This was taken a step further when trying to optimize e.g. the AXD 301 & co, such that one could opt to always enter the send queue directly. This achieved a 'bulking' effect which significantly (10-20%, if I recall) improved throughput.

(This would be the {delay_send, boolean()} option. If this isn't relevant to the discussion at hand, my apologies).

BR,
Ulf W
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://erlang.org/pipermail/erlang-questions/attachments/20120406/e43b3a88/attachment.htm>


More information about the erlang-questions mailing list