Stress testing tools

Source: Internet
Author: User
Tags cipher suite

We know that there are indeed a lot of stress testing software, such as Microsoft's wast, HP's LoadRunner, and so on, but it still takes some time to learn these software, and it is a headache to choose it, later, on GUO Xin's "Building a high-performance web site", he saw the Apache stress testing tool AB, which he introduced, so today, we finally have the opportunity to experience AB's stress testing on the website.

Before the experiment, My Apache has been installed. Operating System: Ubuntu 10.04 VMware 7.0

1. First check the version information AB-V (note that it is an uppercase V)

  1. [Email protected]: ~ $ AB-V
  2. This is apachetings, Version 2.3 <$ revision: 655654 $>
  3. Copyright 1996 Adam Twiss, Zeus Technology Ltd, http://www.zeustech.net/
  4. Licensed to the Apache Software Foundation, http://www.apache.org/

2. You can also use lower-case V to view some AB-V attributes of the AB command.

  1. [Email protected]: ~ $ AB-V
  2. AB: option requires an argument -- V
  3. AB: Wrong number of arguments
  4. Usage: AB [Options] [http [s]: //] hostname [: Port]/path
  5. Options are:
  6. -N requests number of requests to perform
  7. -C concurrency number of multiple requests to make
  8. -T timelimit seconds to max. Wait for responses
  9. -B windowsize size of TCP send/Receive Buffer, in bytes
  10. -P postfile file containing data to post. Remember also to set-T
  11. -U putfile file containing data to put. Remember also to set-T
  12. -T Content-Type Header for posting, eg.
  13. 'Application/X-WWW-form-urlencoded'
  14. Default is 'text/plain'
  15. -V verbosity how much troubleshooting info to print
  16. -W print out results in HTML tables
  17. -I use head instead of get
  18. -X attributes string to insert as table attributes
  19. -Y attributes string to insert As tr attributes
  20. -Z attributes string to insert as TD or th attributes
  21. -C attribute add cookie, eg. 'apache = 1234. (repeatable)
  22. -H attribute add arbitrary header line, eg. 'Accept-encoding: gzip'
  23. Inserted after all normal header lines. (repeatable)
  24. -A attribute add basic WWW authentication, the attributes
  25. Are a colon separated username and password.
  26. -P attribute add basic proxy authentication, the attributes
  27. Are a colon separated username and password.
  28. -X Proxy: Port proxyserver and port number to use
  29. -V print version number and exit
  30. -K use HTTP keepalive feature
  31. -D do not show percentiles served table.
  32. -S do not show confidence estimators and warnings.
  33. -G filename output collected data to gnuplot format file.
  34. -E filename output CSV file with percentages served
  35. -R don't exit on socket receive errors.
  36. -H display usage information (this message)
  37. -Z ciphersuite specify SSL/TLS cipher suite (see OpenSSL ciphers)
  38. -F Protocol specify SSL/TLS Protocol (ssl2, ssl3, tls1, or all)

3. Now let's perform a stress test on the 51cto website, use the command AB-n1000-C10 http://www.51cto.com/index.php, where-n1000 represents the total number of requests-C10 represents the number of concurrent users as 10 http://www.51cto.com/index.php represents the request URL, and below is the test result, I have commented out the three most important indicators.

 

  1. [Email protected]: ~ $ AB-n1000-C10 http://www.51cto.com/index.php
  2. This is apachetings, Version 2.3 <$ revision: 655654 $>
  3. Copyright 1996 Adam Twiss, Zeus Technology Ltd, http://www.zeustech.net/
  4. Licensed to the Apache Software Foundation, http://www.apache.org/
  5.  
  6.  
  7. Benchmarking www.51cto.com (Be patient)
  8. Completed100 requests
  9. Completed200 requests
  10. Completed300 requests
  11. Completed400 requests
  12. Completed500 requests
  13. Completed600 requests
  14. Completed700 requests
  15. Completed800 requests
  16. Completed900 requests
  17. Completed1000 requests
  18. Finished 1000 requests
  19.  
  20. /* The Web server uses nginx */
  21. Server Software: nginx
  22. Server Hostname: www.51cto.com
  23. Server port: 80
  24.  
  25. Document path:/index. php
  26. Document length: 154 bytes
  27.  
  28. Concurrency level: 10
  29. Time taken for tests: 74.373 seconds
  30. Complete requests: 1000
  31. Failed requests: 0
  32. Write errors: 0
  33. Non-2xx responses: 1000
  34. Total transferred: 330000 bytes
  35. HTML transferred: 154000 bytes
  36. /* One of the most important indicators is the throughput.
  37. EquivalentTransactions per second, The mean in the following brackets indicates that this is an average value */
  38. Requests per secondd: 13.45 [#/sec] (mean)
  39. /* Metric 2, which is the most important indicator, refers to the average user request wait time.
  40. EquivalentAverage Transaction Response Time, The mean in the following brackets indicates that this is an average value */
  41. Time per request: 743.726 [MS] (mean)
  42. /* Metric 3 that everyone cares about most refers to the average Server Request Processing Time
  43. Time per request: 74.373 [MS] (mean, internal SS all concurrent requests)
  44. Transfer Rate: 4.33 [Kbytes/sec] canceled ed
  45.  
  46. Connection times (MS)
  47. Min mean [+/-SD] median Max
  48. Connect: 129 163 245.3 145 3154
  49. Processing: 129 576 1510.8 147 11756
  50. Waiting: 129 567 1502.0 147
  51. Total: 261 739 1543.7 294
  52.  
  53. Percentage of the requests served within a certain time (MS)
  54. 50% 294
  55. 66% 297
  56. 75% 304
  57. 80% 308
  58. 90% 1290
  59. 95% 3452
  60. 98% 7582
  61. 99% 7962
  62. 100% 11888 (longest request)

4. To make the results more comparative, we will change the number of concurrent users to 100 for stress testing. Here I will only post three indicators.

  1. Requests per secondd: 190.95 [#/sec] (mean)
  2. Time per request: 523.694 [MS] (mean)
  3. Time per request: 5.237 [MS] (mean, internal SS all concurrent requests)

5. Change the number of concurrent users to 200 for testing.

  1. Requests per secondd: 186.00 [#/sec] (mean)
  2. Time per request: 1149.433 [MS] (mean)
  3. Time per request: 5.747 [MS] (mean, internal SS all concurrent requests)

6. Situations of 500 concurrent users

  1. Requests per secondd: 180.99 [#/sec] (mean)
  2. Time per request: 2631.662 [MS] (mean)
  3. Time per request: 5.263 [MS] (mean, internal SS all concurrent requests)

Let's analyze the test results. First, compare the throughput. When the number of concurrent users is 190 reqs/s, the maximum throughput is 200,500. When the number of concurrent users is, the throughput is reduced, as a result, the user's waiting time increases significantly, and there is already 2 seconds of waiting time. This shows that the performance has dropped significantly. Of course, the analysis of this test result does not mean that 51cto's website can only send users around 500, because I did the test when the server load is heavy, which obviously cannot explain the problem. In addition, when testing in the production environment, it is best to make the test results into a report, which can clearly compare the problem. Well, I should prepare for it, I submitted a test report for our website.

Stress testing tools

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.