Common concepts and calculation formulae of performance testing

Source: Internet
Author: User

Common concepts and calculation formulae of performance testing

First, the concept

  1, concurrent connection number-SBC (simultaneous Browser Connections)

The number of concurrent connections refers to the client initiating a request to the server and establishing a TCP connection. The total number of TCP servers linked per second, which is the number of concurrent connections.

  2. Number of requests-qps (Query per Second)/rps (Request per Second)

The number of requests has 2 abbreviations, which can be called a QPS or RPS. Unit is the number of requests per second. query= queries are also equivalent to requests. The number of requests means that after the connection is established, the client issues an Get/post/head packet to the HTTP service, and the server returns the result of the request in two ways:

    • The HTTP header contains the close Word and closes the TCP connection;
    • The HTTP header contains the keep-alive word, this connection is not closed, you can continue to continue to send requests to the HTTP service through the connection, to reduce the number of TCP concurrent connections.

3. Number of concurrent users

Number of concurrent users, there are two common misconceptions. One of the misconceptions is that the number of concurrent users is understood as the number of users who use the system, on the grounds that they may use the system at the same time, and that a closer and correct view is that the number of users online is understood as the number of concurrent users. In fact, online users are not necessarily associated with other users, such as users who are browsing the web, there is no impact on the server. However, the number of users online is one of the main bases for counting concurrent users.

Second, the calculation formula

1. Maximum number of online users =web supported maximum number of connections *session expiration time/http connection hold Time

2. Estimate user = Test user x (Transaction response time + actual user operation delay time)/transaction response time

3, the average number of concurrent users: c = nl/t C is the average number of concurrent users, N is the number of login sessions, L is the average length of the login session, T is the length of the study time 4, the number of concurrent users peak: c ' = C + 3 square root C example: Suppose there is   An OA system, the system has 3000 users, an average of 400 users per day access to the system, for a typical user, a day from the user login to exit the average time is 4 hours, in a day, the user only within 8 hours of the use of the system; The formula is available: C = 400*4/8  The result is that the value plus thinktime does not add thinktime concurrency: c*20% (10%~20%) f = VU *r/t where f is the throughput, VU represents the number of virtual users, R represents the number of requests per virtual user, and T represents the time of the performance test. R = t/ts TS for user think time

5, the disk has two important parameters: Seek time and rotational latency. The normal I/O count is: ①1000/(Seek time+rotational latency) *0.75, which is normal in this range.

6. QPS: Query rate per second (queries per Second), the number of response requests per second, that is, the maximum throughput capacity.
QPS = REQ/SEC = Number of Requests/sec
QPS statistics [general use of http_load statistics]
QPS = Total Requests/(total number of processes * Request time)
QPS: Number of successful requests per second of a single process server
7, Peak QPS: The principle: 80% of the daily access is concentrated in 20% of the time, this 20% time is called peak time
Formula: (Total PV number * 80%)/(number of seconds per day * 20%) = Peak Time requests per second (QPS)
8, PV: The amount of traffic is Page view, that is, the amount of pageviews or clicks, the user each refresh is calculated once
Single server PV calculation per day
Equation 1: Total PV per day = QPS * 3600 * 6
Equation 2: Total PV per day = QPS * 3600 * 8
9, UV: Independent visitor is a unique Visitor, access to your website of a computer client for a visitor. The same client in 00:00-24:00 is counted only once for the number of servers:
Machine: Peak time per second QPS/single machine for QPS = Required machine
Machine: Ceil (total PV per day/single server total PV per day)

Common concepts and calculation formulae of performance 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.