Test tool Apache Ab/webbentch
The 1.Apache AB command simulates multi-threaded concurrent requests, tests server load pressures, and can also test the pressure of Nginx, Lighthttp, IIS and other Web servers. The AB command is very low on the computer that emits the load, does not consume a lot of CPU, and does not consume too much memory, but it can cause a huge load on the target server. AB is the most commonly used tool for measuring pressure.
2.ebbech can test the performance of different services on the same hardware, as well as the health of the same service on different hardware. Webbech's standard tests can show us two things about the server: The corresponding number of requests per second and the amount of data transferred per second. Webbench can not only have a quasi-static page testing ability, but also to Dynamic page (asp,php,java,cgi) into The ability to test. And he supports static or dynamic performance testing of secure websites that contain SSL, such as e-commerce sites.
I. Installation of pressure measuring tools
1. Installation of the test tool Apache AB
In the ubuntu1404 environment
sudo apt-get install apache2-utils
2. Installation of pressure measuring tool webbentch
Install dependent Ctags
sudo apt-get install Exuberant-ctags
Because there is no apt package, only the installation can be compiled
wget http://blog.s135.com/soft/linux/webbench/webbench-1.5.tar.gz
Tar zxvf webbench-1.5.tar.gz
CD webbench-1.5
Make && make install (no compilation required)
Two. Use of pressure measuring tools
1. Use of the test tool Apache AB
AB [Options] [http[s]://]hostname[:p Ort]/path
[Options]:
-N Requests number of requests
-C Concurrency concurrency number
-T TimeLimit Seconds to Max. To spend on benchmarking
This implies-n 50000
-S timeout maximum request time per request, default 30 seconds
-B windowsize the size of the TCP send/Accept cache, in bytes
-B address to bind to when making outgoing connections
-P postfile File containing data to POST. Remember also to Set-t
-U putfile File containing data to PUT. Remember also to Set-t
-T Content-type specifies the content type, such as-t ' application/x-www-form-urlencoded ' default type is ' Text/plain '.
-V verbosity number of troubleshooting information to print
-W Output HTML table results
-I use HEAD instead of GET
-X Attributes Table property
-Y Attributes tr Property
-Z Attributes th/td property
-C attribute Add as-c ' Apache = 1234 ' (repeatable)
-H attribute Add the request header line, eg. ' Accept-encoding:gzip '. After inserting to all normal head rows, (repeatable)
-a attribute adds a WWW-authentication, which is a colon-separated user name and password.
-P attribute Add basic proxy authentication. This attribute is a colon-separated user name and password.
The proxy server used by-X Proxy:port: Port number
-V Version number
-K Using Long connections
-d do not show percent table
-S does not display trust evaluations and warnings
-Q does not show progress when more than 150 requests
-L Accept variable file lengths (use this as a Dynamic Web page)
-G filename output collects data into files in gnuplot format.
-e filename Output service-side percentage to CSV file
-R receive error does not exit
-H Display Usage information
-Z ciphersuite Specify the SSL/TLS cipher suite (see OpenSSL password)
-F protocol Specify the SSL/TLS protocol (SSL3, TLS1, TLS1.1, TLS1.2 or All)
2. The use of pressure measuring tool webbentch
webbench [option] ... URL
-f|--force does not wait for a reply from the server.
-r|--reload re-Pragma:no-cache.
-t|--time <sec> base time, default 30 seconds
-p|--proxy <server:port> Use a proxy server to request.
-c|--clients <n> number of clients, concurrency, default = 1
-9|--http09 using the http/0.9 version to request
-1|--HTTP10 uses the http/1.0 protocol.
-2|--HTTP11 uses the http/1.1 protocol.
--get uses the GET request method.
--head uses the head request method.
--options Use the options request method.
--trace uses the trace request method.
-?| -h|--help Help
-v|--version version
This article is from the "Rhino" blog, please make sure to keep this source http://rhino.blog.51cto.com/5504750/1784199
The practice of pressure measuring tools