<div dir="ltr">Thanks for reply Loic<div><br></div><div style>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</div>
<div style><br></div><div style>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)</div><div style><br></div><div style>Alex</div><div style>
<br></div><div style>  </div></div><div class="gmail_extra"><br><br><div class="gmail_quote">On Sun, Sep 8, 2013 at 5:25 PM, Loïc Hoguin <span dir="ltr"><<a href="mailto:essen@ninenines.eu" target="_blank">essen@ninenines.eu</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Works fine for me. Quick testing on my laptop with 'connection: close':<br>
<br>
% siege -b -c 500 -t 5s <a href="http://localhost:8080" target="_blank">http://localhost:8080</a><br>
** SIEGE 3.0.1<br>
** Preparing 500 concurrent users for battle.<br>
The server is now under siege...<br>
Lifting the server siege...      done.<br>
<br>
Transactions:                  24906 hits<br>
Availability:                 100.00 %<br>
Elapsed time:                   4.20 secs<br>
Data transferred:               3.23 MB<br>
Response time:                  0.08 secs<br>
Transaction rate:            5930.00 trans/sec<br>
Throughput:                     0.77 MB/sec<br>
Concurrency:                  453.53<br>
Successful transactions:       24906<br>
Failed transactions:               0<br>
Longest transaction:            3.09<br>
Shortest transaction:           0.00<br>
<br>
Did you increase the maximum number of fd on your system? Considering your errors it's what comes to mind first.<br>
<br>
This series of tutorials go through configuring this and tweaking your system some more with sysctl: <a href="http://www.metabrew.com/article/a-million-user-comet-application-with-mochiweb-part-1" target="_blank">http://www.metabrew.com/<u></u>article/a-million-user-comet-<u></u>application-with-mochiweb-<u></u>part-1</a><br>

<br>
If sysctl doesn't do it, look at ulimit also.<br>
<br>
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.<div><div class="h5"><br>
<br>
On 09/08/2013 11:14 PM, Alex Babkin wrote:<br>
</div></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div><div class="h5">
Hi<br>
<br>
Was trying to load test my cowboy based websever with tsung and httperf,<br>
and it seems like i'm unable to squeeze out more than 200 req/s from<br>
even the rest_hello_world example app.<br>
<br>
Are there any resources on how erlang/cowboy/linux should be configured<br>
for optimal req/s numbers?<br>
<br>
i tried ubuntu 12.04, 13.04<br>
erlang vers R15B01, R16B01<br>
cowboy master and 0.8<br>
tried it on laptop (older macbook pro) and a powerful core7 blade<br>
<br>
and still, get timeout errors in httperf or errors like below in tsung<br>
when trying to pound the server with as low as 300 req/s:<br>
stats: error_connect_eaddrinuse 1320 10836<br>
stats: error_abort_max_conn_retries 378 378<br>
<br>
also tried playing around with settings like these while starting the<br>
server, with no apparent difference:<br>
  +K true -smp enable +swt low +spp true +P 512000 -env ERL_MAX_PORTS<br>
1000000<br>
<br>
Thanks in advance<br>
Alex<br>
<br>
<br></div></div>
______________________________<u></u>_________________<br>
erlang-questions mailing list<br>
<a href="mailto:erlang-questions@erlang.org" target="_blank">erlang-questions@erlang.org</a><br>
<a href="http://erlang.org/mailman/listinfo/erlang-questions" target="_blank">http://erlang.org/mailman/<u></u>listinfo/erlang-questions</a><br>
<br><span class="HOEnZb"><font color="#888888">
</font></span></blockquote><span class="HOEnZb"><font color="#888888">
<br>
<br>
-- <br>
Loďc Hoguin<br>
Erlang Cowboy<br>
Nine Nines<br>
<a href="http://ninenines.eu" target="_blank">http://ninenines.eu</a><br>
</font></span></blockquote></div><br></div>