Performance test concurrency Peak calculation

Source: Internet
Author: User

a few key terms of software performance 1_ |; S

1. Response Time: The time required to respond to requests 51Testing Software test Network o8p#j3| CI g@~

51Testing Software Test Network 8t6jb,v*@p

Network Transmission time: N1+N2+N3+N4

| ps‑u^ E0

Application Server processing time: A1+A3

#w ' 6v,z ' c%tl0

Database server processing time: a251testing software test Network {s;ta$t

Response Time =n1+a1+n2+a2+n3+a3+n451testing Software test network fo9l6t-^

Require support for 5000-10000 of users to visit the shopping site, which is accessed at the same time. or the number of visits a day. If it's a day's visit, then we need to know which time periods are the most visited. For example, there are 10 hours of access to dense areas, we can estimate 1000 users per hour, peak *2 or 3, that is 3000 per hour, then total one second as long as 3000/3600 is less than 1 concurrent.
If it is concurrent, then 5000 to 10000 of the test will be measured.
Statistical methods of concurrent user numbers there is no exact formula.
The empirical formula for the average number of concurrent users is:
Number of users using the System x (5%~20%).
There is no need to stick to the calculated results for this formula, because the number of concurrent users will be slightly larger for the system to be extended, unless the maximum number of concurrent users that the system can withstand is tested.
For example: Your system supports 10,000 user access,
Calculation formula of concurrent user number
System users: The number of system rated users, such as an OA system, the total number of users may use the system is 2000, then this number is the number of system users
Simultaneous number of users online: The largest number of simultaneous online users within a certain time range
Calculation of average number of concurrent users:
c=nl/t
Where c is the average number of concurrent users, n is the average number of users per day, L is the average time in a day from the login to the exit (operating average time), T is the length of the study (how long a day users use the system)
Number of concurrent users peak calculation:

3, the calculation formula of throughput

%H OU "Be0

Refers to the number of requests that the system processes users within a unit of time

P (g_ba‑j9z/d0

From a business point of view, throughput can be measured by the number of requests/sec, page/sec, number of people/days or processing business/hour units to measure the 51Testing Software test network ' {6v&mz7anee*g

From the network point of view, throughput can be measured in bytes/sec to measure the 51Testing Software Test network '? Bqi5jo

For an interactive application, the throughput metric reflects the pressure on the server, and he can describe the load capacity of the system

, a uz2p Aff0

Throughput expressed in different ways can illustrate different levels of problems, for example, the number of bytes/sec can be expressed in terms of network infrastructure, server architecture, Application Server constraints, and so on; the number of requests per second represents a bottleneck that is largely constrained by Application server and application code constraints.

9m Y3gl%izh "V
P8ru0

When there is no performance bottleneck, there is a link between throughput and the number of virtual users, which can be calculated using the following formula: F=vu * r/t

"{va,bjrx0

Where f is throughput, VU represents the number of virtual users, R represents the number of requests per virtual user, T represents the time spent in performance testing

(_r}^ "B7v[1]j0

51Testing Software Test network 2k3[!k (m
Go3 ' @

4, performance counter 51Testing software Test network A?H&[Q) MF (t‑r

is to describe the performance of the server or operating system Some data indicators, such as the use of memory, process time, in the performance test to play a "monitoring and analysis" role, especially in the analysis of all scalability, a new bottleneck positioning of the key role. 51Testing Software Test Network 8_:np;k0k:jn

Resource utilization: Refers to the use of various resources of the system, such as CPU occupancy rate of 68%, memory occupancy rate of 55%, the general use of "resource actual use/Total resources available" to form resource utilization.

‑\~] QV H0

5. Calculation formula of thinking time

[$RGZt-dc0

Think time, from a business point of view, this time refers to the time interval between each request when the user is doing the operation, and in the new energy test, in order to simulate such time interval, introduced the concept of thinking times, to more realistic simulation of user action. 51Testing Software Test Network ae5f0mw3@
Wjp

In the throughput this formula F=vu * R/T indicates that throughput F is the number of VU, the number of requests per user R and time T, and that R can be computed with time t and user think time TS: R = t/ts

E pnj9n8e&wz0

! O) ZM ' e+g6|} LN0

The following is a general step for calculating thinking time: 51Testing software test Network 2x6kz3m*m

A, first calculate the number of concurrent users of the system

P t8ugms0_8l0

c=nl/t f=rxc51testing Software Test network xiej:|x

B, statistical system average throughput 51Testing software test network I
Q Jyx

F=vu * r/t rxc = VU * r/t51testing software Test network ye ' {u/c5[yb

C, the average number of users issued per user requests 51Testing Software test network y:m;wp w7f H? [1]e

r=u*c*t/vu51testing Software Testing Network Up&e!b2fu1o-l‑o

D, calculate the thinking time according to the formula 51Testing software test net 5Qz ~ ml8kw

ts=t/r51testing Software Testing Network J;iu ' z8c

two calculation of concurrent user number of system

(the highest peak mentioned below 500 people, if not statistically this, can be in accordance with the 2-8 principle, 80% of the operation by 20% of the user to complete)

Suppose there is an OA system, the system has 2000 users-that is, the total number of users who may use the OA system is 2000, the concept is "number of system users," the system has an "online statistics" function (the system with a global variable to count all logged-in users), From the online statistics function can be obtained, the highest peak of 500 people online (this 500 is generally referred to as "online number"), then the number of concurrent users of the system.

According to our definition of the number of concurrent users, this 500 is the maximum number of concurrent users of the business when the system is used. Of course, the 500 value only indicates that 500 users logged on to the system at the peak of the day, which does not mean that the actual server is under pressure. Because the pressure on the server is also related to the specific user access mode. For example, in the 500 users who "use the system at the same time," look at a certain point in time, assuming that 40% of the users are more interested in the system bulletin (note: "See" This action will not have any burden on the server), 20% The user fills in the complex form (for the form that the user fills in, only at the "submit" time will send the request to the server, filling the process is not the pressure on the service side, 20% part of the user in a daze (that is, nothing to do), the remaining 20% users are constantly from one page to another page-- In this scenario, it can be said that only 20% of the users are really pressure on the server. Therefore, as can be seen from the above example, the actual pressure on the server depends not only on the number of concurrent users of the business, but also on the user's business scenario.

In the actual performance test, testers are generally concerned about the number of concurrent users, that is, from the business point of view should be set how many concurrent number is more reasonable, therefore, in the later discussion, but also mainly for the number of business concurrent users to discuss, and, in order to facilitate, Refer to the number of concurrent users directly as a business concurrent user.

(1) Calculate the average number of concurrent users: c= nl/t

(2) The number of concurrent users peak: C ' ≈c+3 root c

In formula (1), C is the average number of concurrent users, n is the average number of users per day, L is the average time in a day from the login to the exit (operating average time), T is the length of the study time (how long a user use the system in a day).

The formula (2) gives the calculation of the peak number of concurrent users, where C ' refers to the peak number of concurrent users, and C is the average number of concurrent users in the formula (1). The formula is derived from the assumption that the user's login session produces a Poisson distribution and is estimated.

Instance:

Suppose there is an OA system, the system has 3,000 users, an average of about 400 users per day to access the system, for a typical user, the user from the login to exit the system for the average time of 4 hours, in a day time, users only within 8 hours to use the system.

According to the formula (1) and the formula (2), you can get:

C = 400*4/8 = 200

C ' ≈200+3* root 200 = 242

However, it is generally the average number of concurrent users that accesses 10% of the system's users per day. The maximum number of concurrent users is multiplied by the previous value, 2 or 3.

If the user requests that the system can handle 100 login requests per second, 10/25/50/75/100 a concurrent user to perform the login operation, and then observe the system's response time and transaction number per second under different loads. If the number of users at 100, the response time is still allowed, it is necessary to increase the number of users, such as 120.

The following is a calculation of the number of concurrent users you encounter at work:

Example: A Web site performance requirements for at least 3000 people at the same time online, each person's login session is estimated to 2 hours per day, 8 hours to calculate.

The number of concurrent users for this site is:

c=3000*2/8=750

Peak value is c=750+3* root 750=832

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.