Performance testing guide

更新时间:
复制 MD 格式

This topic provides guidance on performance testing for MSE service administration.

Prerequisites

Note

This topic uses an ACK managed cluster as an example. You can also use an ECS instance for the test.

Background information

The performance of the MSE service administration agent depends on the application traffic, the number of application interfaces, and the administration features that you use. To ensure that the test results reflect actual usage, the test must meet the following conditions:

  • The stress test includes two scenarios with 250 QPS and 500 QPS per instance to reflect performance under different payloads.

  • The application contains 50 web service interfaces and 30 RPC service interfaces.

  • You need to enable the end-to-end canary release and traffic protection features.

The performance test focuses on the following metrics: CPU overhead, memory overhead, and response time (RT) overhead.

Note

The memory overhead is a less indicative metric because the extra memory from the AliyunJavaAgent is mostly garbage-collectible. You can reduce this overhead by adjusting the Garbage Collection (GC) configuration. Therefore, CPU overhead is a more valuable metric.

Test environment

  • Use a stress testing tool such as Alibaba Cloud Performance Testing (PTS) or JMeter.

  • The Java application pod has a specification of 2 cores and 4 GiB of memory, with two replicas.

Test application

The test application architecture is shown below. For more information, see the Demo code repository.

Stress testing

For a pod with 2 cores and 4 GiB of memory, the test payload is 250 QPS or 500 QPS per pod, which corresponds to 500 QPS or 1000 QPS for the cluster.

Test procedure

  1. Establish a baseline without attaching the MSE Java agent. Run three 20-minute stress tests at 500 QPS or 1000 QPS. Before each test, warm up the Java application for 3 minutes with a traffic of 100 QPS. The average of the three test results is used as the baseline for performance metrics.

  2. Attach the MSE Java agent and configure the service administration rules for the application. Then, compare the differences in CPU overhead, memory overhead, and average response time (RT) after the application becomes stable.

    • Set up an end-to-end canary release lane with a 50% traffic ratio.

    • For each interface, set a rate limit with a threshold of 10,000 QPS. This threshold is high enough that it will not be triggered, and therefore will not affect the performance test.