Design of several business models for performance testing

Source: Internet
Author: User

It is necessary to perform a performance test on a system that has more users than the millions portal and the Olympic booking system. Or just like the jokes that appear at the product presentation, the question that the venture capitalists ask is how many users the site can support at the same time, and the project manager says it hasn't been tested. The whole audience is in uproar ....

The first step in performance testing is how to analyze the specific test scenarios and performance testing metrics based on the actual business model.

First, some basic concepts of performance testing business logic comprehension

1. The difference between load test and stress test : The load test is to determine the maximum load test that the system can withstand under the premise of final satisfying system index, and the target of the pressure test is to determine what condition the system performance is in failure state.

2, throughput (throughput): Refers to the number of customer segment requests per unit of time, directly reflects the performance of the software system load capacity.

3, Concurrency (Concurrency): Multiple simultaneous business operations. For example, 100 users at the same time login 21CN mailbox and the number of concurrent online is different. For example, 21CN Pass user login There are 10,000 may only 20% of people are watching the blog, 10% of the people are looking at the album, 30% of the people are viewing the mail, 10% of the people are viewing the podcast, 10% are watching video on demand, 10% of the people are visiting the forum and so on

But the number of people online is 10,000, and concurrent users are specific to each system.

Second, several common business model design

1, E Home advertising system:

(1) The specific business parameters requirements:

To achieve 40 million daily average PV, the system requires the platform to handle 4000 concurrent/second. Depending on the performance of the selected server , the processing capacity is approximately 2000 HTTP concurrent/second or 1000 streaming media concurrent/second. Assuming that 40 million PV has a picture of PV accounted for 30 million, streaming media PV accounted for 10 million, you need a Web server and streaming media server two units.

(2) The specific test design method:

(a) The computing relationship between the processing capacity of the platform and the capacity of the daily average PV to be achieved is:

Parameter description:

X: The average daily PV value of the whole system: million pv/days

M: The maximum effective concurrency of the platform (that is, the number of concurrent hours used to service the display of advertising items) in the following units: Concurrency/sec, 3,600 seconds per hour, which is 3600m concurrency per hour, or 0.36m concurrency/hour.

Y: Average concurrency at non-peak periods and the ratio of the maximum number of concurrent platforms, 0

Y: Peak hours (the platform reaches the maximum number of concurrent 70%, the platform load exceeds 70%, will become unstable), 0

So:

Daily pv= Peak concurrency number * Peak hours + off-peak average concurrency * (24-peak hours)

That

x=0.7*0.36my+y*0.36m* (24-Y)

That is, the final conclusion:

x= (0.252Y+8.64Y-0.36YY) *m

According to the experience value, when y=3,y=30%, m/x=0.33. And M is the maximum effective concurrency of the platform, that is, to serve the display of advertising materials concurrency, and for each display of advertising materials, the client also access other resources such as JS code, and so on, assuming that every time the access to advertising materials with another 2 resources to access.

Then the total concurrency of the platform support is approximately 0.33*3=1 to the average daily PV ratio that needs to be met.

(b) The results of the actual test model design:

The number of concurrent users on the AD link page only needs to reach n1=0.33*40000000*0.7/24*0.3*3600=356

Number of concurrent users for streaming media server: n2=10000000*0.7/24*0.3*3600/2=135

Number of concurrent users for picture server: n3=30000000*0.7/24*0.3*3600/2=405

2, Group E-mail:

(1) Specific business parameters requirements: Group mailbox support 20 million users, the performance requirements of the operation has a mailbox login, read the letter, page, send mail (8 seconds, 2 seconds, 2 seconds within 5 seconds). All operations return the status code of the HTTP200. The server resources are logged into 5 machines (connecting passport), sending and receiving 5 messages (excluding pop transceiver), other mail processing servers 5, POP/SMTP server 5.

(2) Specific test design method: The specific design 20 million user login time will be at 8 to 18 o'clock in the afternoon before the operation, and the business model to meet the 80~20 principle, such as 80% of the business will be processed in 20% of the time. How much is the number of concurrent users logged in to be designed? vulogin=20000000*80%/(10*20%*3600*5) Other things can be and so on.

(3) Of course, the number of concurrent users required to design performance bottlenecks more based on throughput when the business requires throughput is often seen on our 21CN websites and ecommerce sites. Here is the introduction of a formula Vu=f/r*t (VU concurrent Virtual user, F throughput, T performance test time, R per vu request number) example (the throughput of a Web site is 9 billion KB, 500,000 KB per second for each user, and 30 minutes per second of running time for users vu= 9000000000/(500000*30*30))

(4) such as Office systems (more frequent business systems): Some typical user fixed in a day can consider a more accurate method of calculating the number of concurrent users. Introduction of the formula: c=n*l/t,c1=c+ (C is the average number of concurrent users, N is the number of login sessions, L is the length of the login session, T is the duration of the study, C1 is the peak value) (* Here the user is defined to use the approximate number of systems per day from requirements , and here the user is as a typical user to analyze is logged in will be normal process operation) such as 21CNEIP a day 320 Typical user access, the average system time is 4 hours, in one day users use the system within 8 hours. It is concluded that c=320*4/8,c1=c+3 (5) makes some generalizations about these models, whether that model is derived from demand based on the actual model is the most realistic and most effective performance testing model, in the absence of a typical user under the premise of the choice of 2-8 principles (in the test environment To consider the equivalence of the concept is that the number of test environment server is not the actual environment of the time to be converted over, there are typical users of the case to select the maximum number of concurrent calculation method, in the case of demand for throughput with the calculation method ( But the throughput of the data to use the last Test or experience value does not break through the system bottleneck part of the data or inaccurate results, where the number of things per second is the average.

Third, other noteworthy parts

1, set up the test scene in the concurrent users to increase the X virtual user (preheat, RAMP up settings) at a time, and the simultaneous loading of all concurrent users of the test results, the actual test should be based on the specific business situation design. In addition, the actual number of database Records and network environment will affect the test results.

2. It is suggested that the average value can be tested multiple times during the actual testing process .

3, performance testing "inflection point": the situation is that the performance test produces some kind of bottleneck, the main reason is that some kind of resources reached the limit. As the pressure increases, the system performance decreases sharply.

4, Performance Testing system Capability verification: (a) is a basic requirement of system stability, usually shows that the system under the average concurrent user requirements of the server CPU average usage is not higher than 75%, the memory utilization rate is not higher than 75%. (b) The average CPU usage of the server is no higher than 95% and the memory usage is no higher than 90% when the required number of concurrent users reaches the peak rate. (c) The system can operate stably for 72 hours at a rate of 1 time times higher than the actual system operating pressure.

5. In order to distinguish the response time of different things, be sure to add things in the script of many things in order to differentiate, please be sure to parameterize when you want to use multiple accounts or multiple user iterations or loops (many systems limit how long the same account will operate or prevent data conflicts).

Design of several business models for performance testing

Related Article

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.