What may be caused when the pressure test data cannot be pressed?

1. Network bandwidth

In a stress test, sometimes it is necessary to simulate a large number of user requests. If the data packet transmitted per unit time is too large and exceeds the transmission capacity of the bandwidth, then This will cause competition for network resources and indirectly lead to the number of requests received by the server that does not reach the upper limit of the processing capacity of the server.

2, connection pool

The number of available connections is too few, causing the request to wait. Connection pools are generally divided into server connection pools (such as Tomcat) and database connection pools (or understood as the maximum allowable number of connections).

(For the specific content of the connection pool, please refer to the previous blog: Performance Test: Connection Pool and Thread)

3. Garbage collection mechanism

From the common For application servers such as Tomcat, because Java’s stack memory is dynamically allocated, the specific recycling mechanism is based on algorithms. If the Eden and Survivor areas of the young generation frequently perform Minor GC, the full GC of the old generation is also recycled more frequently. , Then it has a certain impact on TPS

, because garbage collection itself will occupy a certain amount of resources.

4, database configuration

In the case of high concurrency, if the requested data needs to be written to the database, and it needs to be written When entering multiple tables, if the maximum number of connections to the database is not enough, or the SQL that writes the data has no index or bind variables, or there is no master-slave separation, read-write separation, etc., it will cause the database Transaction processing is too slow, affecting TPS.

5. Communication connection mechanism

Serial, parallel, long connection, pipe connection, etc., different connection conditions will also indirectly affect TPS.

(For protocol connection, please refer to the previous blog: HTTP protocol advanced: connection management)

6、Hardware resources (Server and stress testing machine)

Including CPU (configuration, utilization, etc.), memory (occupancy, etc.), disk (I/O, page swapping, etc.).

7. Press machine

For example, jmeter, the load capacity of a single machine is limited. If the number of user requests to be simulated exceeds its load limit, it will also indirectly affect the TPS (this time needs to be distributed Type pressure test to solve the problem of its stand-alone load).

8. Stress test script

Take jemter as an example. My colleagues encountered in previous work and performed a stepped pressure test. The maximum number of simulation requests exceeded the set The number of threads, resulting in insufficient threads.

I mentioned this reason, I want to express the meaning: Sometimes the test script parameter configuration and other reasons will also affect the test result.

9. Business logic

Business decoupling is low and more complicated, and the entire transaction processing line is lengthened.

10. System architecture

For example, whether there is a cache service, cache server configuration, cache hit rate, cache penetration, and cache expiration, etc., will affect the test results.

PS: Performance bottleneck analysis cannot be done from a partial analysis. It must be integrated and multi-dimensional analysis of the cause of the problem. The points listed above may be improperly described or omitted, and are for reference only. . .

https://blog.csdn.net/weixin_34235135/article/details/93219512

Leave a Comment

Your email address will not be published.