Distributed performance test method and system based on dynamic load prediction
Through dynamic load prediction and intelligent resource scheduling, combined with bidirectional buried point probes and density clustering algorithms, the problems of unreasonable resource scheduling and untimely abnormal detection in traditional distributed performance tests are solved, and efficient performance testing and rapid problem positioning are achieved.
Patent Information
- Application Number
- CN202510941908.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-07-09
- Publication Date
- 2025-08-05
- Estimated Expiration
- 2045-07-09
AI Technical Summary
Traditional distributed performance testing systems cannot dynamically adjust according to the system's real-time load conditions, resulting in low resource utilization, low testing efficiency, and difficulty in digging deep into the internal connection between traffic and resource data, and unable to quickly locate performance bottlenecks.
Using a method based on dynamic load prediction, we periodically collect data from node resource utilization, use dynamic threshold verification algorithm to judge resource status abnormalities, implement priority migration strategies, combine two-way buried point probes and density clustering algorithms to associate traffic with resource data, and display a full-link diagnostic view in real time.
Real-time response to test load changes is achieved, resource scheduling efficiency is improved, performance bottlenecks are automatically identified, stability and interpretability of the test system are improved, and manual inspection costs are reduced.
Smart Images

Figure CN120429217A_ABST
Abstract
Description
Technical Field
[0001] The present invention belongs to the technical field of computer system performance testing, and relates to a distributed performance testing method and system based on dynamic load prediction. Background Art
[0002] With the rapid development of Internet technology, distributed systems have been widely used in various fields. To ensure that distributed systems can run stably and efficiently in complex scenarios such as high concurrency and large data volumes, performance testing has become a crucial step.
[0003] Traditional distributed performance testing systems primarily consist of a master node, a cluster of slave nodes, the system under test (SUT), and a monitoring module. The master node distributes stress tasks to the SUT to slave nodes using a fixed strategy (such as round-robin or preset weights), unaware of the nodes' real-time load. The slave node cluster sends stress requests (such as HTTP / TCP requests) to the SUT according to this fixed distribution rule. The monitoring module independently collects traffic data (such as QPS and response time) from the slave nodes and resource data (such as CPU and memory utilization) from the SUT.
[0004] Traditional distributed performance testing tools often rely on static configurations or empirical values for resource scheduling, failing to dynamically adjust based on real-time system load. This results in low resource utilization and inefficient testing. For example, when faced with a sudden increase in test workload, static resource allocation schemes may not respond promptly, forcing some test tasks to wait for resources for extended periods, severely impacting test progress.
[0005] In terms of data correlation analysis, traditional distributed performance testing tools can typically only independently display stress traffic data or resource data of the tested service. It's difficult to deeply explore the inherent connections between the two, and they can't provide a comprehensive and accurate basis for locating performance bottlenecks. When a system encounters performance issues, developers find it difficult to quickly determine whether excessive traffic has led to resource exhaustion or improper resource configuration has caused performance degradation. When it comes to anomaly diagnosis, most tools lack intelligent diagnostic capabilities, requiring manual analysis of massive amounts of data to identify the root cause of performance issues. This is extremely inefficient in practical applications and prone to omissions.
[0006] Therefore, how to provide a distributed performance testing method and system that can realize intelligent resource scheduling and deep data correlation analysis is a problem that technical personnel in this field urgently need to solve. Summary of the Invention
[0007] In view of this, the present invention proposes a distributed performance testing method and system based on dynamic load prediction. Based on the priority migration strategy of slave node resource utilization, the response speed of distributed performance testing and the efficiency of slave node resource scheduling are greatly improved; to address the problem that traffic and resources cannot be associated, a bidirectional point-of-sale probe is used to align traffic data and resource data at the second level for each business request, providing underlying data support for upstream evaluation and analysis.
[0008] In order to achieve the above object, the present invention adopts the following technical solutions:
[0009] The present invention discloses a distributed performance testing method based on dynamic load prediction. The method comprises the following steps: deploying a master node to assign stress tasks to slave nodes. The stress tasks are business tasks that stress the system under test. The slave nodes are deployed to send stress requests to the test interface of the system under test according to the assigned stress tasks to simulate user behavior or business load.
[0010] S1: Periodically collect resource utilization data of the current slave node as current time point data, and use the current time point data to predict resource utilization data at the next time point;
[0011] S2: Determine whether the resource utilization data at the next time point is abnormal based on a dynamic threshold verification algorithm. If so, initiate a process migration mechanism for the process on the current slave node based on a priority migration strategy.
[0012] S3: Deploy bidirectional tracking probes on the slave node and the system under test, and use the unique business task ID to associate the slave node's pressure request flow data with the resource data of the system under test;
[0013] S4: Use density clustering algorithm to analyze and cluster the associated traffic and resource data, obtain abnormal feature clustering results, and identify abnormal problem patterns based on the clustering results;
[0014] S5: Displays the relationship between the stress request volume, resource indicators, and abnormal problem patterns of each test interface in real time, forming a full-link diagnostic view of stress input and system response.
[0015] Preferably, using the sliding window exponential smoothing method to predict resource utilization data at the next time point using the current time point data includes:
[0016] F t =αY t-1 +(1-α)F t-1
[0017] Where, F t is the predicted value of resource utilization data in period t, Y t-1is the actual value of resource utilization data in period t-1, and α∈(0~1) is the smoothing coefficient.
[0018] Preferably, the step of determining whether the resource utilization data at the next time point is abnormal based on a dynamic threshold verification algorithm includes:
[0019] Continuously collect historical resource data of each slave node through a sliding window;
[0020] The N% percentile value of the resource utilization data of each slave node is independently calculated as the dynamic threshold of the node, where N>50;
[0021] If the resource utilization data predicted at the next time point is greater than the N% percentile value, the priority migration strategy is triggered.
[0022] Preferably, the step of starting a process migration mechanism for the process currently on the slave node based on the priority migration strategy includes:
[0023] Capture the process status information on the current slave node;
[0024] Sort the processes on the slave nodes according to the priority of the process status information, and determine the order of process migration based on the priority;
[0025] Incrementally serialize the current process state data, migrate the process to an idle slave node in batches, and transmit the incremental serialized data packets to a remote server using a zero-copy method. The data packets received by the remote server are used to restore the process state of the slave node.
[0026] After confirming that the remote server has successfully restored the process status, the slave node starts to release local resources.
[0027] Preferably, for HTTP request business tasks, the pressure request traffic data from the node includes one or more of the following: query rate per second QPS, response time; the resource data of the system under test associated with the pressure request traffic data includes one or more of the following: CPU inter-core load, JVM new generation GC frequency, memory fragmentation rate.
[0028] Preferably, the density clustering algorithm includes a DBSCAN density clustering algorithm, which is used to perform the following steps:
[0029] For each pressure request, the pressure request flow data of the associated slave node and the resource data of the measured system are input into the DBSCAN algorithm as multi-dimensional data;
[0030] Perform clustering based on the density relationship between the multidimensional data inputs, identifying data groups with similar behavior patterns as dense regions, and marking data points that do not conform to any dense region as abnormal data features;
[0031] Provide a problem description based on the characteristics of abnormal data;
[0032] The abnormal data features and corresponding problem descriptions are aggregated into JSON, stored in a hash table in memory, and accept random access with O(1) time complexity.
[0033] Preferably, the resource indicator adds a description of the performance indicator value based on the weighted aggregation model of the attention mechanism:
[0034] S agg =∑α i S i
[0035] Where S agg is the performance index value after aggregation, S i is the original performance index value, weight coefficient α i Dynamically adjusted by the current testing phase.
[0036] Preferably, the method further includes the step of normalizing the heterogeneous data obtained from the nodes and the heterogeneous data of the system under test:
[0037] For sampling data of different frequencies, a dynamic time warping algorithm is used to time-align the pressure request flow data of the slave node with the resource data of the measured system.
[0038] Preferably, the relationship between the pressure request volume of each test interface and the resource indicators and abnormal problem patterns is displayed in real time through a dynamic heat map, and query instructions on the relationship between the pressure request volume of the test interface and the resource indicators and abnormal problem patterns within a specified time period and under a specified business task are received and responded to.
[0039] The present invention also provides a distributed performance testing system according to the distributed performance testing method based on dynamic load prediction, comprising: a master node, multiple slave nodes, and a system under test; the master node is used to assign stress tasks to the slave nodes, wherein the stress tasks are stress testing tasks that simulate user behavior or business load; each slave node is used to send a stress request to the test interface of the system under test according to the assigned stress tasks to simulate user behavior or business load; and further comprising:
[0040] A resource monitoring module is used to periodically collect resource utilization data of the current slave node as current time point data and transmit the data to the load prediction module;
[0041] A load prediction module, which predicts resource utilization data at a next time point based on the data at the current time point;
[0042] The process migration control module determines whether the resource utilization data at the next time point is abnormal based on a dynamic threshold verification algorithm. If abnormal, it triggers the priority migration strategy and starts migrating the process on the current slave node;
[0043] The data association module is used to deploy bidirectional tracking probes between the slave node and the system under test, and associate the pressure request flow data of the slave node with the resource data of the system under test through the unique business task ID;
[0044] The abnormal clustering analysis module is used to analyze the associated traffic and resource data using a density clustering algorithm, output abnormal feature clustering results, and identify the corresponding abnormal problem patterns;
[0045] The visual diagnosis module is used to display the relationship between the stress request volume, resource indicators, and abnormal problem patterns of each test interface in real time, and generate a full-link diagnostic view of stress input and system response.
[0046] The above technical solution shows that compared with existing technologies, by introducing modules such as load prediction, resource monitoring, process migration control, data correlation analysis, anomaly clustering, and visual diagnosis, the intelligence level and testing efficiency of performance testing are significantly improved, with the following technical effects:
[0047] This method achieves real-time response to changes in test load by periodically collecting slave node resource utilization data and predicting resource usage at the next point in time. This is combined with a dynamic threshold verification algorithm to determine whether resource status is abnormal. When a resource bottleneck is predicted for a node, a process migration mechanism is promptly initiated, effectively avoiding test interruptions or result distortions caused by local resource overload. This improves the adaptive capabilities of the performance testing system and ensures the stability and robustness of the entire system.
[0048] The present invention deploys bidirectional tracking probes between the slave node and the system under test, and accurately associates the stress request flow data with the resource indicators of the system under test through a unique business task ID, solving the problem of difficulty in matching "stress test flow" with "system response" in traditional performance testing, and providing a high-quality data foundation for subsequent in-depth analysis of system behavior.
[0049] The present invention uses a density clustering algorithm to analyze the associated traffic and resource data, automatically identifying abnormal behavior clusters with similar characteristics, and can effectively discover potential problem patterns hidden in massive performance data, thereby assisting testers to quickly locate performance bottlenecks and reduce manual troubleshooting costs.
[0050] Through the visual diagnostic module, the present invention displays the pressure request amount, resource indicators and identified abnormal problem patterns of each test interface in real time, forming a full-link diagnostic view of "pressure input-system response", helping users to fully understand the system operation status from macro to micro, and improve the interpretability of test results and decision support capabilities.
[0051] In summary, the present invention realizes the automation, intelligence and refinement of the performance testing process by introducing key technical means such as dynamic load prediction, intelligent resource scheduling, deep data analysis and visual diagnosis, and solves the problems existing in the existing technology such as unreasonable resource scheduling, untimely anomaly detection, inaccurate data association, etc., and has significant technological progress and application value. BRIEF DESCRIPTION OF THE DRAWINGS
[0052] In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the following briefly introduces the drawings required for use in the embodiments or the description of the prior art. Obviously, the drawings described below are only embodiments of the present invention. Those skilled in the art can also derive other drawings based on the provided drawings without inventive effort.
[0053] Figure 1 A flow chart of a distributed performance testing method based on dynamic load prediction provided by an embodiment of the present invention;
[0054] Figure 2 A flow chart of the priority migration strategy provided by an embodiment of the present invention;
[0055] Figure 3 A flowchart of a slave node process migration mechanism provided by an embodiment of the present invention;
[0056] Figure 4 This is a flow chart of the density clustering algorithm analysis provided by an embodiment of the present invention. DETAILED DESCRIPTION
[0057] The following will clearly and completely describe the technical solutions in the embodiments of the present invention in conjunction with the accompanying drawings. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without making creative efforts are within the scope of protection of the present invention.
[0058] The first aspect of the embodiment of the present invention provides a distributed performance testing method based on dynamic load prediction. First, the collaborative relationship between the master node, the slave node cluster and the system under test is described:
[0059] The master node is the core control node responsible for managing and allocating test tasks. It can be a standalone server or high-performance computer. Its primary responsibility is to allocate stress tasks to slave nodes using dynamic load forecasting and monitor the status of the entire test process. The master node requires strong computing power and network communication capabilities to process and analyze data from slave nodes in real time and make appropriate scheduling decisions.
[0060] Slave nodes are the worker nodes that perform the actual stress testing. They can be multiple standard servers, virtual machines, or container instances. Following instructions from the master node, slave nodes send requests (such as HTTP / TCP requests) to the system under test, simulating user behavior or business load to stress test the system under test. The number of slave nodes can be flexibly increased or decreased based on testing requirements to accommodate varying test scales.
[0061] System under test: This is the target system being evaluated. In the previous example, the server under test receives requests from the stress node and processes them to complete the corresponding business logic.
[0062] The embodiment of the present invention includes the following steps:
[0063] S1: Periodically collect resource utilization data of the current slave node as the current time point data, and use the current time point data to predict the resource utilization data at the next time point;
[0064] S2: Determine whether the resource utilization data at the next time point is abnormal based on a dynamic threshold verification algorithm. If so, initiate a process migration mechanism for the process on the current slave node based on the priority migration strategy.
[0065] S3: Deploy bidirectional tracking probes on the slave node and the system under test, and use the unique business task ID to associate the slave node's pressure request flow data with the resource data of the system under test;
[0066] S4: Use density clustering algorithm to analyze and cluster the associated traffic and resource data, obtain abnormal feature clustering results, and identify abnormal problem patterns based on the clustering results;
[0067] S5: Displays the relationship between the stress request volume, resource indicators, and abnormal problem patterns of each test interface in real time, forming a full-link diagnostic view of stress input and system response.
[0068] In one embodiment, using the sliding window exponential smoothing method to predict resource utilization data at the next time point using data at the current time point includes:
[0069] F t =αY t-1 +(1-α)Ft-1
[0070] Where, F t is the predicted value of resource utilization data in period t, Y t-1 is the actual value of resource utilization data in period t-1, and α∈(0~1) is the smoothing coefficient.
[0071] In this example, resource data from each slave node in the distributed system is continuously collected at a 5-second interval, including but not limited to CPU usage, memory occupancy, and network bandwidth utilization. The collected data is processed using exponential smoothing, with the smoothing coefficient α determined to be 0.6 through extensive experimentation. Practical testing has shown that this prediction method has an error rate of ≤5%, demonstrating its ability to accurately predict resource change trends.
[0072] In one embodiment, the step of determining whether resource utilization data at a next time point is abnormal based on a dynamic threshold verification algorithm includes:
[0073] Continuously collect historical resource data of each slave node through a sliding window;
[0074] The N% percentile value of the resource utilization data of each slave node is independently calculated as the dynamic threshold of the node, where N>50;
[0075] If the resource utilization data predicted at the next time point is greater than the N% percentile, the priority migration strategy is triggered.
[0076] In this example, the 90th percentile is used as the threshold. This threshold is determined by finding the value from historical data that results in 90% of the data being below it. This dynamic threshold setting method better adapts to the resource characteristics and service load variations of different nodes, effectively avoiding the problem of static thresholds being insufficiently adaptable in complex scenarios.
[0077] Using a 5-second sliding window, we collect real-time metrics such as slave node CPU load, memory saturation, and task queue length. Combined with dynamic thresholds (e.g., high-stress thresholds: CPU ≥ 75%, memory ≥ 60%, and queues ≥ 80), we can determine node stress status within seconds (latency < 100ms). Compared to the 500ms prediction cycle of the LSTM model, this improves response speed by 80%, making it particularly suitable for simulating burst traffic scenarios (such as peak template usage during holidays).
[0078] In one embodiment, the steps of initiating a process migration mechanism for a process currently on a slave node based on a priority migration policy include:
[0079] Capture the process status information on the current slave node;
[0080] Sort the processes on the slave nodes according to the priority of the process status information, and determine the order of process migration based on the priority;
[0081] The current process state data is incrementally serialized and migrated to an idle slave node in batches. The incrementally serialized data packets are then transmitted to the remote server using a zero-copy method. The data packets received by the remote server are used to restore the process state of the slave node.
[0082] After confirming that the remote server has successfully restored the process status, the slave node starts to release local resources.
[0083] In this embodiment, only a small number of processes are migrated in each batch to ensure system stability during the migration process. After optimization, the system can complete the process redistribution between nodes within 100ms, greatly improving the system's response speed and resource scheduling efficiency.
[0084] The dynamic priority strategy (levels 1-5) automatically adjusts the amount of task allocation based on the stress level (reducing tasks by 20% on high-stress nodes and increasing tasks by 20% on low-stress nodes). Combined with the hot task priority migration mechanism (prioritizing tasks taking > 500ms), the standard deviation of slave node resource utilization has been reduced from 25% in the static allocation to 18%, the average CPU idle rate has been reduced from 32% to 22%, and the average memory idle rate has been reduced from 35% to 28%, resulting in an overall improvement in hardware resource utilization by approximately 15%.
[0085] When a node experiences high stress, the system automatically migrates 30% of its tasks to healthy, lower-priority nodes (with a migration time of <500ms) and records the migration log (e.g., task ID, source node, and destination node). In a simulated 100-node cluster, the drop in system throughput when a single node fails was reduced from 30% with static allocation to 12%, and test outage duration was shortened from 30 minutes with manual processing to less than 2 minutes with automatic recovery.
[0086] The pure algorithm logic of this embodiment does not rely on historical model data. After the master node restarts, it can re-collect data through the sliding window and quickly restore the load distribution strategy, avoiding test delays caused by model initialization. It is suitable for CI / CD pipeline scenarios that require frequent start and stop.
[0087] Dynamic thresholds and priority rules can be viewed and adjusted in real time through a visual interface (for example, changing the memory threshold for high-stress conditions to 70%). Testers can understand the load distribution logic without machine learning knowledge, lowering the technical threshold.
[0088] It supports manually locking node priority in emergency situations (such as forcing a node to have a priority of level 5 to undertake critical tasks), or suspending the automatic migration function to meet the manual control needs of special test scenarios.
[0089] In one embodiment, for HTTP request business tasks, the unique business task ID in the HTTP protocol header is used to collect stress request traffic data from the node, including one or more of the following: QPS and response time. Resource data of the system under test associated with this stress request traffic data includes one or more of the following: CPU inter-core load, JVM new generation GC frequency, and memory fragmentation rate. This approach enables nanoscale time alignment with a correlation accuracy of 99.2%, ensuring precise temporal matching of traffic and resource data.
[0090] In one embodiment, when collecting traffic and resource data, the bidirectional tracking probe not only collects basic performance indicators, but also collects network-related data such as handshake latency and packet retransmission rate at the network protocol layer, as well as underlying system data such as the number of process context switches and disk I / O queue length at the operating system layer. This supplementary data provides a richer dimension for performance analysis. For example, when analyzing issues with long response times, combining network data with underlying system data can more accurately distinguish whether performance degradation is caused by network transmission issues or internal resource competition within the system.
[0091] In one embodiment, the density clustering algorithm includes a DBSCAN density clustering algorithm, which is configured to perform the following steps:
[0092] For each pressure request, the pressure request flow data of the associated slave node and the resource data of the measured system are input into the DBSCAN algorithm as multi-dimensional data;
[0093] Clustering is performed based on the density relationship between multidimensional data inputs, identifying data groups with similar behavior patterns as dense areas, and marking data points that do not conform to any dense area as abnormal data features;
[0094] Provide a problem description based on the characteristics of abnormal data;
[0095] The abnormal data features and corresponding problem descriptions are aggregated into JSON, stored in a hash table in memory, and accept random access with O(1) time complexity.
[0096] It's important to note that the core concept of the DBSCAN algorithm is based on data point density. If the density of data points in a region exceeds a certain threshold, these points are grouped into a cluster. This approach improves efficiency by 60% compared to manual analysis, significantly improving the speed and accuracy of anomaly diagnosis. It also provides preliminary problem descriptions based on data characteristics, such as "memory leak" and "connection pool exhaustion - CPU glitch," to assist in subsequent data analysis of performance issues.
[0097] In this embodiment, the DBSCAN density clustering algorithm, when applied to identify anomaly characteristics in performance data, introduces a dynamic parameter adjustment mechanism. The system automatically adjusts the neighborhood radius ε and the minimum number of samples within the neighborhood, MinPts, based on the data distribution characteristics at different test stages. During the test initialization phase, due to the small amount of data and relatively dispersed distribution, the ε value is appropriately increased and the MinPts value is appropriately decreased to ensure that potential anomaly patterns are captured early. During the peak stress phase, when the data volume increases significantly and fluctuates dramatically, the ε value is dynamically decreased and the MinPts value is increased to improve clustering accuracy and avoid misjudgments.
[0098] In one implementation, the OPTICS density clustering algorithm can be used to automatically determine the cluster density threshold, making it suitable for heterogeneous systems with uneven data distribution (such as hybrid cloud architectures). Clustering accuracy is increased to 92%, but memory usage increases by 25%, making it suitable for financial-grade testing scenarios with high precision requirements.
[0099] In one embodiment, resource metrics are added with a description of performance metric values based on a weighted aggregation model of an attention mechanism:
[0100] S agg =∑α i S i
[0101] Where S agg is the aggregated performance indicator value, such as CPU, memory, bandwidth usage, JVM usage, GC frequency, request response time, throughput, etc. i is the original performance index value, weight coefficient α i Dynamically adjusted by the current testing phase.
[0102] In the specific implementation of this embodiment, in the initialization phase, since the system mainly performs operations such as resource preparation and environment construction, and network connection establishment, the weight α of network-related indicators (such as network delay and bandwidth utilization) is network It can be increased appropriately; during the peak stress phase, the CPU and memory loads become key factors, so the weights of indicators such as the number of CPU context switches and memory throughput are CPU , α memory Automatic improvement; in the load unloading phase, system resources are gradually released, and the weight of indicators such as resource release speed is α release Increase. Through this dynamic weighted aggregation, the composite index of the current service is calculated. The output of the weighted aggregation model mainly includes:
[0103] 1. Comprehensive performance score of system health status.
[0104] 2.2. A phased sensitive data indicator set consists of 3-5 core indicators with high weights in the current phase (such as CPU load and memory throughput during peak phase). This can highlight key performance indicators in different test phases (load testing, peak testing), providing users with more targeted performance data presentation.
[0105] Based on the aggregated data, the system provides a variety of visualization methods, such as line charts, bar charts, and pie charts. Users can select different chart types to display performance data according to their needs. Furthermore, the visualization interface is regularly updated to dynamically reflect changes in system performance, helping users to keep abreast of performance trends during testing.
[0106] In this embodiment, the weighted aggregation model based on the attention mechanism further introduces a context-aware module. This module dynamically adjusts the weight coefficient α based on context data such as test scenario description and business process information. i For example, when conducting payment service performance testing, the context-aware module will identify that performance indicators related to the payment interface (such as payment success rate and transaction processing time) are more important to the business, thereby significantly increasing the weight of these indicators during peak periods, allowing testers to focus more on key business performance.
[0107] In one embodiment, the method further includes the step of normalizing the heterogeneous data obtained from the nodes and the heterogeneous data of the system under test:
[0108] A dynamic time warping algorithm is used to time-align the pressure request flow data from the node with the resource data of the system under test for sampling data of different frequencies. This embodiment addresses the problem of the inability to associate flow and resources. By using a bidirectional tracking probe to generate a unique business task ID for each request, flow data and resource data are time-aligned at the second level, providing underlying data support for upstream evaluation and analysis.
[0109] In this embodiment, the system supports access to over 10 data sources, including Prometheus, JMX, and APM. Custom plug-ins are developed to standardize data formats for different data sources. For sampling data of different frequencies, such as 10ms-level traffic data and 1s-level JVM data, the Dynamic Time Warping (DTW) algorithm is used for time alignment. The basic principle of the DTW algorithm is to use dynamic programming to find the optimal matching path between two time series, minimizing their distance on the time axis, thereby effectively aligning data of different frequencies.
[0110] In one embodiment, a dynamic heat map displays in real time the correlation between the volume of interface requests and metrics such as JVM thread stack depth and CPU cache hit rate. Users can query the relationship between interface requests and resource metrics within a specific time period and business module, thereby forming a full-link diagnostic view of "stress input-system response", providing an intuitive and comprehensive basis for locating performance issues.
[0111] In this embodiment, 3D virtual reality (VR) visualization can replace 2D heat maps. By wearing a VR device, users can immersively view full-link performance data, which is suitable for global analysis of large distributed systems. This further enhances the ability to express spatial information and enhances user immersion, but requires additional hardware support and is relatively costly.
[0112] A second aspect of an embodiment of the present invention discloses a distributed performance testing system based on a distributed performance testing method based on dynamic load prediction according to the first aspect of the embodiment, comprising: a master node, multiple slave nodes, and a system under test; the master node is configured to assign a stress task to the slave node, where the stress task is a stress testing task that simulates user behavior or business load; each slave node is configured to send a stress request to a test interface of the system under test according to the assigned stress task to simulate user behavior or business load; and further comprising:
[0113] The resource monitoring module is used to periodically collect resource utilization data of the current slave node as current time point data and transmit the data to the load prediction module;
[0114] The load prediction module predicts resource utilization data at the next time point based on the data at the current time point;
[0115] The process migration control module uses a dynamic threshold verification algorithm to determine whether the resource utilization data at the next time point is abnormal. If abnormal, it triggers the priority migration strategy and starts migrating the process on the current slave node.
[0116] The data association module is used to deploy bidirectional tracking probes between the slave node and the system under test, and associate the pressure request flow data of the slave node with the resource data of the system under test through the unique business task ID;
[0117] The abnormal clustering analysis module is used to analyze the associated traffic and resource data using a density clustering algorithm, output abnormal feature clustering results, and identify the corresponding abnormal problem patterns;
[0118] The visual diagnosis module is used to display the relationship between the stress request volume, resource indicators, and abnormal problem patterns of each test interface in real time, and generate a full-link diagnostic view of stress input and system response.
[0119] The second aspect of the embodiment of the present invention is used to execute all the steps of the first aspect of the embodiment.
[0120] The above is a detailed introduction to the distributed performance testing method and system based on dynamic load prediction provided by the present invention. In this embodiment, specific examples are used to illustrate the principles and implementation methods of the present invention. The description of the above embodiments is only used to help understand the method of the present invention and its core ideas; at the same time, for general technical personnel in this field, based on the ideas of the present invention, there will be changes in the specific implementation methods and application scope. In summary, the content of this specification should not be understood as a limitation on the present invention.
[0121] The above description of the disclosed embodiments is intended to enable one skilled in the art to implement or use the present invention. Various modifications to these embodiments will be readily apparent to those skilled in the art, and the general principles defined in this embodiment may be implemented in other embodiments without departing from the spirit or scope of the present invention. Therefore, the present invention is not limited to the embodiments shown in this embodiment, but is intended to conform to the widest scope consistent with the principles and novel features disclosed in this embodiment.
Claims
1. A distributed performance testing method based on dynamic load prediction, characterized in that: The deployment master node assigns a stress task to the slave node, wherein the stress task is a business task that stresses the system under test. The deployment slave node sends a stress request to the test interface of the system under test according to the assigned stress task to simulate user behavior or business load. The steps include: S1: Periodically collect resource utilization data of the current slave node as current time point data, and use the current time point data to predict resource utilization data at the next time point; S2: Determine whether the resource utilization data at the next time point is abnormal based on a dynamic threshold verification algorithm. If so, initiate a process migration mechanism for the process on the current slave node based on a priority migration strategy. S3: Deploy bidirectional tracking probes on the slave node and the system under test, and use the unique business task ID to associate the slave node's pressure request flow data with the resource data of the system under test; S4: Use density clustering algorithm to analyze and cluster the associated traffic and resource data, obtain abnormal feature clustering results, and identify abnormal problem patterns based on the clustering results; S5: Displays the relationship between the stress request volume, resource indicators, and abnormal problem patterns of each test interface in real time, forming a full-link diagnostic view of stress input and system response.
2. A distributed performance testing method based on dynamic load prediction according to claim 1, characterized in that: Using the sliding window exponential smoothing method to predict resource utilization data at the next time point using the current time point data includes: F t =αY t-1 +(1-α)F t-1 Where, F t is the predicted value of resource utilization data in period t, Y t-1 is the actual value of resource utilization data in period t-1, and α∈(0~1) is the smoothing coefficient.
3. A distributed performance testing method based on dynamic load prediction according to claim 1, characterized in that: The step of determining whether the resource utilization data at the next time point is abnormal based on the dynamic threshold verification algorithm includes: Continuously collect historical resource data of each slave node through a sliding window; The N% percentile value of the resource utilization data of each slave node is independently calculated as the dynamic threshold of the node, where N>50; If the resource utilization data predicted at the next time point is greater than the N% percentile value, the priority migration strategy is triggered.
4. A distributed performance testing method based on dynamic load prediction according to claim 1, characterized in that: The steps of starting the process migration mechanism for the process on the current slave node based on the priority migration strategy include: Capture the process status information on the current slave node; Sort the processes on the slave nodes according to the priority of the process status information, and determine the order of process migration based on the priority; Incrementally serialize the current process state data, migrate the process to an idle slave node in batches, and transmit the incremental serialized data packets to a remote server using a zero-copy method. The data packets received by the remote server are used to restore the process state of the slave node. After confirming that the remote server has successfully restored the process status, the slave node starts to release local resources.
5. A distributed performance testing method based on dynamic load prediction according to claim 1, characterized in that: For HTTP request business tasks, the pressure request traffic data from the node includes one or more of the following: query rate per second QPS, response time; the resource data of the system under test associated with the pressure request traffic data includes one or more of the following: CPU inter-core load, JVM new generation GC frequency, and memory fragmentation rate.
6. A distributed performance testing method based on dynamic load prediction according to claim 1, characterized in that: The density clustering algorithm includes the DBSCAN density clustering algorithm, which is used to perform the following steps: For each pressure request, the pressure request flow data of the associated slave node and the resource data of the measured system are input into the DBSCAN algorithm as multi-dimensional data; Perform clustering based on the density relationship between the multidimensional data inputs, identifying data groups with similar behavior patterns as dense regions, and marking data points that do not conform to any dense region as abnormal data features; Provide a problem description based on the characteristics of abnormal data; The abnormal data features and corresponding problem descriptions are aggregated into JSON, stored in a hash table in memory, and accept random access with O(1) time complexity.
7. A distributed performance testing method based on dynamic load prediction according to claim 1, characterized in that: The resource indicators are based on the weighted aggregation model of the attention mechanism to add a description of the performance indicator value: S agg =∑α i S i Where S agg is the performance index value after aggregation, S i is the original performance index value, weight coefficient α i Dynamically adjusted by the current testing phase.
8. A distributed performance testing method based on dynamic load prediction according to claim 1, characterized in that: It also includes the steps of normalizing the heterogeneous data obtained from the nodes and the heterogeneous data of the system under test: For sampling data of different frequencies, a dynamic time warping algorithm is used to time-align the pressure request flow data of the slave node with the resource data of the measured system.
9. A distributed performance testing method based on dynamic load prediction according to claim 1, characterized in that: The dynamic heat map displays the relationship between the pressure request volume of each test interface, resource indicators, and abnormal problem patterns in real time, and receives and responds to query instructions on the relationship between the pressure request volume of the test interface, resource indicators, and abnormal problem patterns within a specified time period and under a specified business task.
10. A distributed performance testing system according to any one of claims 1 to 9, comprising: Master node, multiple slave nodes and the system under test; The master node is used to assign a stress task to the slave node, where the stress task is a stress test task that simulates user behavior or business load; Each slave node is used to send stress requests to the test interface of the system under test according to the assigned stress task to simulate user behavior or business load; it also includes: A resource monitoring module is used to periodically collect resource utilization data of the current slave node as current time point data and transmit the data to the load prediction module; A load prediction module, which predicts resource utilization data at a next time point based on the data at the current time point; The process migration control module determines whether the resource utilization data at the next time point is abnormal based on a dynamic threshold verification algorithm. If abnormal, it triggers the priority migration strategy and starts migrating the process on the current slave node; The data association module is used to deploy bidirectional tracking probes between the slave node and the system under test, and associate the pressure request flow data of the slave node with the resource data of the system under test through the unique business task ID; The abnormal clustering analysis module is used to analyze the associated traffic and resource data using a density clustering algorithm, output abnormal feature clustering results, and identify the corresponding abnormal problem patterns; The visual diagnosis module is used to display the relationship between the stress request volume, resource indicators, and abnormal problem patterns of each test interface in real time, and generate a full-link diagnostic view of stress input and system response.
Citation Information
Patent Citations
Full-link performance test method and system
CN113965502A
Cloud computing analysis method, device and equipment of SaaS (Software as Service) system and storage medium
CN119201620A
HBase client main and standby switching method and system based on fault perception
CN119537484A
Real-time hierarchical distribution method for power cloud resources of digital power grid
CN119603304A
Determining problem dependencies in application dependency discovery, reporting, and management tool
WO2020264319A1
Cited By
Distributed pressure test monitoring system and method based on data analysis
CN121771077A