# Why the benchmark results are different?

**URL:** <https://www.ruby-forum.com/t/why-the-benchmark-results-are-different/218955>\
**Category:** NGINX\
**Created:** [April 17, 2012, 11:10am UTC](https://www.ruby-forum.com/t/why-the-benchmark-results-are-different/218955 "2012-04-17T11:10:31Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Gurdipe\_D](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/g/b77776/32.png) [@Gurdipe\_D](https://www.ruby-forum.com/u/Gurdipe_D)\
**Post date:** [April 17, 2012, 11:10am UTC](https://www.ruby-forum.com/t/why-the-benchmark-results-are-different/218955/1 "2012-04-17T11:10:31Z")

</div>

Hi,

I install the newest nginx, and run 3 benchmark tools:  
ab/http\_load/weighttp. I get  
three rps results 9129.48/2594.08 /1107. So which tool give the right  
result?

# ab2 -n 10000 -c 1000 [http://10.6.2.213/](http://10.6.2.213/)

This is ApacheBench, Version 2.3 \<$Revision: 655654 $\>  
Copyright 1996 Adam Twiss, Zeus Technology Ltd,  
[http://www.zeustech.net/](http://www.zeustech.net/)  
Licensed to The Apache Software Foundation, [http://www.apache.org/](http://www.apache.org/)

Benchmarking 10.6.2.213 (be patient)  
Completed 1000 requests  
Completed 2000 requests  
Completed 3000 requests  
Completed 4000 requests  
Completed 5000 requests  
Completed 6000 requests  
Completed 7000 requests  
Completed 8000 requests  
Completed 9000 requests  
Completed 10000 requests  
Finished 10000 requests

Server Software: nginx/1.1.19  
Server Hostname: 10.6.2.213  
Server Port: 80

Document Path: /  
Document Length: 151 bytes

Concurrency Level: 1000  
Time taken for tests: 1.095 seconds  
Complete requests: 10000  
Failed requests: 0  
Write errors: 0  
Total transferred: 3620000 bytes  
HTML transferred: 1510000 bytes  
Requests per second: 9129.48 [#/sec] (mean)  
Time per request: 109.535 [ms] (mean)  
Time per request: 0.110 [ms] (mean, across all concurrent  
requests)  
Transfer rate: 3227.41 [Kbytes/sec] received

Connection Times (ms)  
min mean[+/-sd] median max  
Connect: 0 9 11.4 2 34  
Processing: 2 26 30.3 16 638  
Waiting: 1 24 29.3 16 638  
Total: 3 35 36.9 16 641

Percentage of the requests served within a certain time (ms)  
50% 16  
66% 31  
75% 53  
80% 56  
90% 67  
95% 109  
98% 164  
99% 178  
100% 641 (longest request)

# ./http\_load -parallel 1000 -fetches 10000 ./htl.url

10000 fetches, 1000 max parallel, 1.51e+06 bytes, in 3.85493 seconds  
151 mean bytes/connection  
2594.08 fetches/sec, 391706 bytes/sec  
msecs/connect: 211.437 mean, 3001.19 max, 0.102 min  
msecs/first-response: 38.354 mean, 1456.25 max, 0.189 min  
HTTP response codes:  
code 200 – 10000

# weighttp -n 10000 -t 10 -c 1000 [http://10.6.2.213](http://10.6.2.213)

weighttp - a lightweight and simple webserver benchmarking tool

starting benchmark…  
spawning thread #1: 100 concurrent requests, 1000 total requests  
spawning thread #2: 100 concurrent requests, 1000 total requests  
spawning thread #3: 100 concurrent requests, 1000 total requests  
spawning thread #4: 100 concurrent requests, 1000 total requests  
spawning thread #5: 100 concurrent requests, 1000 total requests  
spawning thread #6: 100 concurrent requests, 1000 total requests  
spawning thread #7: 100 concurrent requests, 1000 total requests  
spawning thread #8: 100 concurrent requests, 1000 total requests  
spawning thread #9: 100 concurrent requests, 1000 total requests  
progress: 10% done  
spawning thread #10: 100 concurrent requests, 1000 total requests  
progress: 20% done  
progress: 30% done  
progress: 40% done  
progress: 50% done  
progress: 60% done  
progress: 70% done  
progress: 80% done  
progress: 90% done  
progress: 100% done

finished in 9 sec, 26 millisec and 801 microsec, 1107 req/s, 391  
kbyte/s  
requests: 10000 total, 10000 started, 10000 done, 10000 succeeded, 0  
failed, 0 errored  
status codes: 10000 2xx, 0 3xx, 0 4xx, 0 5xx  
traffic: 3620000 bytes total, 2110000 bytes http, 1510000 bytes data

Posted at Nginx Forum:

> **[Why the benchmark results are different?](https://forum.nginx.org/read.php?2,225415,225415#msg-225415)**
>
> Hi, I install the newest nginx, and run 3 benchmark tools: ab/http\_load/weighttp. I get three rps results 9129.48/2594.08 /1107. So which tool give the right result? # ab2 -n 10000 -c 1000 http://10.6.2.213/ This is ApacheBench, Version 2.3...

---

<div class="post-metadata">

**Author:** ![bigplum](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/b/7c8e57/32.png) [@bigplum](https://www.ruby-forum.com/u/bigplum)\
**Post date:** [April 17, 2012, 11:19am UTC](https://www.ruby-forum.com/t/why-the-benchmark-results-are-different/218955/2 "2012-04-17T11:19:13Z")

</div>

On Tue, Apr 17, 2012 at 05:09:54AM -0400, bigplum wrote:

> I install the newest nginx, and run 3 benchmark tools:  
> ab/http\_load/weighttp. I get  
> three rps results 9129.48/2594.08 /1107. So which tool give the right  
> result?

I believe you benchmarked these tools themselves.  
It seems the tools overhead is larger than nginx’s overhead.

–  
Igor S.

---

<div class="post-metadata">

**Author:** ![bigplum](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/b/7c8e57/32.png) [@bigplum](https://www.ruby-forum.com/u/bigplum)\
**Post date:** [April 19, 2012, 12:24pm UTC](https://www.ruby-forum.com/t/why-the-benchmark-results-are-different/218955/3 "2012-04-19T12:24:01Z")

</div>

If you have online data,you can use tcpcopy to test your system.

[GitHub - wangbin579/tcpcopy: An online request replication tool, also a tcp stream replay tool, fit for real testing, performance testing, stability testing, stress testing, load testing, smoke testing, etc](https://github.com/wangbin579/tcpcopy) or  
[Google Code Archive - Long-term storage for Google Code Project Hosting.](http://code.google.com/p/tcpcopy/)

Posted at Nginx Forum:

> **[Re: Why the benchmark results are different?](https://forum.nginx.org/read.php?2,225415,225505#msg-225505)**
>
> Hi, I install the newest nginx, and run 3 benchmark tools: ab/http\_load/weighttp. I get three rps results 9129.48/2594.08 /1107. So which tool give the right result? # ab2 -n 10000 -c 1000 http://10.6.2.213/ This is ApacheBench, Version 2.3...
