I. http_load
ProgramVery small, less than 100 kb after decompression
Http_load runs in Parallel Multiplexing to test the Web server throughput and load. However, unlike most stress testers
It can run in a single process and generally does not kill the client. You can also test https-type website requests.
: Http://soft.vpser.net/test/http_load/http_load-12mar2006.tar.gz
Easy to install
# Tar zxvf http_load-12mar2006.tar.gz
# Cd http_load-12mar2006
# Make & make install
Command Format: http_load-P concurrent access process count-s URL file to be accessed during access time
Parameters can be freely combined, and there is no limit between parameters. For example, if you write http_load-parallel 5-seconds
300 urls.txt is also supported. We will briefly describe the parameters.
-Parallel-P indicates the number of concurrent user processes.
-Fetches short-F: indicates the total number of visits
-Rate abbreviation-P: indicates the Access frequency per second.
-Seconds-S: indicates the total access time.
Prepare the URL File: urllist.txt. The file format is one URL per line. It is better to have more than 50-URLs. The file format is better.
As follows:
Http://www.vpser.net/uncategorized/choose-vps.html
Http://www.vpser.net/vps-cp/hypervm-tutorial.html
Http://www.vpser.net/coupons/diavps-april-coupons.html
Http://www.vpser.net/security/vps-backup-web-mysql.html
For example:
Http_load-P 30-S 60 urllist.txt
The parameters are understood. Let's run a command to see its return results.
Command: %./http_load-rate 5-seconds 10 URLs indicates that a test lasts for 10 seconds and the frequency is 5.
49 fetches, 2 max parallel, 289884 bytes, in 10.0148 seconds5916 mean Bytes/connection4.89274
Fetches/sec, 28945.5 Bytes/secmsecs/Connect: 28.8932 mean, 44.243 Max, 24.488 minmsecs/first
-Response: 63.5362 mean, 81.624 Max, 57.803 minhttp Response codes: Code 200-49
Result Analysis:
1.49 fetches, 2 max parallel, 289884 bytes, in 10.0148 seconds
In the preceding test, 49 requests are run, the maximum number of concurrent processes is 2, the total data transmitted is 289884 bytes, and the running time is 10.0148 seconds.
2.5916 mean Bytes/connection indicates that the average data volume transmitted by each connection is 289884/49 = 5916
3.4.89274 fetches/sec, 28945.5 Bytes/sec
The number of response requests per second is 4.89274, and the amount of data transmitted per second is 28945.5 Bytes/sec.
4. msecs/Connect: 28.8932 mean, 44.243 Max, 24.488 min indicates that the average response time for each connection is 28.8932 msecs
The maximum response time is 44.243 msecs, and the minimum response time is 24.488 msecs.
5. msecs/first-response: 63.5362 mean, 81.624 Max, 57.803 min
6. HTTP Response codes: Code 200-49 indicates the type of the response page to be opened. If 403 has too many types, it may
Check whether the system has encountered a bottleneck.
Special instructions:
The main indicators in the test results are the fetches/sec and msecs/connect options, that is, the number of queries that the server can respond to per second,
This indicator is used to measure performance. It seems to be more accurate and persuasive than Apache AB.
Qpt-number of responding users and response time per second, and the response time per connection.
The test results mainly refer to these two values. Of course, only these two indicators can not complete the performance analysis, we also need
CPU and men analysis to draw a conclusion
Ii. webshells
Webbench is a website stress testing tool in Linux. It can simulate up to 30 thousand concurrent connections to test the load capacity of the website. You can search by Google. Here is
: Http://soft.vpser.net/test/webbench/webbench-1.5.tar.gz
This program is smaller. It will be less than 50 kb after decompression.
Easy to install
# Tar zxvf webbench-1.5.tar.gz
# Cd webbench-1.5
# Make & make install
The webbench executable file is generated in the current directory and can be used directly.
Usage:
Webbench-C concurrency-t run test time URL
For example:
Webbench-C 5000-T 120 http://www.vpser.net
Iii. AB
The full name of AB is apachemark. It is a small tool attached to Apache. It is specially used for the HTTP server's Benchmark Testing and can simulate multiple concurrent requests at the same time.
A simple example
/* At the beginning of this example, I executed such a commandHttp://www.google.com/AB-N 10-C 10/.This command is used to start AB, send 10 requests (-N 10) to www.google.com, and send 10 requests (-C 10) Each time-that is, all requests are sent. The following is the test report output by AB. The red part is the comment I added. */
C: \ Program Files \ Apache Software Foundation \ apache2.2 \ bin>AB-N 10-C 10 HTTP: // Www.google.com/
This is apachetings, version 2.0.40-dev <$ revision: 1.146 $> APACHE-2.0
Copyright 1996 Adam Twiss, Zeus Technology Ltd, http://www.zeustech.net/
Copyright 1997-2005 the Apache Software Foundation, http://www.apache.org/
Benchmarking www.google.com (Be patient)... Done
Server Software: GWs/1, 2.1
Server Hostname: www.google.com
Server port: 80
Document path :/
Document length: 230 bytes
Concurrency level: 10
/* Duration of the entire test */
Time taken for tests: 3.234651 seconds
/* Number of completed requests */
Complete requests: 10
/* Number of failed requests */
Failed requests: 0
Write errors: 0
Non-2xx responses: 10
Keep-alive requests: 10
/* Network transmission volume in the entire scenario */
Total transferred: 6020 bytes
/* The amount of HTML content transmitted throughout the scenario */
HTML transferred: 2300 bytes
/* One of the most important indicators is equivalentTransactions per second, The mean in the following brackets indicates that this is an average value */
Requests per secondd: 3.09 [#/sec] (mean)
/* The second metric that everyone cares most about is equivalentAverage Transaction Response Time, The mean in the following brackets indicates that this is an average value */This is the average user request wait time.
Time per request: 3234.651 [MS] (mean)
/*This is the average server request processing time.*/
Time per request: 323.465 [MS] (mean, internal SS all concurrent requests)
/* The average network traffic per second can help eliminate the problem of excessive network traffic resulting in prolonged response time */
Transfer Rate: 1.55 [Kbytes/sec] canceled ed
/* Decomposition of time consumed on the network, specific dataAlgorithmNot very clear */
Connection times (MS)
Min mean [+/-SD] median Max
Connect: 20 318 926.1 30 2954
Processing: 40 2160 1462.0 3034 3154
Waiting: 40 2160 1462.0 3034
Total: 60 2479 1276.4 3064
/* The following content shows the responses of all requests in the entire scenario. Each request has a response time in the scenario. 50% of the user response time is less than 3064 milliseconds, 60% of the user response time is less than 3094 milliseconds, and the maximum response time is less than 3184 milliseconds */
Percentage of the requests served within a certain time (MS)
50% 3064
66% 3094
75% 3124
80% 3154
90% 3184
95% 3184
98% 3184
99% 3184
100% 3184 (longest request)
For concurrent requests, the CPU does not actually process them at the same time, but is rotated one by one based on the time slice obtained by each request, therefore, the first time per request is basically equal to the second time per request time multiplied by the number of concurrent requests.
Iv. 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/
Siege download: http://joedog.org/pub/siege/
Decompress:
# Tar-zxf siege-2.67.tar.gz
Go to the extract directory:
# Cd siege-2.67/
Installation:
#./Configure; make
# Make install
Use
Siege-C 200-R 10-F example. url
-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.
Example. url content:
Http://www.licess.cn
Http://www.vpser.net
Http://soft.vpser.net
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