In requests per second (RPS) mode, throughput is maintained to test system performance in high currency scenarios. During the load testing process, the load generator dynamically adjusts the number of virtual users to achieve the specified throughput based on the response time (RT) of the testing APIs.
How is the number of virtual users calculated?
The following formula is used to calculate the number of virtual users in RPS mode: Number of virtual users in RPS mode = RPS × RT (in seconds).
The preceding formula calculates the instantaneous number of virtual users based on the current RPS and RT during the testing process instead of the average value over a specific period of time.
Example:
The RPS is set to 1000:
If the RT is 0.1 seconds, the number of virtual users is 100.
If the RT is 2 seconds, the number of virtual users is 2,000.
What do I do if a service exception occurs?
If a service exception occurs during the performance testing process, stop the testing at the earliest opportunity.
When the tested service becomes abnormal, you can see a surge of RTs or an increase of request failures in Performance Testing Service (PTS). PTS cannot detect the overall health of the tested service. To reach the RPS value that you specified, PTS automatically increases the number of the virtual users, which can exacerbate issues especially if the service is already struggling. In this case, stop the performance testing at the earliest opportunity.
To resolve the issue, we recommend that you perform the following operations:
Specify a reasonable RPS when you create a load model for a performance testing scenario. For more information, see Configure load models and levels.
Start with a lower RPS, and gradually increase the RPS during the testing process. Continuously monitor system performance.