Skip to content

Instantly share code, notes, and snippets.

@deepakkumarnd
Created September 5, 2013 12:35
Show Gist options
  • Select an option

  • Save deepakkumarnd/6449523 to your computer and use it in GitHub Desktop.

Select an option

Save deepakkumarnd/6449523 to your computer and use it in GitHub Desktop.
server benchmarking tools
# Apache Benchmarking tool - ab
ab can simulate a high load on the server.
eg: ab -n 1000 -c 10 -g test_data_1.txt http://www.your-domain.com/index.html
commonly used options
-n number of requests. Default is 1 which is useless.
-c concurrent requests. Default 1
-g GNU plot output. Labels are on first line of output.
-q Suppress progress stattus output to stderr.
-t Time limit. Maximum number of seconds.
-A username:password Specify authentication credentials.
-X proxy[:port] Specify a proxy server.
# httperf
Httperf sends requests to the web server at a specified rate and gathers stats. Increase till one finds the saturation point.
Example usage:
Print performance stats for home page of your-domain.com: httperf --hog --server www.your-domain.com
Create 100 connections at a rate of 10/sec: httperf --hog --server http://www.your-domain.com/ --num-conn 100 --rate 10 --timeout 5
Generate 10 sessions at a rate of one session/sec every 2 seconds: httperf --hog --ser=www --wsess=10,5,2 --rate 1 --timeout 5
httperf command line options:
Command Command Description
--hog Use as many TCP ports as necessary to generate stats (else limited to port 1024-5000)
--num-calls Session oriented workloads.
--max-connections=# Limit the number of connections to that specified.
--num-calls=# Specify the number of calls to issue on each connection before closing it.
--server host-name Default localhost. Specify IP address of host name.
--wsess=N1,N2,X Specify session where
N1: number of sessions
N2: number of calls per session
X: delay between calls (sec)
--timeout Stop if there is no response within timeout period.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment