Skip to content

Stress your webserver

If you wonder how many requests you need to collapse your webserver – siege is a wonderful tool finding that out.

Install:

# yaourt -Sy siege

Running siege from the console outputs:

SIEGE 3.0.5
Usage: siege [options]
       siege [options] URL
       siege -g URL
Options:
  -V, --version             VERSION, prints the version number.
  -h, --help                HELP, prints this section.
  -C, --config              CONFIGURATION, show the current config.
  -v, --verbose             VERBOSE, prints notification to screen.
  -q, --quiet               QUIET turns verbose off and suppresses output.
  -g, --get                 GET, pull down HTTP headers and display the
                            transaction. Great for application debugging.
  -c, --concurrent=NUM      CONCURRENT users, default is 10
  -i, --internet            INTERNET user simulation, hits URLs randomly.
  -b, --benchmark           BENCHMARK: no delays between requests.
  -t, --time=NUMm           TIMED testing where "m" is modifier S, M, or H
                            ex: --time=1H, one hour test.
  -r, --reps=NUM            REPS, number of times to run the test.
  -f, --file=FILE           FILE, select a specific URLS FILE.
  -R, --rc=FILE             RC, specify an siegerc file
  -l, --log[=FILE]          LOG to FILE. If FILE is not specified, the
                            default is used: PREFIX/var/siege.log
  -m, --mark="text"         MARK, mark the log file with a string.
  -d, --delay=NUM           Time DELAY, random delay before each requst
                            between 1 and NUM. (NOT COUNTED IN STATS)
  -H, --header="text"       Add a header to request (can be many)
  -A, --user-agent="text"   Sets User-Agent in request
  -T, --content-type="text" Sets Content-Type in request

Copyright (C) 2013 by Jeffrey Fulmer, et al.
This is free software; see the source for copying conditions.
There is NO warranty; not even for MERCHANTABILITY or FITNESS
FOR A PARTICULAR PURPOSE.
# siege -c 200 SERVERADRESS

Uses 200 concurrent users to stress your server.

# siege -c 200 192.168.1.200/wordpress

tests my simple local wordpress  installation on another machine within my network. Just a simple wordpress-installation + sql-Server – all vanilla with no fancy plugins whatsoever. This is enough to kill the wordpress-page for the time siege is running. The availibility went fromm 100% down to 55%.

siege aborted due to excessive socket failure; you
can change the failure threshold in $HOME/.siegerc

Transactions:		        1300 hits
Availability:		       55.01 %
Elapsed time:		       60.84 secs
Data transferred:	        5.59 MB
Response time:		        8.95 secs
Transaction rate:	       21.37 trans/sec
Throughput:		        0.09 MB/sec
Concurrency:		      191.18
Successful transactions:        2363
Failed transactions:	        1063
Longest transaction:	       29.59
Shortest transaction:	        0.00

Post a Comment

You must be logged in to post a comment.