[erlang-questions] fast file sending - erlang & nginx

Rapsey rapsey@REDACTED
Sun Nov 21 17:32:57 CET 2010


On Sun, Nov 21, 2010 at 5:11 PM, Roberto Ostinelli <roberto@REDACTED>wrote:

> 2010/11/21 Rapsey <rapsey@REDACTED>:
> > I've done quite a bit of testing on this stuff and the end conclusion is
> > that gen_tcp:send is simply slow. It uses way to much CPU than it should
> and
> > I don't know why. I tried looking at the inet_drv.c stuff, but there is
> just
> > to much code in there.
> > Since my work involves writing a streaming server and throughput is king.
> I
> > gave up on gen_tcp and just implemented my own socket driver and later
> > turned into a NIF (more flexible and general use). It's fast as hell now.
> >
> >
> > Sergej
>
> hi sergej,
>
> is this closed-source? if not, where can it be found?
>
> thank you,
>
> r.
>

Closed. But it really does not take that much effort to implement it. The
basic building blocks are an epoll/kqueue thread and a pipe to communicate
with it. Once it's all created, send an erlang PID to the thread over the
pipe so that the thread can communicate with erlang.


Sergej


More information about the erlang-questions mailing list