Basic concepts and computational formulas for software performance testing (forwarding)

Source: Internet
Author: User

First, the focus of software performance

What do you need to focus on when performing performance tests on a software?

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 should we 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

(Transferred from Http://www.ha97.com/5095.html)

Basic concepts and computational formulas for software performance testing (forwarding)

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.