Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

So I've been trying to use apache ab to benchmark performance, but I'm having trouble understanding why I'm getting these results. FYI, its a PHP app using Zend Framework, mySQL database, and mostly default httpd.conf settings. If I set a simple test of 1 concurrent user and 10 requests, it seems like it takes just as long to run as 10 concurrent users and 10 requests, like it's basically just running one request at a time. I've used "top" to monitor the CPU and RAM usage, and with the concurrency level of 10, it hovers around 50%, and RAM there is no swapping going on and I still have about 400MB free. I also checked the httpd.conf file and max clients is the default 256.

-c 1 -n 10

Concurrency Level:      1
Time taken for tests:   11.594 seconds
Complete requests:      10
Failed requests:        0
Write errors:           0
Keep-Alive requests:    0
Total transferred:      738770 bytes
HTML transferred:       735680 bytes
Requests per second:    0.86 [#/sec] (mean)
Time per request:       1159.353 [ms] (mean)
Time per request:       1159.353 [ms] (mean, across all concurrent requests)
Transfer rate:          62.23 [Kbytes/sec] received

Connection Times (ms)
              min  mean[+/-sd] median   max
Connect:        0    0   0.1      0       0
Processing:  1126 1159  21.7   1168    1190
Waiting:     1094 1128  22.7   1138    1160
Total:       1126 1159  21.7   1168    1190

Percentage of the requests served within a certain time (ms)
  50%   1168
  66%   1171
  75%   1172
  80%   1178
  90%   1190
  95%   1190
  98%   1190
  99%   1190
 100%   1190 (longest request)

-c 10 -n 10

Concurrency Level:      10
Time taken for tests:   11.409 seconds
Complete requests:      10
Failed requests:        0
Write errors:           0
Keep-Alive requests:    0
Total transferred:      738770 bytes
HTML transferred:       735680 bytes
Requests per second:    0.88 [#/sec] (mean)
Time per request:       11408.835 [ms] (mean)
Time per request:       1140.883 [ms] (mean, across all concurrent requests)
Transfer rate:          63.24 [Kbytes/sec] received

Connection Times (ms)
              min  mean[+/-sd] median   max
Connect:        2   18   9.8     16      30
Processing:  1429 6316 3330.1   6821   11399
Waiting:     1388 6270 3330.7   6761   11353
Total:       1445 6334 3331.7   6823   11408

Percentage of the requests served within a certain time (ms)
  50%   6823
  66%   7877
  75%   9069
  80%  10185
  90%  11408
  95%  11408
  98%  11408
  99%  11408
 100%  11408 (longest request)
share|improve this question
1  
Requests are taking 10x as long with concurrency. Your server may be misconfigured, your code may be inefficient, or your testing machine that's running ab may be itself the bottleneck (bandwidth, CPU constraints, etc). –  ceejayoz Dec 10 '13 at 18:10
    
@ceejayoz, I'm running on a 2ghz quad core, intel i7-2630QM, with 8 GB RAM. The httpd.conf is mostly default, and I'm using Zend PHP App Framework, with mySQL as db. What do you think is a good way to go about finding what the bottleneck is? –  blacktie24 Dec 11 '13 at 0:57
3  
It sure looks like your app is only processing one request at a time. So you'd better go look for anything that can block. –  Michael Hampton Dec 11 '13 at 1:11
    
@MichaelHampton, any ideas of what could block? –  blacktie24 Dec 11 '13 at 6:09
    
Aren't you the programmer? :) –  Michael Hampton Dec 11 '13 at 6:48

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Browse other questions tagged or ask your own question.