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

Alex Babkin <>
Mon Sep 9 01:29:12 CEST 2013


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 <> 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
>> 
>> http://erlang.org/mailman/**listinfo/erlang-questions<http://erlang.org/mailman/listinfo/erlang-questions>
>>
>>
>
> --
> Loďc Hoguin
> Erlang Cowboy
> Nine Nines
> http://ninenines.eu
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://erlang.org/pipermail/erlang-questions/attachments/20130908/4171d793/attachment.html>


More information about the erlang-questions mailing list