Performance Stress Test is the process of simulating a large number of concurrent user accesses to a system to test its performance and stability under high load conditions. Stress test can identify performance bottlenecks, evaluate system capacity, and proactively identify performance issues and potential risks, providing reference for capacity planning and performance optimization. The implementation plan mainly includes:
Determine test objectives and load models: First, the test objectives and load models need to be defined, including determining the test scenarios, load types, load volumes, and test duration.
Configure the test environment: To conduct performance testing, a test environment needs to be set up, including hardware equipment, network environment, and testing tools. There are open-source and cloud-based platforms available, such as PTS.
Develop test plan and test scripts: To ensure test repeatability and accuracy, detailed test plans and test scripts need to be developed, including test scenarios, test data, and methods for analyzing test results.
Perform test and data analysis: Execute the test scripts and record the test results, including monitoring and recording metrics such as system response time, throughput, concurrent user numbers, CPU and memory usage. Then analyze and evaluate the test data to determine the system's performance bottlenecks and optimization plans.
Performance optimization and retest: Based on the test results, performance optimization can be conducted, including optimizing hardware equipment, network environment, and applications. Then perform a stress test again to confirm whether the performance has improved.
Performance stress test includes both single-point and end-to-end tests. Through performance tests, potential performance issues can be discovered before the business system goes online, providing a reference for capacity planning and performance optimization. Currently, mainstream performance testing tools include Alibaba Cloud PTS, Apache JMeter, ApacheBench (ab), wrk, etc. The comparison results of these tools are as follows.
Comparison Item | Alibaba Cloud PTS | Apache JMeter | ApacheBench | wrk |
Comparison Item | Alibaba Cloud PTS | Apache JMeter | ApacheBench | wrk | |
Cost | Learning Cost | Low | Medium | Low | Low |
Deployment and maintenance cost | SaaS service, no deployment required | Low cost for single machine deployment, high cost for distributed deployment | Low | Low | |
Free or Paid | Paid | Open-source, free | Open-source, free | Open-source, free | |
Distributed Ability | Support for distributed load generation | Yes | Yes, but high deployment and maintenance cost | No | No |
Load Engine Ability | Single machine performance and stability | Self-developed engine, high | Low | Medium | High |
Support for multiple protocols | Supported | Supported | Not supported | Not supported | |
Load Level | High, up to millions of concurrent users, tens of millions of TPS | Low | Low | Low | |
Test Scenario Construction | Support for client traffic recording | Supported, supports Chrome/iOS/Android recorder | Not supported | Not supported | Not supported |
Support for flow orchestration | Supported, no coding required | Supported | Not supported | Not supported | |
Support for output parameter extraction, assertions, and logical controllers | Supported | Supported | Not supported | Not supported | |
Test Data Construction | Support for file data source | Supported | Supported | Not supported | Not supported |
Support for reading data from DB as test data source | Supported | Not supported, needs self-implementation | Not supported | Not supported | |
Support for generating or processing test data using functions | Supported | Supported | Not supported | Not supported | |
Test Model Construction | Support for concurrency model | Supported | Supported | Supported | Supported |
Support for throughput model | Supported | Not supported | Supported | Supported | |
Support for traffic funnel model | Supported | Not supported | Not supported | Not supported | |
Support for automatic increment, step increment, and other traffic models | Supported | Supported | Not supported | Not supported | |
Test Traffic Construction | Support for customized multi-region traffic | Supported | Not supported, requires self-deployment | Not supported, requires self-deployment | Not supported, requires self-deployment |
Support for IPv6 traffic | Supported | Not supported, requires self-deployment | Not supported, requires self-deployment | Not supported, requires self-deployment | |
Test Traffic Control | Support for manual speed adjustment during testing | Supported | Not supported | Not supported | Not supported |
Support for dynamically expanding maximum pressure and load generation engine during testing | Supported | Not supported | Not supported | Not supported | |
Test Data Visualization | Support for real-time multi-dimensional metric monitoring during testing | Real-time data with second-level granularity, multi-dimensional analysis | Supported, but limited analysis dimensions | Not supported | Not supported |
Support for testing report | Complete testing report | Supported, simple report | Supported, simple report | Supported, simple report | |
Support for associating monitored data of the target system | Supported, can associate with Alibaba Cloud CloudMonitor data | Not supported | Not supported | Not supported | |
Support for performance baseline capability | Supported | Not supported | Not supported | Not supported |