Performance Testing (PTS) bills every stress testing task by Virtual User Minute (VUM). This topic explains how VUM consumption is calculated and why the VUM that PTS bills can differ from the value that the formula returns. It also covers the free quota, the available billing methods, how to activate PTS, and how to keep stress testing costs under control.
Billing items
Billing unit
VUM is the billing unit that PTS uses to measure the resources a stress testing task consumes. One VUM represents one virtual user running for one minute, and the total VUM consumed determines the charge for the task.
How VUM is calculated
The following formula returns the theoretical VUM consumption of a stress testing task:
VUM = IP addresses used x 500 x Stress testing duration (minutes) x (1 + Log sampling rate)The following table describes each variable in the formula. The last term is a factor whose value is determined by the log sampling rate, and the default sampling rate of 1% corresponds to a factor of 1.
| Variable | Description | Example |
| IP addresses used | The number of IP addresses allocated to the stress testing task. The value depends on whether the IP extension feature is enabled. See IP address calculation below. | 3 IP addresses |
| 500 | Fixed multiplier. Each IP address provides 500 concurrent users, regardless of the concurrency that you configure for the stress testing task. | Always 500 |
| Stress testing duration | The stress testing duration that you configure for the task, in minutes. A duration shorter than one minute is converted proportionally. | A total duration of 5 minutes 40 seconds counts as 5.67 billable minutes, because the extra 40 seconds converts to 0.67 minutes. |
| Log sampling rate | The sampling rate for stress testing logs, which determines the value of the factor in the formula. The default rate is 1%. Only rates above 1% generate additional VUM. | 1% (default): factor is 1. 20%: factor is 1.2. 100% (maximum): factor is 2. |
The formula returns a theoretical value that is based on the stress testing duration you configure. PTS bills the duration that the stress testing engine reports as sampled, which is not always the same duration. For details, see Actual versus calculated VUM consumption.
IP address calculation
The number of IP addresses used depends on whether the IP extension feature is enabled.
Without IP extension:
| Mode | Formula | Example |
| Concurrent mode | Maximum concurrent users / 500, rounded up | 1,200 concurrent users: 1200 / 500 = 2.4, rounded up to 3 IP addresses |
| Requests per second (RPS) mode | Maximum RPS / 4000, rounded up | 10,000 RPS: 10000 / 4000 = 2.5, rounded up to 3 IP addresses |
With IP extension: The number of IP addresses used equals the number that you specify. For example, if you specify 5 IP addresses, the value is 5.
Calculation example
A stress testing task with the following configuration:
500 concurrent users (1 IP address)
A stress testing duration of 20 minutes
The default log sampling rate (1%)
consumes 1 x 500 x 20 x 1 = 10,000 VUM.
The unit price per VUM is listed in Pay-as-you-go.
Actual versus calculated VUM consumption
PTS bills only the minutes that the stress testing engine actually reports as sampled. The VUM billed for a stress testing scenario is therefore not always identical to the theoretical value that the formula returns.
The stress testing duration shown in the PTS console covers engine startup, script execution, teardown, and stop detection, so the sampled duration differs from the duration you configure. Actual VUM consumption can therefore be either higher or lower than the calculated value, in both concurrent mode and RPS mode. Because the sampled duration varies between runs, the same stress testing scenario does not consume exactly the same VUM each time.
This applies to the free quota and to pay-as-you-go charges alike: both deduct the VUM that the engine reports for each stress testing task.
Free quota
Starting May 11, 2023, first-time PTS activations include a one-time free quota of 5,000 VUM.
Validity — The free quota expires 30 days after activation, and any unused VUM is forfeited.
Deduction order — VUM consumption is deducted from the free quota first. After the quota is exhausted, the pay-as-you-go billing method applies.
Concurrency limit — The free quota supports up to 1,000 concurrent users. A stress testing task that exceeds 1,000 concurrent users is charged according to the billing rules.
Billing method
Pay-as-you-go
PTS uses pay-as-you-go as the default billing method and charges you for the VUM that each stress testing task consumes. For details about this billing method, see Pay-as-you-go.
Scenarios — Short-term, infrequent, or burst testing requirements.
How it works — After each stress testing task ends, PTS calculates the VUM consumed and deducts the fee from your account balance.
Pricing — Consumption is settled in real time.
Get started
Activate PTS — Log on to your Alibaba Cloud account and go to the PTS activation page, read the PTS Terms of Service, and then click Buy Now.
Run a stress test — After activation, open the PTS console and follow Start a stress test within one minute to create your first stress testing scenario.
Pay-as-you-go billing takes effect as soon as you activate PTS. For details about how PTS settles the VUM that each stress testing task consumes, see Billing method.
Reduce costs
Estimate VUM in advance. Plan the scale of each stress testing task, including the concurrency, the stress testing duration, and the log sampling rate, to avoid wasted resources. An estimate is a theoretical value, so leave room for deviation, as explained in Actual versus calculated VUM consumption.
Simplify stress testing scenarios. Remove redundant traces and reduce script complexity.
Monitor in real time. Track bandwidth usage in the PTS console while a stress testing task runs, and adjust the number of IP addresses accordingly.
Stop tasks promptly. Stop each stress testing task manually or automatically when it ends, so that you are not billed for idle time.