[erlang-questions] squeezing performance out of cowboy - how?

Alex Babkin ababkin@REDACTED
Mon Sep 9 18:37:52 CEST 2013


Hi Loic, it would be great to reproduce your req/s numbers. 
Do you mind sharing your sysctl.config?
What distro/version of linux are you using?
Thanks for the link, the setup directions in the article are a bit outdated i think

Sent from my iPhone

On Sep 9, 2013, at 3:03 AM, Loïc Hoguin <essen@REDACTED> wrote:

> Yes it can. And at a higher rate too if I close transmission. httperf gives similar results.
> 
> On 09/09/2013 01:29 AM, Alex Babkin wrote:
>> Thanks for reply Loic
>> 
>> it seems that in my case i simply run out of num of open connections
>> limit, and this happens after about 5-10 sec of running at 1000 req/s. I
>> tried running as root and this seemed to gave me higher limit of
>> connections, so i am able to sustain 500 req/s for at least 15 min
>> 
>> I haven't tried siege yet, but can you actually sustain this rate of
>> ~5000 req/s for around 15 min and not just 5 sec? (just curious)
>> 
>> Alex
>> 
>> 
>> 
>> On Sun, Sep 8, 2013 at 5:25 PM, Loïc Hoguin <essen@REDACTED
>> <mailto:essen@REDACTED>> wrote:
>> 
>>    Works fine for me. Quick testing on my laptop with 'connection: close':
>> 
>>    % siege -b -c 500 -t 5s http://localhost:8080
>>    ** SIEGE 3.0.1
>>    ** Preparing 500 concurrent users for battle.
>>    The server is now under siege...
>>    Lifting the server siege...      done.
>> 
>>    Transactions:                  24906 hits
>>    Availability:                 100.00 %
>>    Elapsed time:                   4.20 secs
>>    Data transferred:               3.23 MB
>>    Response time:                  0.08 secs
>>    Transaction rate:            5930.00 trans/sec
>>    Throughput:                     0.77 MB/sec
>>    Concurrency:                  453.53
>>    Successful transactions:       24906
>>    Failed transactions:               0
>>    Longest transaction:            3.09
>>    Shortest transaction:           0.00
>> 
>>    Did you increase the maximum number of fd on your system?
>>    Considering your errors it's what comes to mind first.
>> 
>>    This series of tutorials go through configuring this and tweaking
>>    your system some more with sysctl:
>>    http://www.metabrew.com/__article/a-million-user-comet-__application-with-mochiweb-__part-1
>>    <http://www.metabrew.com/article/a-million-user-comet-application-with-mochiweb-part-1>
>> 
>>    If sysctl doesn't do it, look at ulimit also.
>> 
>>    If that's not it, check that you haven't modified the number of
>>    acceptors to some huge number that doesn't make any sense, leave it
>>    at around 100.
>> 
>> 
>>    On 09/08/2013 11:14 PM, Alex Babkin wrote:
>> 
>>        Hi
>> 
>>        Was trying to load test my cowboy based websever with tsung and
>>        httperf,
>>        and it seems like i'm unable to squeeze out more than 200 req/s from
>>        even the rest_hello_world example app.
>> 
>>        Are there any resources on how erlang/cowboy/linux should be
>>        configured
>>        for optimal req/s numbers?
>> 
>>        i tried ubuntu 12.04, 13.04
>>        erlang vers R15B01, R16B01
>>        cowboy master and 0.8
>>        tried it on laptop (older macbook pro) and a powerful core7 blade
>> 
>>        and still, get timeout errors in httperf or errors like below in
>>        tsung
>>        when trying to pound the server with as low as 300 req/s:
>>        stats: error_connect_eaddrinuse 1320 10836
>>        stats: error_abort_max_conn_retries 378 378
>> 
>>        also tried playing around with settings like these while
>>        starting the
>>        server, with no apparent difference:
>>           +K true -smp enable +swt low +spp true +P 512000 -env
>>        ERL_MAX_PORTS
>>        1000000
>> 
>>        Thanks in advance
>>        Alex
>> 
>> 
>>        _________________________________________________
>>        erlang-questions mailing list
>>        erlang-questions@REDACTED <mailto:erlang-questions@REDACTED>
>>        http://erlang.org/mailman/__listinfo/erlang-questions
>>        <http://erlang.org/mailman/listinfo/erlang-questions>
>> 
>> 
>> 
>>    --
>>    Loďc Hoguin
>>    Erlang Cowboy
>>    Nine Nines
>>    http://ninenines.eu
> 
> 
> -- 
> Loïc Hoguin
> Erlang Cowboy
> Nine Nines
> http://ninenines.eu



More information about the erlang-questions mailing list