Web Server stress (load) Testing Tool
Siege
An open-source stress testing tool that allows you to perform concurrent access to multiple users on a WEB Site Based on configurations, recording the corresponding time of all request processes of each user, and repeated in a certain number of concurrent accesses.
Official: http://www.joedog.org/
1. Download source code
Google:
wget http://soft.vpser.net/test/siege/siege-2.67.tar.gz
2. decompress, compile, and install
tar -zxf siege-2.67.tar.gz
cd siege-2.67/
/configure
make && make install
3. Run siege
siege -c 200 -r 10 -f test.txt
-C indicates the concurrency and-r indicates the number of repetitions. A url file is a text file. Each line is a url and it will be randomly accessed from it.
Test.txt content:
Http://blog.test.com/wp-content/uploads/2012/07/cluster6.png
Http://blog.test.com/wp-content/uploads/2012/07/cluster7-150x150.png
Http://blog.test.com/wp-content/uploads/2012/07/cluster7.png
Http://blog.test.com/wp-content/uploads/2012/07/cluster8-150x150.png
Http://blog.test.com/wp-content/uploads/2012/07/cluster9-150x150.png
Http://blog.test.com/wp-content/uploads/2012/07/c-ping1-150x150.png
Http://blog.test.com/wp-content/uploads/2012/07/c-po1-150x150.png
Http://blog.test.com/wp-content/uploads/2012/07/datanode1-iostat-150x150.png
Http://blog.test.com/wp-content/uploads/2012/07/datanode1-load-150x150.png
Http://blog.test.com/wp-content/uploads/2012/07/datanode1-memory-150x94.png
Http://blog.test.com/wp-content/uploads/2012/07/datanode2-iostat-150x150.png
Http://blog.test.com/wp-content/uploads/2012/07/datanode2-load-150x150.png
Http://blog.test.com/wp-content/uploads/2012/07/datanode2-memory-150x104.png
Http://blog.test.com/wp-content/uploads/2012/07/DSCN0797-1024x768.jpg
Http://blog.test.com/wp-content/uploads/2012/07/DSCN0797-150x150.jpg
4. Result description
Lifting the server siege... Done.
Transactions: 3419263 hits // 419263 processed
Availability: 100.00% // 100.00% success rate
Elapsed time: 5999.69 secs // total time used
Data transferred: 84273.91 MB // a total of 84273.91 MB Data transmission
Response time: 0.37 secs // corresponding time: 1.65 seconds: display the network connection speed
Transaction rate: 569.91 trans/sec // all processes 569.91 times per second: indicates that after the server
Throughput: 14.05 MB/sec // average data transferred per second
Concurrency: 213.42 // The actual maximum number of concurrent jobs
Successful transactions: 2564081 // number of Successful processes
Failed transactions: 11 // number of Failed processes
Longest transaction: 29.04 // the maximum duration of each transmission
Shortest transaction: 0.00 // the Shortest time taken for each transmission
2. Webbench
Webbench can simulate up to 30 thousand concurrent connections to test the load capacity of the website, which is easy to install and use.
1. Download source code
Google:
wget http://blog.s135.com/soft/linux/webbench/webbench-1.5.tar.gz
2. decompress, compile, and install
Tar zxvf webbench-1.5.tar.gz
Cd webbench-1.5
Make
Mkdir/usr/local/man # create a directory. Otherwise, the installation will fail.
Make install
3. Run webshells
webbench -c 100 -t 30 http://192.168.1.235/index.html
-C indicates the number of concurrencies, and-t indicates the time (seconds)
Webbench-Simple Web Benchmark 1.5
Copyright (c) Radim Kolar 1997-2004, GPL Open Source Software.
Benchmarking: GET http: // 192.168.1.235/index.html
100 clients, running 30 sec.
Speed = 16084 pages/min, 152872 bytes/sec.# Running result display
Requests: 8042 susceed, 0 failed.
4. Tests long ago
// Simulate 20 thousand clients to test the nginx server pressure.