System throughput (TPS), user concurrency, performance test concepts and formulas

Source: Internet
Author: User
Tags memory usage time interval
system Throughput (TPS), user concurrency, performance test concepts and formulasPosted in: DataBase, Linux, UNIX, Windows, Personal diary | Author: a Global person



A System Swallow metric elements:

The Swallow metric (pressure capability) of a system is closely associated with the request for CPU consumption, external interfaces, Io, and so on.

The higher the CPU consumption of a single reqeust, the slower the external system interface and IO effect, the lower the system throughput capacity, and the higher the reverse.

Several important parameters of system throughput: QPS (TPS), concurrency, response time

QPS (TPS): Number of request/transactions per second

Concurrent Number: The number of request/transactions that the system processes concurrently

Response time: Average response time is generally taken

(a lot of people often confuse concurrency with TPS understanding)

Once you understand the meaning of the above three elements, you can deduce the relationship between them:

QPS (TPS) = concurrency number/average response time

A system throughput is usually determined by the QPS (TPS), the number of concurrent two factors, each system these two values have a relative limit value, under the application scenario access pressure, as long as a certain item reached the highest system value, the system throughput will not go up, if the pressure continues to increase, the system throughput will decline, The reason is that the system is overloaded, and other consumption such as context switching, memory, and so on is causing system performance degradation.

Determining system Response Time elements

We do the project to schedule, can more than one concurrent multi-task, can also be a person or many people serial work, there will always be a critical path, this path is the project duration.

The response time of a system call is the same as the project plan, and there is a critical path, which is the system impact time;

The critical path consists of CPU operation, IO, External system response and so on.

Two System Throughput Evaluation:

We need to consider the effects of CPU operation, IO, External system response and the preliminary estimation of system performance when we are doing system design.

And in the usual circumstances, we face the demand, we evaluate out the QPS, concurrency, there is another dimension: Day PV.

By observing the system's access logs, it was found that, in the case of a large number of users, the same time period in each time period of access traffic is almost the same. Like every morning on weekdays. As long as we can get the daily flow chart and the QPS we can calculate the daily traffic.

The usual technical methods:

1. Find the highest TPS and PV in the system, the two elements have a relatively stable relationship (in addition to holiday, seasonal factor effects)

2. The highest TPS is obtained by means of a stress test or an empirical estimate, followed by a 1 relationship to calculate the maximum daily throughput of the system. Business Chinese and Taobao are not the same customer base, the network behavior of these two customer groups do not apply, the TPS and PV relationship between them are not the same ratio.

A) Taobao

Taobao flow chart:

Taobao's relationship between TPS and PV is typically up to TPS:PV approximately 1:11*3600 (equivalent to 11 hours of access to the highest TPS, this is the scene of the commodity details, different scenarios will be somewhat different)

B) Business-to-business Chinese station

The relationship between business-to-business TPS and PV systems varies from system to application, with a rough estimate of 1:8 hours of relationship (09 traffic analysis data for offerdetail). Wang Pu and offerdetail the two proportions of the difference is very large, may be due to the high percentage of reptile temporary cause.

In the Taobao environment, assuming that we stress test the TPS is 100, then the system's daily throughput =100*11*3600=396 million

This is in the case of simple (single URL), some pages, a page has multiple request, the actual throughput of the system is also small.

Regardless of time-to-think (T_think), there is a relationship between the measured TPS value and the number of concurrent virtual users (u_concurrent) and the transaction response time (t_response) of LoadRunner read (Stable operation):
Tps=u_concurrent/(T_response+t_think).

Relationship between concurrency number, QPS and average response time

Source: http://www.cnblogs.com/jackei/ Basic concepts and computational formulae for software performance testing

First, the focus of software performance

Performance testing of a software needs to focus on those performance.

We think about what roles are involved in software design, deployment, use, and maintenance, and then consider what the performance points are for each of these roles, and what we should focus on as a software performance test engineer.

First of all, the purpose of software development is to allow users to use, we first stand in the user's perspective analysis, users need to pay attention to what performance.

For the user, when clicking on a button, link or issuing an instruction to start, to the system to show the results of the user-perceived form, the process of the time spent is the user of the software performance of the intuitive impression. That is what we call response time, when the corresponding hours, the user experience is very good, of course, the user experience response time includes individual subjective factors and objective response time, in the design of software, we need to consider how to better combine these two parts to achieve the best user experience. Such as: The user in the large data volume query, we can first extract the data presented to the user, in the process of the user to continue the data retrieval, then the user does not know what we are doing in the background.

The user is concerned about the corresponding time of the user action.

Second, we stand in the administrator's perspective to consider the performance points that need attention.

1, the corresponding time
2, the use of server resources is reasonable
3, Application Server and database resources use is reasonable
4, the system can be extended
5, the maximum number of user access to support the system, the maximum amount of business processing capacity
6. Where can the bottleneck of system performance exist
7, replace those devices can improve performance
8, the system can support 7x24 hours of business access

Once again, stand on the development (design) staff angle to consider.

1, the structure design is reasonable
2, the database design is reasonable
3. Is there any performance problem with the code?
4. Is there any unreasonable memory usage in the system?
5, whether there is unreasonable thread synchronization in the system
6, whether there is unreasonable resource competition in the system

So what do we have to look at in terms of performance test engineers?

In a word, we should pay attention to all the above performance points.

Ii. Several key terms of software performance

1. Response Time: The time required to respond to the request

Network transfer time: N1+N2+N3+N4

Application Server processing time: A1+A3

Database server processing time: A2

Response Time =n1+n2+n3+n4+a1+a3+a2

2, the calculation formula of concurrent user number

Number of system users: the number of system-rated users, such as an OA system, the total number of users who may use the system is 5,000, then this number is the number of system users.

Simultaneous online Users: The largest number of simultaneous online users within a certain timeframe.
Simultaneous number of users on-line = number of requests per second RPS (throughput) + Concurrent connections + average user think time

Calculation of the average concurrent user count: c=nl/t

Where c is the average number of concurrent users, n is the average number of access users per day (login session), L is the average time of the day the user logs on to the exit (the average time of the login session), T is the length of the study (how long the user uses the system within a day)

Peak Concurrent User count: c^ approximately equals C + p

Where c^ is the peak of concurrent users and C is the average number of concurrent users, the formula follows the Poisson distribution theory.

3, the calculation formula of the throughput

The number of requests that the system processes the user within a unit of time

From a business perspective, throughput can be measured by: Number of Requests/sec, pages per second, number of people per day, or number of transactions/hours per hour.

From a network point of view, throughput can be measured in bytes per second:

For interactive applications, the throughput metrics reflect the pressure on the server, and he can demonstrate the load capacity of the system

The throughput expressed in different ways can illustrate different levels of problems, such as the number of bytes per second can be expressed in terms of network infrastructure, server architecture, Application Server constraints and other aspects of the bottleneck; the number of requests/sec representation is primarily a bottleneck by the application server and application code constraints.

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

Where F is the throughput, VU represents the number of virtual users, R represents the number of requests per virtual user, and T indicates the time spent in the performance test

4. Performance counter

is a number of data metrics that describe the performance of a server or operating system, such as the use of memory, process time, and the role of "monitoring and analysis" in performance testing, especially when it comes to analyzing all the scalability and performing new performance bottleneck positioning.

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

5, the calculation formula of thinking time

Think time, from a business point of view, this refers to the time interval between each request when the user is doing the operation, and in order to simulate such a time interval, the concept of think time is introduced to simulate the user's operation more realistically when doing the new performance test.

In throughput this formula F=vu * r/t shows that throughput F is a function of the number of VU, the number of requests per user R, and the time t, where r can be calculated using time t and user think time TS: R = t/ts

Here is a general step for calculating the think time:

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

c=nl/t F=RXC

B, statistics the average throughput of the system

F=vu * r/t rxc = VU * r/t

C, statistics on the average number of requests issued by each user

R=u*c*t/vu

D. Calculate the think time according to the formula

Ts=t/r

Permanent Link: http://www.ha97.com/5095.html

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.