---
title: "Apache benchmarking"
author: "marshan"
date: "2013-11-17T16:15:48Z"
tags: []
categories: ["开源软件"]
slug: "apache-benchmarking"
draft: false
lastmod: "2013-11-17T16:38:02Z"
id: 1976106
url: "https://feuyeux.iteye.com/blog/1976106"
---

NAME  
       ab - Apache HTTP server benchmarking tool

SYNOPSIS  
       ab  \[ -A auth-username:password ] \[ -b windowsize ] \[ -B local-address ] \[ -c concurrency ] \[ -C cookie-name=value ] \[ -d ] [  
       -e csv-file ] \[ -f protocol ] \[ -g gnuplot-file ] \[ -h ] \[ -H custom-header ] \[ -i ] \[ -k ] \[ -n requests ] \[ -p POST-file  ]  
       \[  -P proxy-auth-username:password ] \[ -q ] \[ -r ] \[ -s timeout ] \[ -S ] \[ -t timelimit ] \[ -T content-type ] \[ -u PUT-file ]  
       \[ -v verbosity] \[ -V ] \[ -w ] \[ -x &lt;table&gt;-attributes ] \[ -X proxy\[:port] ] \[ -y &lt;tr&gt;-attributes ] \[ -z &lt;td&gt;-attributes  ]  [  
       -Z ciphersuite ] \[http\[s]://]hostname\[:port]/path

erichan@erichan-HP-Compaq-6520s:~$ ab -n1000 -c100 http://192.168.0.163:8080/simple-service10/webapi/rest

Concurrency Level:      100  
Time taken for tests:   7.626 seconds  
Complete requests:      1000  
Failed requests:        0  
Write errors:           0  
Total transferred:      5039000 bytes  
HTML transferred:       4889000 bytes  
Requests per second:    131.13 \[#/sec] (mean)  
Time per request:       762.574 \[ms] (mean)  
Time per request:       7.626 \[ms] (mean, across all concurrent requests)  
Transfer rate:          645.30 \[Kbytes/sec] received

Percentage of the requests served within a certain time (ms)  
  50%    543  
  66%    613  
  75%    638  
  80%    723  
  90%   1300  
  95%   3365  
  98%   3487  
  99%   3543  
 100%   3580 (longest request)

erichan@erichan-HP-Compaq-6520s:~$ ab -n1000 -c100 -H 'If-Modifed-Since:' http://192.168.0.163:8080/simple-service10/webapi/rest/last\_modified?userId=eric

Concurrency Level:      100  
Time taken for tests:   6.320 seconds  
Complete requests:      1000  
Failed requests:        0  
Write errors:           0  
Total transferred:      5128000 bytes  
HTML transferred:       4889000 bytes  
Requests per second:    158.23 \[#/sec] (mean)  
Time per request:       632.006 \[ms] (mean)  
Time per request:       6.320 \[ms] (mean, across all concurrent requests)  
Transfer rate:          792.37 \[Kbytes/sec] received

Percentage of the requests served within a certain time (ms)  
  50%    563  
  66%    591  
  75%    608  
  80%    627  
  90%    848  
  95%   1767  
  98%   2007  
  99%   2082  
 100%   2175 (longest request)