All Products
Search
Document Center

Performance Testing:How do I set virtual users or RPS?

Last Updated:Oct 30, 2024

This topic describes how to set virtual users or requests per second (RPS) based on the performance testing requirements of your business system.

Background information

Virtual users

Virtual users are simulated entities that interact with a system to emulate load and assess performance. This concept is primarily used for evaluation from the client side and is unsuitable for server-side evaluations related to capacity and high availability.

Virtual users are different from registered users and online users. Registered users are users who are signed up within a database. Online users access the system without imposing load on the server. Virtual users send requests that generate load on the server.

TPS

Transactions per second (TPS) is a key metric used to measure system performance. To directly evaluate TPS in Performance Testing Service (PTS), you can set request per second (RPS), which serves as a reliable reference for capacity planning and traffic flow control.

Examples

If a single virtual user can complete one transaction in 1 second, 1,000 separate users are required to achieve 1,000 TPS. If the response time for a transaction is 1 millisecond, a single user can complete 1,000 transactions in 1 second.

The TPS of a system depends on the number of concurrent virtual users and the response time for transactions.

Set virtual users and TPS

Set the virtual user count

  • Online systems:

    Identify the number of users who access the system in a specific period of time during peak hours. Use the number as the online user count. Set the virtual user count to 10% of the online user count. For example, if 10,000 users access the system in 1 hour, we recommend that you set the virtual user count to 1,000.

  • Unlaunched or newly launched systems:

    No historical data is available for reference. The metrics can be predicted only based on business trends.

Set TPS (or RPS)

  • Online systems:

    • Existing systems: Calculate the total number of transactions over a period of time such as 3 to 10 minutes during peak hours. Divide the total number of transactions by the number of seconds in the specific period to determine the average TPS. To establish the peak TPS, multiply the average TPS by a factor of 2 to 5. For example, if 180,000 orders are processed within 3 minutes during peak hours, the average TPS is 1,000, and the peak TPS can be 2,000 to 5,000.

    • New systems: No historical data is available for reference. We recommend that you consult with the business department for an evaluation.

  • Unlaunched or newly launched systems:

    No historical data is available for reference. The metrics can be predicted only based on business trends.