User Tools

Site Tools


load_test_ab

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Next revision
Previous revision
load_test_ab [2016/05/13 08:23] – created luke7858load_test_ab [2024/05/23 07:26] (current) – external edit 127.0.0.1
Line 1: Line 1:
 === Load Testing Using ab === === Load Testing Using ab ===
 +== ab - Apache HTTP server benchmarking tool ==
 <sxh bash> <sxh bash>
 # which ab # which ab
Line 13: Line 14:
 \\ \\
 ^ Flag ^ Description ^  ^ Flag ^ Description ^ 
-| -n | | +| -n | The number of requests to be performed (Default is 1) 
-| -c | | +| -c | The number of concurrent requests to be performed at a time (Default is 1) 
-| -k | |  +| -k | Enabled the 'Keep Alive' feature to perform multiple requests in the same HTTP session (Default is NO Keep Alive) |  
-| -H | |+| -H | Append extra headers to the request | 
 +\\ 
 +=== Testing === 
 +<sxh bash> 
 +ab -n 10000 -kc 10000  http://www.example.com/ 
 +</sxh> 
 +\\ 
 +\\ 
 +=== Example Output ==== 
 +<sxh bash> 
 +# ab -n 10000 -kc 100  http://www.example.com/ 
 +This is ApacheBench, Version 2.3 <$Revision: 655654 $> 
 +Copyright 1996 Adam Twiss, Zeus Technology Ltd, http://www.zeustech.net/ 
 +Licensed to The Apache Software Foundation, http://www.apache.org/ 
 + 
 + 
 +Benchmarking www.example.com (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 
 +Server Hostname:        www.example.com 
 +Server Port:            80 
 + 
 +Document Path:          / 
 +Document Length:        0 bytes 
 + 
 +Concurrency Level:      100 
 +Time taken for tests:   626.200 seconds 
 +Complete requests:      10000 
 +Failed requests:        292 
 +   (Connect: 0, Receive: 0, Length: 292, Exceptions: 0) 
 +Write errors:           0 
 +Non-2xx responses:      10000 
 +Keep-Alive requests:    9979 
 +Total transferred:      4572236 bytes 
 +HTML transferred:       82078 bytes 
 +Requests per second:    15.97 [#/sec] (mean) 
 +Time per request:       6261.999 [ms] (mean) 
 +Time per request:       62.620 [ms] (mean, across all concurrent requests) 
 +Transfer rate:          7.13 [Kbytes/sec] received 
 + 
 +Connection Times (ms) 
 +              min  mean[+/-sd] median   max 
 +Connect:        0    0   0.5      0      45 
 +Processing:     0 6228 1160.6   6409   13086 
 +Waiting:        0 6228 1160.6   6408   13086 
 +Total:          0 6228 1160.5   6409   13086 
 + 
 +Percentage of the requests served within a certain time (ms) 
 +  50%   6409 
 +  66%   6509 
 +  75%   6574 
 +  80%   6616 
 +  90%   6749 
 +  95%   6879 
 +  98%   7098 
 +  99%   7252 
 + 100%  13086 (longest request) 
 +</sxh> 
 +\\ 
 +\\ 
 +=== Common Issues === 
 +<sxh bash> 
 +This is ApacheBench, Version 2.3 <$Revision: 655654 $> 
 +Copyright 1996 Adam Twiss, Zeus Technology Ltd, http://www.zeustech.net/ 
 +Licensed to The Apache Software Foundation, http://www.apache.org/ 
 + 
 +Benchmarking www.example.com (be patient) 
 +socket: Too many open files (24) 
 +</sxh>
load_test_ab.1463127836.txt.gz · Last modified: 2024/05/23 07:26 (external edit)

Except where otherwise noted, content on this wiki is licensed under the following license: Public Domain
Public Domain Donate Powered by PHP Valid HTML5 Valid CSS Driven by DokuWiki