Lightweight concrete practices for Web stress testing

Source: Internet
Author: User

One: Several basic concepts that need to be mastered in stress testing

1: Throughput rate (requests per second)

A quantitative description of the server concurrency processing capability, in REQS/S, which refers to the number of requests processed per unit of time for a concurrent user. The maximum number of requests per unit of time that a concurrent user could process, called the maximum throughput rate.

Remember: The throughput rate is based on the number of concurrent users. This statement represents two meanings, 1: The throughput rate is correlated with the number of concurrent users, and 2: The throughput rate is generally different under the different number of concurrent users.

Calculation formula: Total number of requests/time taken to complete these requests, i.e.

Request per second = complete Requests/time taken for tests

2: Concurrent connections (the number of concurrent connections)

The number of concurrent connections refers to the number of requests received by the server at some point, simply speaking, is a session.

3: Concurrent users (the number of concurrent users,concurrency level)

To be aware of the difference between this concept and the number of concurrent connections, a user may produce multiple sessions at the same time, that is, the number of connections. Under http/1.1, IE7 supports two concurrent connections, IE8 supports 6 concurrent connections, FIREFOX3 supports 4 concurrent connections, so our number of concurrent users will have to be divided by this cardinality accordingly.

4: Average user request wait time (times per request)

Calculation formula: The amount of time spent processing all requests (total number of requests/concurrent users), i.e.

Time per request = time taken for tests/(complete requests/concurrency level)

5: Average Server request Latency (time per request:across all concurrent requests)

Calculation formula: The amount of time/Total requests processed to complete all requests, i.e.

Time taken For/testscomplete requests

As you can see, it is the reciprocal of the throughput rate.

At the same time, it also = user average request waiting time/number of concurrent users, i.e.

Time per request/concurrency level

Two: Concrete procedure

1: Pressure test Tool selection

The heavyweight tool has visual Studio's own tools, as well as loader Runner (LR), a lightweight tool that has the apachebench in the Apache project, referred to as AB. You can download it here: Ab.zip.

Simple use and parameter introduction of 2:AB

The above tests are based on one of my ASP. NET pages. For stress testing, you have to do it all the time, and if you don't know how many concurrent users your app can carry, it's basically throwing a time bomb.

Note: For questions with parameters and data, refer to: Http://stackoverflow.com/questions/4885857/how-to-send-more-than-one-query-string-in-apache-bench

Lightweight concrete practices for Web stress testing

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.