Performance testing | What aspects of performance tuning should we start with and how?

0 1 What is performance testing

Performance testing: refers to testing various performance indicators of the system by simulating various normal, peak and abnormal load conditions through automated testing tools.

Common performance tests : stress testing and load testing

Stress Test: Beyond the Breaking Point

Load Testing: Loading Data Near Breaking Points

Performance testing tools:

jmeter (lightweight tool, free, open source)

loadrunn, commercial version charges, cracked version, many bugs, more than 4g per package; popular lightweight tool

locust, use python code instead.

0 2 What is performance tuning

Performance tuning means that after a performance test is completed, according to the data in the report generated during the performance test, the data is analyzed and an optimization plan is given.

0 3 Performance tuning starts from the following aspects

a. Code level

b. Database level - index, foreign key, optimization of sql statement

c. Hardware level

0 4 Why Performance Tuning

It can support a greater amount of business development with fewer hardware resources, so as to achieve the purpose of saving hardware investment.

It can improve the responsiveness of the system when resources are limited and cannot be expanded, so as to bring better perception to users.

0 5 How to optimize the performance?

Step One: Identify the Problem

Code level: In many cases, the performance problems of many programs are written. Therefore, for modules where bottlenecks are found, the code should be checked first.

Database level: It often causes the entire system to run slowly. Some large databases such as Oracle require DBAs to make correct parameter adjustments before they can be put into production.

Hardware level: Hard disk speed, memory size, etc. are all causes of bottlenecks, so this is also the key reason for analysis

Step Two: Analyze the Cause

When the problem is identified, we need to clarify whether the problem affects response time throughput or other problems. Is it a majority of users or a small number of users experiencing this problem. If there are a small number of users, how are the operations of these users different from others. Is the result of system resource monitoring normal? Is the CPU usage reaching the limit? Is the problem on the client or the server? Is the system hardware configuration sufficient? Does the actual load exceed the system's load capacity? Is the system not optimized?

Through these analyzes and system-related issues, you can gain a deeper understanding of system bottlenecks and then analyze the real causes.

Step Three: Determine Adjustment Goals and Solutions

Improve system throughput, shorten response time, and better support concurrency.

Step Four: Test the Solution

Benchmark the system after solution tuning.

Step 5: Analyze tuning results

Has the system tuning met or exceeded the intended goals? Is the overall performance of the system improved or is some performance sacrificed to solve other problems? Is tuning over? Finally, if the expected goals are achieved, the tuning work is basically over.

Finally: If you don’t want to experience the feeling of not being able to find information when learning, no one answering questions, and giving up after persisting for a few days, here I will share with you some learning resources for automated testing, hoping to give you some guidance on the way forward. Come to help, friends can get it for free if they need it 【保证100%免费】

Collection of software testing interview questions

Our advanced study of automated testing must be to find a high-paying job. The following interview questions are the latest interview materials from first-tier Internet companies such as Ali, Tencent, and Byte, and some Byte bosses have given authoritative answers. After completing this set of interview materials, I believe everyone can find a satisfactory job.

How to get the video file:

Guess you like

Origin blog.csdn.net/m0_75277660/article/details/130769825