Although Apache has a stress test tool AB, but AB is too simple to simulate real web access, we're going to use a more powerful web stress test tool--siege (English original intent: mobbing).
First, do the installation:
wgetftp://ftp.joedog.org/pub/siege/siege-latest.tar.gz
tar zxvf siege-latest.tar.gz
cd siege-2.67
./ Configure make
&& make install
Once the installation is complete, you can start the stress test.
Modify Siege Configuration
VI ~/.siegerc
Adjustment:
Verbose = false
concurrent =
delay = 1
Internet = True
benchmark = True
Siege Parameter Introduction:
*-cnum
Sets the number of concurrent users (connections), such as-C10, to set concurrent 10 connections. The default number of connections can be viewed in ~/.SIEGERC, the instruction is concurrent = x, we have adjusted the default concurrent connection to 50 before.
*-rnum
(repetitions), the number of repetitions, that is, the number of requests issued per connection, set this, you do not need to set-T. Corresponds to the reps = x directive in the. SIEGERC configuration file
*-tnum
(time), the duration, that is, the duration of the test, after the NUM time, the unit defaults to points, such as-t10, then the test time is 10 minutes,-t10s, the test time is 10 seconds. The instruction in the corresponding. SIEGERC is time = x instruction
*-B
(benchmark), benchmark test, if set this parameter, then delay time is 0. In. Siegerc we modify the default to open.
*-F Url.txt
(file), which is a URL list file. The file = x directive in the. SIEGERC configuration file