# Apache benchmark: always a few "super late" requests, why?

**URL:** <https://www.ruby-forum.com/t/apache-benchmark-always-a-few-super-late-requests-why/228719>\
**Category:** NGINX\
**Created:** [May 5, 2013, 4:10am UTC](https://www.ruby-forum.com/t/apache-benchmark-always-a-few-super-late-requests-why/228719 "2013-05-05T04:10:18Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![henrique\_matias](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/h/aca169/32.png) [@henrique\_matias](https://www.ruby-forum.com/u/henrique_matias)\
**Post date:** [May 5, 2013, 4:10am UTC](https://www.ruby-forum.com/t/apache-benchmark-always-a-few-super-late-requests-why/228719/1 "2013-05-05T04:10:18Z")

</div>

Perhaps no matter if i change number of workers, or worker connections,  
there’s always some super late connections on my “ab” tests…

Am very new to benchmark, but the way am doing now is:

ab -n 8000 -c 1000 http://address\_to\_a\_plain\_text\_file

ab -n 8000 -c 1000  
http://address\_to\_a\_rails\_address\_that\_queries\_the\_database

Almost all tests i do ends up with very good results up to 90% of the  
requests ( both, with plain text and with rails script ), but then  
sometimes in this last 10% there’s very slow requests ( 10x more than  
the  
fastest )…

For instance : ab -n 8000 -c 1000 http://address\_to\_a\_plain\_text\_file

Percentage of the requests served within a certain time (ms)  
50% 142  
66% 152  
75% 156  
80% 158  
90% 169  
95% 181  
98% 4180  
99% 5236  
100% 5485 (longest request)

The ones that goes to the database sometimes get very slow compared to  
plain text files, so am guessing i should enlarge somehow the pipe  
betweens  
rails and the db.

For instance : ab -n 8000 -c 1000  
http://address\_to\_rails\_touching\_db\_file

Percentage of the requests served within a certain time (ms)  
50% 10  
66% 10  
75% 10  
80% 11  
90% 12  
95% 13  
98% 16  
99% 25  
100% 13237 (longest request)

Even my plain text files are suffering, so i would guess that is a  
problem  
in my worker\_process / worker\_connections and keepalive\_timeout ?

And for the file that touchs the database i would guess i should be  
tweaking some database configuration between my rails and mongodb…

Any advices?

---

<div class="post-metadata">

**Author:** ![henrique\_matias](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/h/aca169/32.png) [@henrique\_matias](https://www.ruby-forum.com/u/henrique_matias)\
**Post date:** [May 5, 2013, 4:36am UTC](https://www.ruby-forum.com/t/apache-benchmark-always-a-few-super-late-requests-why/228719/2 "2013-05-05T04:36:36Z")

</div>

Why do wish so much that comes from Nginx?  
I would have a look on the network table (listening and connection  
sockets), on the load of the network, system (processes) suring the  
tests.

But you said nothing of all that, just sending raw ab tests results  
which  
say pretty much nothing about anything…

* * *

_B. R._
