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

Loïc Hoguin <>
Sun Sep 8 23:25:11 CEST 2013


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

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
>


-- 
Loïc Hoguin
Erlang Cowboy
Nine Nines
http://ninenines.eu



More information about the erlang-questions mailing list