Do you know all the questions that must be asked when interviewing performance test engineers?

Table of contents

What are the three core principles of performance testing?

What are the core concerns of performance testing?

Briefly describe the performance testing process

How to determine the maximum load of the system?

Which places (which functions) of your system have been tested for performance?

How do you determine the number of concurrent users?

In what environment are your performance tests performed?

When are your performance tests performed?

How to analyze performance test results?

What is the role of think_time?

After confirming that the performance test results are credible, if the following problems are found, locate the problems according to the ideas provided below

Problem 3: Out of memory, the process disappears

Question 4: The program seriously times out when running with multiple users, and even prompts that it cannot connect to the server.

Question 5: How to identify system bottlenecks?

What are the common pressure models?

What are the application areas of performance testing?

How does jmeter design performance test scenarios?

What are the reasons why tps cannot increase?


What are the three core principles of performance testing?

1. Based on agreement. The object of the performance test is the software of the network distributed architecture, and the core of the network distributed architecture is the network protocol
2. Multithreading. The human brain is single-threaded, and the CPU of a computer is multi-threaded. Performance testing is to use multi-threading technology to simulate multi-user load
3. Simulate real scenarios. The user's access time and access frequency are not fixed.

What are the core concerns of performance testing?

1. User attention. Response time, stability, recoverability
2. Operation and maintenance concerns. Server/database resource usage, server-side processing speed, whether the system can support 7*24 hours
3. Test attention. The maximum number of access users, the maximum number of business processes, and whether memory resources can be recovered normally
4. Development concerns. Code: algorithm, sql statement

Briefly describe the performance testing process

1. Analyze performance requirements. Select the most frequently used scenarios by users to test, such as: login, search, order, etc. Determine the performance indicators, such as: the transaction pass rate is 100%, TOP99% is 5 seconds, the maximum concurrent users is 1000, and the CPU and memory usage is below 70%. 2. Make a performance test plan and specify the test time (usually in the
function After stabilization, such as after the first round of testing) and test environment and test tools
3. Write test cases
4. Build a test environment and prepare test data
5. Write performance test scripts
6. Performance test script tuning. Set checkpoints, parameterization, association, rendezvous, transactions, adjust thinking time, delete redundant scripts
7. Design test scenarios, run test scripts, monitor data
8. Analyze test results, collect relevant log bills of lading for development
9. Performance Test regression
10. Write a test report

jmeter performance test: 2023 detailed explanation of the latest big factory jmeter performance test project in the whole process, quietly collected, you will not see it later_哔哩哔哩_bilibili icon-default.png?t=N6B9https://www.bilibili.com/video/BV1Vu411L77o/?spm_id_from= 333.999.0.0

 

How to determine the maximum load of the system?

Through the load test, the concurrency is continuously increased. As the number of concurrency increases, various performance indicators will change accordingly. When there is a performance inflection point, for example, when the number of users reaches a certain order of magnitude, the response time suddenly increases. Then this inflection point The corresponding number of users is the maximum number of users that the system can carry. Jmeter can use rps timer or step pressure thread group.

Which places (which functions) of your system have been tested for performance?

Select the most frequently used functions by users for testing, such as: login, search, submit order

How do you determine the number of concurrent users?

1) It will be online for a period of time first, and it will be estimated based on the collected user access data.
2) It will be determined according to the demand, peak usage time, number of registered users, single response time, etc.

In what environment are your performance tests performed?

Build an independent performance testing environment for testing

When are your performance tests performed?

Benchmark test: After the functional test, do it when the system is relatively stable.
Load testing: in the dead of night, when no one is using the system

How to analyze performance test results?

First check the pass rate of things, and then analyze other performance indicators, such as confirming whether the response time, transaction pass rate, CPU and other indicators meet the requirements; if the test results are not credible, analyze the cause of the exception, and retest after modification

What is the role of think_time?

Simulate user think time in business benchmarks

After confirming that the performance test results are credible, if the following problems are found, locate the problems according to the ideas provided below

Question 1: The response time is not up to standard.
Check whether the time consumed by the transaction is mainly in the network transmission or the server. If it is the network, use the Throughput (network throughput) graph to calculate whether there is a bottleneck in the bandwidth. If there is a bottleneck, consider increasing the bandwidth. Or compress the data transmission; if there is no bottleneck, then it may be caused by network instability. If the main time is spent on the server, it is necessary to check the CPU of the web server and the database server separately, and whether the memory usage is too high, because the high CPU and memory will definitely cause the response time to be too long. If it is a problem with the web server , take down the corresponding user operation log corresponding to the web server and send it to the development location; if it is a database problem, take down the corresponding log corresponding to the database server and send it to the development location.

Question 2: Server CPU indicators are abnormal
1: Pay attention to the CPU utilization and load. If the utilization is too low and the load is too high, it may be that there are too many process queues, causing blocking. 2:
Pay attention to context switching. If there are too many active switches, then It may be a memory/IO bottleneck; if there are too many passive switches, then the time slice may not be enough, you can consider adjusting the process priority to increase the time slice

Problem 3: Out of memory, the process disappears

1: Observe whether the space allocation between the young generation and the old generation of the heap memory is reasonable, and adjust the memory parameters
2: Whether the swap space is insufficient, triggering the oomkiller

Question 4: The program seriously times out when running with multiple users, and even prompts that it cannot connect to the server.

The program may be a single-threaded processing mechanism, and all subsequent threads are waiting in line

 jmeter performance test: 2023 detailed explanation of the latest big factory jmeter performance test project in the whole process, quietly collected, you will not see it later_哔哩哔哩_bilibili icon-default.png?t=N6B9https://www.bilibili.com/video/BV1Vu411L77o/?spm_id_from= 333.999.0.0

 

Question 5: How to identify system bottlenecks?

1: As the load increases, whether the throughput can continue to rise steadily, and find the point where the throughput declines.
2: As the load increases, whether the response time begins to become longer, and find the point where the response time suddenly becomes longer.
3: Does the error start to appear as the load increases

What are the common pressure models?

1. Concurrency mode (virtual user mode)
Concurrency refers to the number of virtual concurrent users. From a business perspective, it can also be understood as the number of simultaneous online users. From the perspective of the client, to find out the number of online users that each node of the business system can carry at the same time, you can use this mode to set the target concurrency, that is, the number of threads in the jmeter tool 2, RPS mode (throughput mode) RPS (Requests Per
Second
) is the number of requests per second. The RPS mode is the "throughput mode". By setting the number of requests sent per second, from the perspective of the server, the throughput capacity of the system is directly measured.

What are the application areas of performance testing?

Capability verification: Prove the expected capability of your system through actual test results
Bottleneck analysis: Discover system performance bottlenecks (concurrency, load, pressure, failure recovery) through a series of testing methods
Performance tuning: Optimize the system through a series of technical means Performance, including response time, throughput, resource utilization
Capacity planning: In order to meet future planning expectations (number of users, market share), make corresponding adjustments to resources

How does jmeter design performance test scenarios?

Concurrency test: Basic thread group (emphasis on concurrency per unit time, there is no absolute concurrency)
Benchmark test: Repeatedly compare the results to verify whether the tuning results are passed (whether tps is improved and response time is decreased)
Load test: Continuously increase the load, Discovery of performance bottlenecks (ladder pressure thread group, Concurrency Thread Group)
Concurrent user mode load: increasing the number of concurrent users, discovering bottlenecks
Throughput mode load: increasing requests per second (rps) to put pressure on the server, discovery tps bottleneck
stress test: continuous load
       stability stress test on tps bottleneck point: tps maintains high pressure and stability. Generally, take 80% of the maximum tps and continue to run
       the destructive stress test: the purpose is to only need an exception on the server side Failure
recovery test: After an exception occurs, the system can recover quickly
Capacity planning test: 500,000, 2 hours during peak hours

What are the reasons why tps cannot increase?

1. Network bandwidth
In the stress test, sometimes a large number of user requests must be simulated. If the data packets transmitted per unit time are too large and exceed the transmission capacity of the bandwidth, it will cause competition for network resources, resulting in requests received by the server. The number does not reach the upper limit of the processing capacity of the server.

2.
The number of available connections in the connection pool is too small, causing requests to wait. Connection pools are generally divided into server connection pools (such as Tomcat) and database connection pools (or understood as the maximum number of allowed connections).

3.
If the heap memory allocation of GC is unreasonable, it will lead to frequent gc, and gc will cause thread suspension. Especially fullgc, which will cause the thread to pause for a long time

4.
When the database is configured with high concurrency, if the requested data needs to be written to the database and multiple tables, the maximum number of connections to the database is not enough, or the SQL for writing data has no index, or there is no master-slave separation, read and write Separation will lead to slow database transaction processing and affect TPS.

6. Hardware resources
include CPU (configuration, usage, etc.), memory (occupancy, etc.), disk (I/O, paging, etc.)

7. Press
The load capacity of a single machine is limited. If the number of user requests to be simulated exceeds its load limit, TPS will be affected (at this time, distributed pressure testing is required to solve the problem)

 jmeter performance test: 2023 detailed explanation of the latest big factory jmeter performance test project in the whole process, quietly collected, you will not see it later_哔哩哔哩_bilibili icon-default.png?t=N6B9https://www.bilibili.com/video/BV1Vu411L77o/?spm_id_from= 333.999.0.0

Guess you like

Origin blog.csdn.net/MXB_1220/article/details/131795022