Use AB for stress testing in Ubuntu

Source: Internet
Author: User
Tags cipher suite

1. I recently started to use Apache big data for Data Optimization. Let's talk about the AB stress testing tool in Apache.

The program "AB" has not been installed. You can use the following command to install:

apt-get install apache2-utils   

The following are AB -- Help

SAGE: AB [Options] [http [s]: //] hostname [: Port]/pathoptions are: -N requests number of requests to perform-C concurrency number of multiple requests to make at a time-T timelimit seconds to Max. to spend on benchmarking this implies-N 50000-s timeout seconds to Max. wait for each response default is 30 seconds-B windowsize size of TCP send/Receive Buffer, 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 header to use for post/put data, eg. 'application/X-WWW-form-urlencoded 'default is 'text/plain'-V verbosity how much troubleshooting info to print-W print out results in HTML tables-I use head instead of get-x attributes string to insert as table attributes-y attributes string to insert As tr attributes-Z attributes string to insert as TD or th attributes-C attribute add cookie, eg. 'apache = 100 '. (repeatable)-H attribute add arbitrary header line, eg. 'Accept-encoding: gzip' inserted after all normal header lines. (repeatable)-A attribute add basic WWW authentication, the attributes are a colon separated username and password. -P attribute add basic proxy authentication, the attributes are a colon separated username and password. -X Proxy: Port proxyserver and port number to use-V print version number and exit-K use HTTP keepalive feature-d do not show percentiles served table. -s do not show confidence estimators and warnings. -Q do not show progress when doing more than 150 requests-l accept variable document length (use this for dynamic pages)-G filename output collected data to gnuplot format file. -E filename output CSV file with percentages served-r don't exit on socket receive errors. -H display usage information (this message)-Z ciphersuite specify SSL/TLS cipher suite (see OpenSSL ciphers)-f Protocol specify SSL/TLS Protocol (ssl3, tls1, tls1.1, tls1.2 or all)
-N: Total number of requests executed. The default value is 1.-C: number of concurrent requests. The default value is 1.-T: total time of the test, in seconds. The default value is 50000 s-p: data File-W during post: output results in HTML table format

The result of executing AB-N 5000-C 200 http: // localhost/test. php is as follows:

Benchmarking localhost (Be patient) completed 500 requestscompleted 1000 requestscompleted 1500 requestscompleted 2000 requestscompleted 2500 requestscompleted 3000 requestscompleted 3500 bytes 4000 bytes 4500 requests // number of completed requests
Server Software: Apache/2.4.3 // apache version Server Hostname: localhost // host server port: 80 // port document path:/test. PHP // path document length: 62492 bytes concurrency level: 200 time taken for tests: 3.927 seconds // request Completion Time Complete requests: 5000 // number of completed requests failed requests: 527 // number of failed requests (CONNECT: 0, receive: 0, Length: 527, exceptions: 0) Total transferred: 313289422 bytes // total transmitted bytes HTML transferred: 312459422 bytesrequests per second: 1273.33 [#/sec] (mean) // number of requests per second time per request: 157.069 [MS] (mean) // time per request per time per request: 0.785 [MS] (mean, internal SS all concurrent requests) Transfer Rate: 77914.14 [Kbytes/sec] received // transfer rate connection times (MS) min mean [+/-SD] median maxconnect: 0 6 73.1 0 1001 processing: 2 150 143.9 111 1626 waiting: 2 137 135.3 103 1197 total: 2 155 160.3 111 1626 percentage of the requests served within a certain time (MS) 50% 111 66% 141 75% 168 80% 191 90% 310 95% 452 98% 673 99% 951 (longest request)

 

Use AB for stress testing in Ubuntu

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.