[erlang-questions] Cowboy vs Misultin

Roberto Ostinelli roberto@REDACTED
Sun May 29 16:38:30 CEST 2011


2011/5/29 Andy W. Song <wsongcn@REDACTED>

> Hi,
>
> I want to build a C1000K test and see how Erlang performs.
>
> Here is the start: Cowboy vs Misultin on WebSocket.
> Both of them support WebSocket out of box. I use code examples from here<https://github.com/extend/cowboy_examples> and
> here <https://github.com/ostinelli/misultin/wiki/ExamplesPage>. Both are
> very simple echo servers. I added erlang:hibernate/3 call into to both
> Cowboy and Misultin's WebSocket handler loop to save memory.
>
> The client code is attached which I modified from this one<https://github.com/MiCHiLU/erlang_websocket>.
> It's a quick hack with a fixed request and doesn't really do the handshake.
> run the client by 'sample_client:start(A,B,C)'.
> A - number of local IP address you want to use.
> B - number of connections per IP
> C - base port number per IP.
> I started with A=20, B=10000 because I don't have that much of memory.
>
> What I found:
> 1. with 200K connections, my client's Erlang instance takes about 2.2G
> residence memory, about the same for Cowboy and 3.8G for Misultin.
> 2. When number of connections is higher than 30K, Cowboy's CPU usage is
> going up and I start to see gen_tcp:connect times out. Misultin's CPU usage
> is pretty consistent and doesn't cause client time out.
>


please provide complete code to reproduce these tests, environment
specifications, and configuration settings. i don't see why misultin's
memory usage should have this much difference and would like to understand
better. i'm currently keeping two distinct ets tables for open tcp
connections and open websocket ones, so that could be a spot but is
currently the only one which i can think of.

very good to see that misultin is being CPU consistent all the way through
and not timing out on new connections.

r.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://erlang.org/pipermail/erlang-questions/attachments/20110529/8c1cdb65/attachment.htm>


More information about the erlang-questions mailing list