A computing power server system layer optimization method and system for high-load scenarios
By constructing a three-layer causal directed acyclic graph and collecting microscopic performance indicators for causal analysis, the problem of accurately locating performance bottlenecks and blind optimization in existing technologies is solved, and efficient and transparent system-level optimization is achieved.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- BEIJING AEROSPACE STAR BRIDGE TECH CO LTD
- Filing Date
- 2025-10-28
- Publication Date
- 2026-06-09
AI Technical Summary
Existing technologies struggle to accurately pinpoint the root causes of performance bottlenecks and blindly explore parameter spaces under high-load scenarios, resulting in low optimization efficiency and a lack of transparency and credibility.
By constructing a three-layer causal directed acyclic graph based on Granger causality test, collecting micro-performance indicators, conducting causal relationship analysis, locating bottleneck nodes, and performing backtracking and parameter space pruning, interpretable optimization decisions are generated.
It enables accurate identification of the causal source of performance bottlenecks in high-load scenarios, improving optimization efficiency and transparency, and enhancing the credibility of optimization results.
Smart Images

Figure CN121387548B_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of data processing technology, and in particular to a method and system for optimizing computing server systems for high-load scenarios. Background Technology
[0002] With the rapid development of applications such as cloud computing, big data, and artificial intelligence, the load pressure faced by computing servers continues to rise. High-load scenarios such as high-concurrency access, large-scale data processing, and intensive computing tasks pose severe challenges to the performance of the server system layer. Existing technologies typically use manual adjustment of Linux kernel parameters for system-level optimization. Operation and maintenance personnel adjust kernel parameter configurations such as vm.swappiness, vm.dirty_ratio, and net.core.netdev_max_backlog based on monitoring data and experience, or switch I / O scheduler types and adjust NUMA node affinity. These optimization methods can alleviate performance bottlenecks to some extent, but they rely on the operation and maintenance personnel's in-depth understanding of the underlying system mechanisms and long-term accumulated experience. Some technical solutions use automated scripts to periodically collect macro performance indicators such as CPU utilization, memory usage, and disk I / O. When a certain indicator exceeds a preset threshold, parameter adjustment actions are triggered. For example, when CPU utilization is consistently above 80%, the process scheduling granularity is reduced; when memory utilization exceeds 90%, the swap partition usage tendency is increased. This type of solution achieves partial automated optimization through threshold triggering mechanisms.
[0003] Existing system-level optimization methods have several shortcomings. First, manual adjustment relies heavily on the expertise of operations and maintenance personnel, making it difficult to fully grasp complex system parameter combinations and their interrelationships. This can easily lead to situations where adjusting a single parameter triggers other performance issues. Second, threshold-triggered automated solutions only focus on changes in the value of a single performance indicator and cannot identify the causal relationships between different performance indicators. For example, increased CPU utilization may be caused by insufficient memory bandwidth leading to a large number of waiting memory accesses rather than computationally intensive operations. In this case, adjusting only CPU-related parameters cannot solve the fundamental problem. Third, existing optimization methods typically employ static configurations or simple rule-triggered mechanisms, lacking the ability to dynamically adapt to the system's operating state. When business load patterns change, the original parameter configurations may become invalid or even have a negative impact. Furthermore, existing solutions often blindly explore the entire parameter space when adjusting parameters without considering the causal relationship between parameters and performance bottlenecks, resulting in low optimization efficiency and difficulty in converging to the optimal configuration.
[0004] Further analysis based on the shortcomings of existing technologies reveals that the core challenge of system-level optimization lies in accurately identifying the root cause of performance bottlenecks and locating relevant adjustable parameters. Existing technologies collect macroscopic performance indicators such as CPU utilization and memory usage, which only reflect the surface of resource usage and cannot reveal the deeper system behaviors leading to performance bottlenecks. For example, high CPU utilization may stem from frequent context switching, cache misses, branch prediction failures, and other micro-factors. Without collecting these micro-indicators, it is difficult to determine the true bottleneck. Furthermore, existing technologies lack quantitative analysis of the causal relationships between performance indicators, failing to distinguish which indicator changes are the cause and which are the result of performance degradation. This leads to parameter adjustments potentially targeting result indicators rather than cause indicators. Even if a performance bottleneck is identified, existing technologies do not establish a causal mapping between bottleneck indicators and adjustable parameters during parameter adjustments. They can only search the entire parameter space for the optimal configuration through traversal or heuristic search. This blind search method is extremely inefficient in high-dimensional parameter spaces, and the parameter optimization results of existing technologies lack interpretability. Operations personnel cannot understand why adjusting a certain parameter improves performance, which limits the credibility and maintainability of optimization solutions in production environments. Summary of the Invention
[0005] This application provides a system and method for optimizing computing server systems under high load scenarios. It constructs a three-layer causal directed acyclic graph based on Granger causality test to establish a complete causal chain from kernel parameters to micro-performance indicators and then to macro-business indicators. Based on the causal graph, it performs backtracking of bottleneck nodes and parameter space pruning, which solves the problems of existing technologies being unable to accurately locate the root cause of performance bottlenecks and the low optimization efficiency caused by blindly exploring the parameter space. At the same time, by generating interpretable optimization decisions with causal paths and contribution metrics, it solves the problem of lack of transparency and credibility of optimization results in existing technologies.
[0006] Firstly, this application provides a system-level optimization method for computing power servers in high-load scenarios, the method comprising:
[0007] Step S1: Collect the CPU instruction cycle count, cache hit rate, page table miss count, memory access latency, and block device queue depth of the computing server to obtain the system performance dataset;
[0008] Step S2: Perform causal relationship analysis on the system performance dataset using the Granger causality test algorithm to obtain the causal adjacency matrix, and construct a three-layer causal directed acyclic graph based on the causal adjacency matrix;
[0009] Step S3: Locate the bottleneck node whose anomaly exceeds the threshold in the three-layer causal directed acyclic graph, and backtrack from the bottleneck node to the parameter configuration layer to obtain the effective adjustment set;
[0010] Step S4: Set the parameter dimensions that are not in the effective adjustment set to zero to obtain a reduced action space. Iteratively perform parameter adjustments within the reduced action space to obtain the target parameter configuration vector.
[0011] Step S5: Perform a forward traversal through the three-layer causal directed acyclic graph from the adjustment parameters of the target parameter configuration vector to obtain the causal path sequence, and calculate the causal contribution by multiplying the causal edge weights and parameter adjustment magnitudes in the causal path sequence.
[0012] Secondly, this application provides a computing server system layer optimization system for high-load scenarios, the computing server system layer optimization system for high-load scenarios comprising:
[0013] The data acquisition module is used to collect data on the CPU instruction cycle count, cache hit rate, page table miss count, memory access latency, and block device queue depth of the computing server to obtain a system performance dataset.
[0014] The analysis module is used to perform causal relationship analysis on the system performance dataset using the Granger causality test algorithm to obtain a causal adjacency matrix, and to construct a three-layer causal directed acyclic graph based on the causal adjacency matrix;
[0015] The backtracking module is used to locate bottleneck nodes whose anomalies exceed a threshold in the three-layer causal directed acyclic graph, and backtrack from the bottleneck node to the parameter configuration layer to obtain an effective set of adjustments.
[0016] The adjustment module is used to set the dimension of parameters that are not in the effective adjustment set to zero to reduce the action space, and iteratively perform parameter adjustment within the reduced action space to obtain the target parameter configuration vector;
[0017] The traversal module is used to perform a forward traversal of the adjustment parameters of the target parameter configuration vector through the three-layer causal directed acyclic graph to obtain the causal path sequence, and calculate the causal contribution by multiplying the causal edge weights and parameter adjustment magnitudes in the causal path sequence.
[0018] Thirdly, a computing server system-level optimization device for high-load scenarios is provided, comprising: a memory and at least one processor, wherein the memory stores instructions; the at least one processor invokes the instructions in the memory to cause the computing server system-level optimization device for high-load scenarios to execute the aforementioned computing server system-level optimization method for high-load scenarios.
[0019] Fourthly, a computer-readable storage medium is provided, wherein instructions are stored therein, which, when executed on a computer, cause the computer to perform the aforementioned optimization method for computing server system layers in high-load scenarios.
[0020] The technical solution provided in this application obtains a system performance dataset by collecting data on CPU instruction cycles, cache hit rate, page table misses, memory access latency, and block device queue depth from the computing server. Compared to existing technologies that only collect macro-level resource utilization indicators such as CPU utilization and memory usage, the micro-level performance indicators collected in this application can deeply reveal the resource contention and scheduling conflicts at the system's underlying level. The number of CPU instruction cycles reflects the actual effective computation completed by the processor rather than simply its workload; the number of page table misses directly reflects the pressure on virtual memory management; the memory access latency between NUMA nodes exposes the performance loss caused by cross-node access; and the block device queue depth reveals the load status of the storage subsystem. These micro-level indicators, compared to macro-level indicators, provide a more comprehensive understanding of the underlying resource contention and scheduling conflicts. By observing indicators to more closely approximate the true root causes of performance bottlenecks, a three-layer causal directed acyclic graph (DAG) is constructed using the Granger causality test algorithm to analyze the causal relationships in the system performance dataset. Compared to existing technologies that rely on correlation analysis or expert experience to judge parameter influence relationships, the Granger causality test, by constructing autoregressive and extended autoregressive models and comparing the sum of squared residuals to calculate the F-statistic, can rigorously verify from a statistical perspective whether one time series indicator has predictive power for another, thereby determining whether a genuine causal relationship exists between the two rather than a spurious correlation. The three-layer causal DAG establishes a complete causal propagation path from the kernel parameter node in the parameter configuration layer, through the performance indicator node in the intermediate state layer, to the business indicator node in the performance indicator layer. This paper clearly demonstrates how parameter adjustments affect final performance through causal chains. It locates bottleneck nodes with anomalies exceeding a threshold in a three-layer causal directed acyclic graph and backtracks from these bottleneck nodes back to the parameter configuration layer to obtain an effective set of adjustments. Compared to existing technologies that blindly adjust all parameters or trigger adjustments based solely on a single metric threshold, this application's causal graph-based backtracking mechanism can accurately trace the upstream causal source of bottleneck nodes, filtering out a few key parameters that are truly causally related to the current performance bottleneck. Parameters not in the effective adjustment set are zeroed out, reducing the action space and significantly decreasing the dimensionality of the parameter search space. Iterative parameter adjustments within this reduced action space avoid ineffective exploration of irrelevant parameters, accelerating the convergence speed of the optimization process. The adjustment parameters of the target parameter configuration vector are traversed forward through a three-layer causal directed acyclic graph to obtain a causal path sequence and calculate the causal contribution. Compared with the black-box optimization results of the prior art, which only give the parameter configuration values without explaining the reasons for the adjustment, this application generates a complete causal propagation path for each adjustment parameter, showing how the parameter passes through multiple links in the intermediate state layer and finally affects the business indicators of the performance indicator layer. The causal contribution is calculated by multiplying the causal edge weight in the causal path sequence with the parameter adjustment magnitude, quantifying the actual contribution of each parameter adjustment to performance improvement. Operation and maintenance personnel can clearly understand the causal logic and importance ranking of parameter adjustments, enhance the transparency and credibility of optimization decisions, and facilitate the review and maintenance of optimization plans in the production environment.
[0021] The Granger causality test algorithm, applied in this application, makes a key contribution to the technical solution. This algorithm determines whether the explanatory indicator contains useful information for predicting the explained indicator by comparing the prediction accuracy of an autoregressive model using only the historical data of the explained indicator itself with that of an extended autoregressive model using both the explained indicator and its historical data. When the sum of squared residuals of the extended model is significantly smaller than that of the autoregressive model, it indicates that the explanatory indicator has a causal influence on the explained indicator. This causality determination method, compared to simple correlation coefficient calculation, can effectively distinguish between true causal relationships and spurious correlations, avoiding misjudging two indicators that are both results of the same underlying factor as having a causal relationship. In the scenario of optimizing the computing server system layer, performance indicators have complex mutual influences and are jointly affected by upstream parameters. The Granger causality test verifies the predictive power of time series data. Causality analysis, leveraging the temporal property that causes inevitably precede effects, can accurately identify which performance metric changes are the true causes of changes in other metrics. The constructed causal adjacency matrix lays the foundation for the subsequent establishment of a three-layer causal directed acyclic graph. Bottleneck node backtracking and parameter space pruning based on this causal graph directly rely on the accurate causal relationship information provided by the Granger causality test. If correlation analysis is used instead of causality testing, highly correlated but causally unrelated metric pairs may be incorrectly connected, leading to tracing back to incorrect upstream parameters during backtracking. This causes parameter adjustment to deviate from the true root cause of the bottleneck. The introduction of the Granger causality test algorithm enables this application to accurately locate the causal source of performance bottlenecks under high load scenarios and adjust relevant parameters accordingly, avoiding ineffective optimization or even negative impacts caused by misjudgment of causal relationships in existing technologies. Attached Figure Description
[0022] To more clearly illustrate the technical solutions of the embodiments of the present invention, the drawings used in the description of the embodiments will be briefly introduced below. Obviously, the drawings described below are some embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0023] Figure 1 This is a schematic diagram of an embodiment of the computing server system layer optimization method for high-load scenarios in this application.
[0024] Figure 2 This is a schematic diagram of an embodiment of the computing server system layer optimization system for high-load scenarios in this application.
[0025] Figure 3 This is a schematic block diagram of the structure of a computing server system layer optimization device for high-load scenarios in an embodiment of the present invention. Detailed Implementation
[0026] This application provides a method and system for optimizing a computing server system layer for high-load scenarios. The terms "first," "second," "third," "fourth," etc. (if present) in the specification, claims, and accompanying drawings of this application are used to distinguish similar objects and are not necessarily used to describe a specific order or sequence. It should be understood that such data can be interchanged where appropriate so that the embodiments described herein can be implemented in a sequence other than that illustrated or described herein. Furthermore, the terms "comprising" or "having" and any variations thereof are intended to cover a non-exclusive inclusion; for example, a process, method, system, product, or apparatus that includes a series of steps or units is not necessarily limited to those steps or units explicitly listed, but may include other steps or units not explicitly listed or inherent to such processes, methods, products, or apparatus.
[0027] For ease of understanding, the specific process of the embodiments of this application is described below. Please refer to [link / reference]. Figure 1 One embodiment of the system-level optimization method for computing power servers in high-load scenarios in this application includes:
[0028] Step S1: Collect the CPU instruction cycle count, cache hit rate, page table miss count, memory access latency, and block device queue depth of the computing server to obtain the system performance dataset;
[0029] Step S2: Perform causal relationship analysis on the system performance dataset using the Granger causality test algorithm to obtain the causal adjacency matrix, and construct a three-layer causal directed acyclic graph based on the causal adjacency matrix;
[0030] Step S3: Locate the bottleneck node whose anomaly exceeds the threshold in the three-layer causal directed acyclic graph, and backtrack from the bottleneck node to the parameter configuration layer to obtain the effective adjustment set;
[0031] Step S4: Set the dimension of parameters not in the effective adjustment set to zero to obtain a reduced action space. Iterate through the parameter adjustment within the reduced action space to obtain the target parameter configuration vector.
[0032] Step S5: Perform a forward traversal through three layers of causal directed acyclic graph from the adjustment parameters of the target parameter configuration vector to obtain the causal path sequence. Calculate the causal contribution by multiplying the causal edge weights and parameter adjustment magnitudes in the causal path sequence.
[0033] It is understood that the executing entity of this application can be a computing server system-level optimization system for high-load scenarios, or it can be a terminal or a server; the specific implementation is not limited here. This application's embodiment uses a server as an example for illustration.
[0034] Specifically, a performance monitoring module is deployed at the operating system kernel layer of the computing server to continuously read system operation data with a sampling period of 100 milliseconds. Specifically, the CPU instruction cycle count is obtained by reading the instruction counter value in the ` / proc / stat` file; this value reflects the processor's instruction execution efficiency, with a higher value indicating more instructions completed per unit time. Simultaneously, the `page_fault` statistics item in the ` / proc / meminfo` file is read to obtain the number of page table misses; this metric records the number of times virtual memory address translation failures require loading pages from disk. The `numa_hit` and `numa_miss` counts of each NUMA node in the ` / sys / devices / system / node` directory are read, and the memory access latency is obtained by calculating the ratio of the difference between these two counts to the total number of accesses; a larger ratio indicates more frequent cross-node accesses, leading to increased latency. Finally, the block device queue depth is obtained by reading the ninth column of the ` / sys / block / sda / stat` file; this value represents the I / O waiting to be processed. The number of requests is determined by arranging the collected raw values into a sampling sequence by timestamp. For each performance indicator, sliding statistics are performed in three time windows: 5 seconds, 30 seconds, and 300 seconds. The arithmetic mean within the 5-second window is calculated as the sum of all sampled values within that window divided by the number of sampled points. The variance is calculated as the sum of the squares of the differences between each sampled point and the mean divided by the number of sampled points. The rate of change is calculated as the value at the end of the window minus the value at the beginning of the window, divided by the beginning value. The same statistical calculations are performed for the 30-second and 300-second windows. The nine statistical values (three means, three variances, and three rates of change) for each performance indicator in the three time windows are arranged in a row. The statistical values of all performance indicators are stacked in rows to form a feature matrix. Each column of the feature matrix is standardized, and the mean and standard deviation of all values in that column are calculated. The standardized value is obtained by subtracting the mean from each raw value and dividing by the standard deviation. The standardized feature matrix has a mean of zero and a standard deviation of one for each column, eliminating the influence of differences in the dimensions of different performance indicators, ultimately forming the system performance dataset.
[0035] Select any two performance indicators from the system performance dataset to form an indicator pair. The first time series is designated as the explained indicator (Y series), and the second time series is designated as the explained indicator (X series). Two regression models are constructed for this indicator pair. The first autoregressive model uses only the historical data of the Y series itself to predict the current value. Specifically, the value of the Y series at time t is represented as a linear combination of the values of the Y series at ten historical times (t-1, t-2, up to t-10). Each historical value is multiplied by its corresponding regression coefficient, and the results are summed. The least squares method is used to fit the regression coefficients, and the predicted value and the actual value of the model are calculated. The residual sum of squares is denoted as RSS1. The second extended autoregressive model adds historical data of the X sequence as an additional predictor variable to the autoregressive model. The value of the Y sequence at time t is expressed as a linear combination of ten historical values of the Y sequence plus a linear combination of ten historical values of the X sequence. Similarly, all regression coefficients are obtained by fitting using the least squares method, and the residual sum of squares is calculated and denoted as RSS2. The F statistic is calculated as the difference between RSS1 and RSS2, divided by RSS2, multiplied by the sample size minus 20, and then divided by 10. This F statistic follows an F distribution with 10 degrees of freedom and a sample size minus 20. Consulting the F distribution critical value table, the significance level is 0. The critical value under 05 is used to determine whether a Granger causal relationship exists between sequence X and sequence Y if the calculated F-statistic is greater than the critical value. In the causal adjacency matrix, the elements at the row indices of sequence X and the column indices of sequence Y are assigned a value of 1 to indicate a causal relationship; otherwise, they are assigned a value of 0 to indicate no causal relationship. The entire causal adjacency matrix is filled by traversing all possible index pairs in the system performance dataset. Based on this causal adjacency matrix, a three-layer causal directed acyclic graph is constructed. The first layer, the parameter configuration layer, includes vm.swappiness, vm.dirty_ratio, and net.core.netdev_m. The system includes 48 adjustable Linux kernel parameter nodes such as ax_backlog. The second intermediate state layer contains 120 performance indicator nodes, such as CPU instruction cycles and page table misses, from the system performance dataset. The third performance indicator layer contains two business-related indicator nodes: system throughput (TPS) and average response latency. Directed edges are drawn between nodes based on the position of the element with a value of 1 in the causal adjacency matrix. The starting point of the edge is the node corresponding to the explanatory indicator, and the ending point is the node corresponding to the explained indicator. The weight of the edge is set to the F statistic minus the critical value and normalized to the interval between 0 and 1. This weight reflects the strength of the causal influence.
[0036] Real-time monitoring values of each performance metric node are extracted from the intermediate state layer of a three-layer causal directed acyclic graph. Simultaneously, the mean and standard deviation of each performance metric over the past 24 hours are calculated from historical operating data. For the CPU instruction cycle count node, assuming the current real-time monitoring value is 15000, the historical mean is 12000, and the historical standard deviation is 800, the anomaly score of this node is calculated as 15000 minus 12000 divided by 800, yielding 3.75. The same anomaly score calculation is performed on all 120 performance metric nodes in the intermediate state layer. Nodes with anomalies greater than 2 are selected as the bottleneck node set. Assuming that page table missing count, memory access latency, and block device queue depth are selected as three bottleneck nodes, starting from the page table missing count node, all directed edges pointing to this node are searched in the three-layer causal directed acyclic graph. The starting nodes of these edges are identified and recorded in the reverse search path. The process continues to backtrack from these starting nodes to find their upstream nodes, repeating this process until the kernel parameter node of the parameter configuration layer is reached. Assuming that backtracking from the page table missing count node reveals… The upstream node represents a performance metric related to memory management. Continuing to backtrack upwards, the `vm.swappiness` parameter node is found and added to the effective adjustment set. The same reverse breadth-first search process is performed on the two bottleneck nodes: memory access latency and block device queue depth. Assuming the memory access latency node backtracks to the `vm.dirty_ratio` and `kernel.numa_balancing` parameter nodes, and the block device queue depth node backtracks to the block device I / O scheduler type parameter node, after deduplicating all backtracked parameter nodes, the effective adjustment set contains four parameter nodes: `vm.swappiness`, `vm.dirty_ratio`, `kernel.numa_balancing`, and `I / O scheduler type`. The number of parameters in the effective adjustment set is 4. The parameter configuration layer contains a total of 48 parameter nodes. The parameter space reduction ratio is calculated as 1 minus 4 divided by 48, approximately 0.92, indicating that causal backtracking reduces the parameter space that needs adjustment from 48 dimensions to 4 dimensions.
[0037] The initial action space is constructed as a 48-dimensional vector, where each dimension corresponds to a kernel parameter node in the parameter configuration layer. Each dimension of the vector is traversed, and the corresponding parameter node is checked to see if it is in the valid adjustment set. Parameter dimensions in the valid adjustment set remain adjustable; those not in the set have their adjustment forced to zero. Assuming the valid adjustment set contains parameter nodes at positions 3, 15, 27, and 40, then in the 48-dimensional action vector, only the values at positions 3, 15, 27, and 40 are non-zero, while the remaining 44 positions are zero. This operation results in a reduced action space. The real-time values of 120 performance metrics are read from the intermediate state layer of a three-layer causal directed acyclic graph to form a system state vector. This 120-dimensional state vector is input into the policy network, which consists of a three-layer fully connected neural network. The network consists of an input layer with 120 neurons receiving values for each dimension of the state vector, a first hidden layer with 256 neurons, a second hidden layer with 256 neurons, a third hidden layer with 128 neurons, and an output layer with 48 neurons corresponding to the adjustment range of 48 parameters. After the policy network outputs a 48-dimensional vector, this vector is multiplied element-wise with a mask vector that reduces the action space. Parameters not in the effective adjustment set are set to zero, resulting in the parameter adjustment action for the current iteration. For example, a positive 0.15 output value for the third dimension indicates an increase of 15% in the corresponding parameter. Based on this parameter adjustment action, a system parameter modification operation is performed. The `vm.swappiness` parameter is adjusted from its current value of 60 to 69 using the `sysctl` command. After waiting 60 seconds for the system to reach steady state, performance metrics are re-collected. Assuming the system throughput was 8500 TPS and the average latency was 120 milliseconds before the adjustment, the system throughput becomes 9200 TPS after the adjustment. The TPS and average latency are changed to 105 milliseconds. The instant reward value is calculated as the throughput change value of 700 divided by the baseline value of 8500 multiplied by the weight 0.5, plus the latency change value of -15 divided by the baseline value of 120 multiplied by the weight 0.5. The instant reward value is approximately equal to 0.0411 plus -0.0625, which equals -0.0214. The system state vector before adjustment, the parameter adjustment action vector, the instant reward scalar value, and the system state vector after adjustment are packaged into an experience tuple and stored in the experience replay buffer. When the buffer accumulates more than 1000 experiences, 128 experiences are randomly selected to form a training batch. The gradients of the policy network and the value network are calculated using this batch of data, and the network parameters are updated. The iterative loop of parameter adjustment, reward calculation, experience storage, and network training is repeated. After each iteration, the average reward value of the current 100 iterations is calculated. When the absolute value of the average reward change rate of 20 consecutive iterations is less than 0.01, convergence is determined. At this time, the parameter adjustment vector output by the policy network is the target parameter configuration vector.
[0038] Examine the 48 dimensions of the target parameter configuration vector and identify the parameter dimensions with non-zero adjustment magnitudes. Assuming the adjustment magnitudes of dimensions 3, 15, and 27 are +0.15, -0.08, and +0.12 respectively, while the remaining dimensions are all zero, extract the parameter nodes corresponding to these three dimensions as adjustment parameter nodes. Starting from the vm.swappiness parameter node corresponding to dimension 3, search for all directed edges emanating from this node in the three-layer causal directed acyclic graph. Assuming this node connects to the page table missing count node in the intermediate state layer, continue searching from the page table missing count node... Traverse forward along the directed edges to the memory access latency node, then traverse forward from the memory access latency node to the average response latency node of the performance metrics layer. Record the complete path as: vm.swappiness node to page table miss count node to memory access latency node to average response latency node. This path contains three directed edges. Read the weight values of these three edges stored in the causal graph, assuming they are 0.42, 0.35, and 0.28. Arrange these three weight values in the path order to form an edge weight sequence, constructing a path weight vector containing 0.42, 0.35, and 0.28. For a vector with three elements, .28, the path causality strength is calculated as 0.42 multiplied by 0.35 multiplied by 0.28, approximately equal to 0.041. The adjustment magnitude corresponding to the `vm.swappiness` parameter node is extracted as positive 0.15. The causal contribution of this parameter node is calculated as the path causality strength 0.041 multiplied by the adjustment magnitude 0.15, approximately equal to 0.00615. The same forward traversal and calculation process is performed on the adjustment parameter nodes of the 15th and 27th dimensions. Assume the path causality strength of the 15th dimension parameter node is 0.038 and the adjustment magnitude is negative 0. The causal contribution of .08 is -0.00304. The causal strength of the path of the 27th dimension parameter node is 0.052, and the adjustment magnitude is positive 0.12, resulting in a causal contribution of 0.00624. Arranging the causal contribution of the three adjustment parameter nodes in descending order of absolute value yields a parameter importance list. The 27th dimension parameter is ranked first, indicating that it has the greatest contribution to performance improvement. The 3rd dimension parameter is ranked second, and the 15th dimension parameter is ranked third. This importance list, combined with the complete path of each parameter node in the causal graph, constitutes an interpretable basis for system-level optimization decisions.
[0039] In one specific embodiment, step S1 includes:
[0040] By deploying a performance monitoring module at the operating system kernel layer and using a preset sampling period, the system files are read synchronously to obtain the number of CPU instruction cycles, page table misses, memory access latency, and block device queue depth, thus obtaining raw performance indicator sampling data.
[0041] Sliding statistics were performed on the original performance index sampling data according to short time windows, medium time windows and long time windows. The arithmetic mean, variance and rate of change of each performance index in each time window were calculated to obtain the multi-time window statistical characteristics.
[0042] The feature matrix is obtained by concatenating the statistical values of each performance index in the three time windows in the multi-time window statistical features row by row.
[0043] The system performance dataset is obtained by standardizing the eigenvalues of each dimension in the feature matrix.
[0044] Specifically, the performance monitoring module, acting as a kernel-mode daemon, performs data collection every 100 milliseconds. It opens the / proc / stat file to extract the sum of user-mode time and system-mode time as the effective instruction execution time. It divides the increment of this time between two samples by the sampling interval to obtain the number of CPU instruction cycles. It opens the / proc / meminfo file to find the pgfault line to extract the number of page table missing values. It traverses the numastat files of each NUMA node in the / sys / devices / system / node directory to extract the values of numa_foreign and numa_hit to calculate the cross-node access ratio as a memory access latency indicator. It opens the stat file of the block device in the / sys / block directory to extract the value of the 9th field as the block device queue depth. It packages the four values obtained from each sample along with the timestamp into a record to form the original performance indicator sampling data sequence.
[0045] For each performance indicator in the original performance indicator sampling data, three sliding time windows are established: a short time window of 5 seconds containing 50 sampling points, a medium time window of 30 seconds containing 300 sampling points, and a long time window of 300 seconds containing 3000 sampling points. At the current moment, sampling points corresponding to the time range are extracted from the original data. These values are summed and divided by the number of sampling points to obtain the arithmetic mean. For each sampling point value, the mean is subtracted, the squares are summed, and then divided by the number of sampling points to obtain the variance. The rate of change is obtained by subtracting the starting value from the value at the end of the window and dividing by the starting value. For each performance indicator, three statistical values—mean, variance, and rate of change—are generated in the three time windows, totaling [amount missing]. Nine feature values and four performance indicators generate a total of thirty-six statistical feature values, forming a multi-time-window statistical feature. The nine statistical values of each performance indicator are extracted and arranged in the following order: short window mean, short window variance, short window rate of change, medium window mean, medium window variance, medium window rate of change, long window mean, long window variance, and long window rate of change, arranged in a row. The statistical values of the four performance indicators are stacked in rows to form a four-row, nine-column feature matrix. For each column of the feature matrix, the mean and standard deviation of all values in that column are calculated. Each original value is subtracted from the mean of that column and then divided by the standard deviation of that column to obtain a standardized value. After standardization, the mean of each column value is zero and the standard deviation is one, eliminating the difference in the dimensions of different performance indicators and forming a system performance dataset.
[0046] In one specific embodiment, step S2 includes:
[0047] Extract any two time series indicators from the system performance dataset as indicator pairs. Define the first time series indicator in the indicator pair as the explained indicator and the second time series indicator in the indicator pair as the explained indicator. Construct an autoregressive model and an extended autoregressive model and calculate the sum of squared residuals.
[0048] The F-statistic is calculated based on the sum of squared residuals. When the F-statistic is greater than the preset critical value, the corresponding element in the causal adjacency matrix is set to 1. The causal adjacency matrix is obtained by traversing all index pairs.
[0049] The parameter configuration layer, intermediate state layer and performance indicator layer are constructed based on the causal adjacency matrix. The parameter configuration layer contains kernel parameter nodes, the intermediate state layer contains performance indicator nodes, and the performance indicator layer contains throughput nodes and response latency nodes.
[0050] By establishing directed edges between nodes corresponding to the positions where the element value is 1 in the causal adjacency matrix, a three-layer causal directed acyclic graph is obtained.
[0051] Specifically, time series data of any two performance indicators are selected from the system performance dataset to form an indicator pair. The first time series is designated as the explained indicator, denoted as the Y series, and the second time series is designated as the explained indicator, denoted as the X series. Two regression models are constructed for this indicator pair to test causality. The first autoregressive model uses only the historical data of the Y series itself to predict the current value. The value of the Y series at time t is represented as a linear combination of the values of the Y series at ten historical times from t-1, t-2 to t-10. Each historical value is multiplied by the corresponding regression coefficient and summed to obtain the predicted value. The combination of regression coefficients that minimizes the sum of squared errors between the predicted and actual values is calculated using the least squares method. The residual sum of squares of this model is denoted as RSS1. The second extended autoregressive model adds historical data of the X series as an additional factor to the autoregressive model. The predictor variable is represented by the value of the Y sequence at time t as a linear combination of ten historical values of the Y sequence plus a linear combination of ten historical values of the X sequence. All regression coefficients are obtained by fitting using the least squares method, and the sum of squared residuals (RSS2) is calculated. If the sum of squared residuals significantly decreases after expanding the model to include X sequence information, it indicates that the X sequence contains useful information for predicting the Y sequence. The F-statistic is calculated as the difference between RSS1 and RSS2, divided by RSS2, multiplied by the sample size minus 20, and then divided by 10. This F-statistic follows an F-distribution with 10 degrees of freedom and a sample size minus 20. Under the null hypothesis that the X sequence does not affect the Y sequence, the F-statistic should be small. The critical value at a significance level of 0.05 is consulted in the F-distribution critical value table. If the calculated F-statistic is greater than this critical value, the null hypothesis is rejected, and a Granger causal relationship exists between the X sequence and the Y sequence.
[0052] In the causal adjacency matrix, elements at the row index corresponding to sequence X and the column index corresponding to sequence Y are assigned a value of 1 to indicate the existence of a causal relationship; otherwise, they are assigned a value of 0 to indicate the absence of a causal relationship. This Granger causality test process is repeated for all possible combinations of indicators in the system performance dataset to complete the filling of the entire causal adjacency matrix. The number of rows and columns in the causal adjacency matrix equals the number of performance indicators. An element in the i-th row and j-th column of the matrix being 1 indicates that the i-th indicator has a causal influence on the j-th indicator. Based on this causal adjacency matrix, a three-layer causal directed acyclic graph is constructed. The first layer, the parameter configuration layer, includes `vm.swappiness` to control the interaction. The system includes 48 adjustable Linux kernel parameter nodes, such as partition usage preference, vm.dirty_ratio controlling the dirty page flush threshold, and net.core.netdev_max_backlog controlling the network device backlog queue length. The second intermediate state layer contains performance indicator nodes in the system performance dataset, such as CPU instruction cycles, page table misses, memory access latency, and block device queue depth. The third performance indicator layer contains two business-related indicator nodes: system throughput (TPS, representing the number of transactions processed per second) and average response latency (representing the average time from request initiation to completion).
[0053] Based on the positions of elements with a value of 1 in the causal adjacency matrix, directed edges are established between corresponding nodes. The starting point of the edge is the node corresponding to the explanatory indicator, and the ending point is the node corresponding to the explained indicator. The direction of the edge indicates the propagation direction of the causal influence. The weight of the edge is set as the value of the F statistic minus the critical value divided by the maximum value of all significant F statistics, and then normalized to obtain a weight value in the range of 0 to 1. This weight value reflects the strength of the causal influence. The larger the F statistic, the greater the predictive contribution of the explanatory indicator to the explained indicator and the stronger the causal influence. By establishing weighted directed edges between the three layers of nodes, a three-layer causal directed acyclic graph is formed. The graph structure clearly shows how the kernel parameter node of the parameter configuration layer affects the performance indicator node of the intermediate state layer through the causal chain, and then affects the business indicator node of the performance indicator layer. The existence of a directed path from any node to another node in the graph indicates that the former has a direct or indirect causal influence relationship with the latter.
[0054] In one specific embodiment, step S3 includes:
[0055] Extract the current values of each performance index node from the intermediate state layer of the three-layer causal directed acyclic graph, calculate the anomaly of each performance index node by subtracting the historical mean from the current value and dividing by the historical standard deviation, and select the performance index node whose anomaly exceeds the preset threshold as the bottleneck node.
[0056] Starting from the bottleneck node, perform a reverse breadth-first search along the directed edges of the three-layer causal directed acyclic graph, record all nodes traversed in the search path, and stop the search when the parameter configuration layer is reached, thus obtaining a set of reverse search paths.
[0057] Extract all kernel parameter nodes located in the parameter configuration layer from the reverse search path set, store the identifiers of the kernel parameter nodes into a set container, and obtain the effective adjustment set;
[0058] The number of kernel parameter nodes in the effective adjustment set is counted, and the number of kernel parameter nodes is compared with the total number of parameter nodes in the parameter configuration layer to calculate the parameter space reduction ratio.
[0059] Specifically, the current real-time monitoring values of each performance indicator node are extracted from the intermediate state layer of the three-layer causal directed acyclic graph. Simultaneously, the mean and standard deviation of each performance indicator over the past 24 hours are calculated from historical operating data. For the CPU instruction cycle count node, assuming the current real-time monitoring value is 15000, all sampled values of this indicator over the past 24 hours are retrieved from the historical database. The sum of all historical values is divided by the number of sampled points to obtain the historical mean, assumed to be 12000. The squared difference between each historical value and the mean is calculated, summed, and then divided by the number of sampled points, taking the square root to obtain the historical standard deviation, assumed to be 800. The outlier of this node is calculated as the current value 15000 minus the historical mean 12000, resulting in 3000. Dividing 3000 by the historical standard deviation of 800 yields an anomaly score of 3.75. The anomaly score reflects the degree to which the current state deviates from the normal level. A positive anomaly score indicates that the current value is higher than the historical normal level, while a negative anomaly score indicates that the current value is lower than the historical normal level. The larger the absolute value of the anomaly score, the more severe the deviation. The same anomaly score calculation is performed on all performance indicator nodes in the intermediate state layer. A preset threshold of 2 is set, indicating that a deviation exceeding two standard deviations is considered anomaly. Performance indicator nodes with an anomaly score greater than 2 are selected as the bottleneck node set. For example, the page table missing count node has an anomaly score of 2.8, the memory access latency node has an anomaly score of 3.2, and the block device queue depth node has an anomaly score of 2.5.
[0060] Starting from the page table missing count node, search for all directed edges pointing to that node in the three-layer causal directed acyclic graph. The direction of the directed edges, from the starting point to the ending point, represents the direction of causal influence. The reverse search involves tracing back from the ending point to the starting point along the opposite direction of the edges. Identify all starting nodes pointing to the page table missing count node and record them in the reverse search path. Continue tracing back from these starting nodes to find their upstream nodes, repeating this process until the kernel parameter node of the parameter configuration layer is reached. The parameter configuration layer node has no upstream node, thus serving as the termination condition for the backtracking. Suppose that tracing back from the page table missing count node reveals that its upstream node is an intermediate state indicator node related to memory management. The process continues backwards to find the `vm.swappiness` parameter node. This parameter node is then added to the reverse search path set. The same reverse breadth-first search process is performed on the memory access latency node and the block device queue depth node. Breadth-first search means that all nodes in the current layer are traversed before entering the next layer during the backtracking process. Assuming that the memory access latency node backtracks to the `vm.dirty_ratio` and `kernel.numa_balancing` parameter nodes, and the block device queue depth node backtracks to the block device I / O scheduler type parameter node, all backtracked parameter nodes are collected into the reverse search path set.
[0061] Extract all kernel parameter nodes located in the parameter configuration layer from the reverse search path set. Iterate through each node in the reverse search path set, determining its layer. If a node belongs to the parameter configuration layer, extract its identifier, which is a parameter name string such as `vm.swappiness`, `vm.dirty_ratio`, etc. Store these parameter name strings in a collection container. The collection container automatically removes duplicates to ensure each parameter node appears only once. Assuming the reverse search path set contains `vm.swappiness`, `vm.dirty_ratio`, `kernel.numerable`, etc.,... The four parameter nodes are _balancing, I / O scheduler type, etc. The names of these four parameters are stored in a set container to obtain the effective adjustment set. The number of elements in the effective adjustment set is 4, which means that there are 4 kernel parameters that need to be adjusted. The parameter configuration layer contains a total of 48 adjustable kernel parameter nodes. The parameter space reduction ratio is calculated as 1 minus the number of effective adjustment sets divided by the total number of parameters, that is, 1 minus 4 divided by 48 is approximately equal to 0.917. The parameter space reduction ratio reflects that the parameter space that needs to be adjusted has been reduced from 48 dimensions to 4 dimensions through causal backtracking. Only a few key parameters that have a causal relationship with the current bottleneck node need to be focused on.
[0062] In one specific embodiment, step S4 includes:
[0063] The initial action space is constructed by including all kernel parameter nodes of the parameter configuration layer. Each parameter dimension in the initial action space is traversed, and it is determined whether the kernel parameter node corresponding to each parameter dimension is in the effective adjustment set. The adjustment magnitude of parameter dimensions that are not in the effective adjustment set is assigned to zero, thus obtaining the reduced action space.
[0064] The current system state vector is read from the intermediate state layer of the three-layer causal directed acyclic graph. The system state vector is input into the policy network to generate parameter adjustment actions. The values of each dimension of the parameter adjustment actions are limited to the non-zero dimension range of the reduced action space to obtain the parameter adjustment actions for the current iteration.
[0065] Modify the corresponding kernel parameter values according to the parameter adjustment action and wait for the system to enter a steady state. Then, collect the new system state vector, calculate the weighted sum of the throughput change value and the latency change value as the instant reward value, and store the system state vector, parameter adjustment action and instant reward value into the experience replay buffer.
[0066] The policy network and value network are trained by randomly sampling batch data from the experience replay buffer. The iteration is terminated when the average rate of change of reward in multiple consecutive iterations is less than the preset convergence threshold. The parameter adjustment vector output by the policy network is extracted as the target parameter configuration vector.
[0067] Specifically, the initial action space is constructed as a vector containing 48 elements. Each element of the vector corresponds to a kernel parameter node in the parameter configuration layer, and the value of the element represents the adjustment magnitude of that parameter. Each element position in the vector is traversed, and it is checked whether the kernel parameter node corresponding to that position is in the valid adjustment set. Assuming the valid adjustment set contains four parameter nodes—vm.swappiness, vm.dirty_ratio, kernel.numa_balancing, and I / O scheduler type—corresponding to positions 3, 15, 27, and 40 of the vector, the element values at these four positions are kept adjustable. For the vector positions corresponding to the remaining 44 parameter nodes that are not in the valid adjustment set, the element values at these positions are forcibly assigned to zero, indicating that these parameters are not adjusted. After this operation, a reduced action space is obtained. The vector of the reduced action space is still 48-dimensional, but only four dimensions have non-zero values, while the remaining 44 dimensions are zero. The reduced action space restricts parameter adjustments to only a few key parameters that have a causal relationship with the current bottleneck node.
[0068] The system state vector is constructed by reading the current real-time values of all performance indicator nodes from the intermediate state layer of a three-layer causal directed acyclic graph. Assuming the intermediate state layer contains 120 performance indicator nodes, the system state vector is a 120-dimensional vector. This vector is input into the policy network, which consists of multiple fully connected neural networks. The input layer receives the 120-dimensional state vector, and after nonlinear transformations through multiple hidden layers, the output layer generates a 48-dimensional parameter adjustment action vector. The values of each dimension of the parameter adjustment action vector output by the policy network represent the suggested adjustment magnitude for the corresponding kernel parameters. The 48-dimensional vector output by the policy network is then compared element-wise with the mask vector of the reduced action space. The prime multiplication operation sets the mask vector to 1 in the dimension corresponding to the valid adjustment set and 0 in the rest. After the multiplication operation, the output value of the parameter dimension not in the valid adjustment set is forced to zero, resulting in the parameter adjustment action vector for the current iteration. For example, if the output value of the 3rd dimension is positive 0.15, it means that the vm.swappiness parameter is increased by 15% of the current value; if the output value of the 15th dimension is negative 0.08, it means that the vm.dirty_ratio parameter is decreased by 8% of the current value; and if the output value of the 27th dimension is positive 0.12, it means that the kernel.numa_balancing parameter is increased by 12% of the current value.
[0069] The system parameter modification operation is executed based on the parameter adjustment action vector. For example, the `vm.swappiness` parameter, currently 60, is increased by 15% to 69. This value is then written to the kernel using the `sysctl` command. The same modification operation is performed on other non-zero dimension parameters. After the parameter modification is complete, the system waits 60 seconds to reach a steady state. A steady state refers to a relatively stable operating state where system performance indicators no longer fluctuate drastically but are maintained under the new parameter configuration. Performance indicators are then re-collected from the intermediate state layer to construct a new system state vector. Assuming the system throughput was 8500 transactions per second and the average latency was 120 milliseconds before the adjustment, and the system throughput becomes 9200 transactions per second and the average latency becomes... In 105 milliseconds, the throughput change is calculated as 9200 minus 8500 equals 700, and the latency change is calculated as 105 minus 120 equals -15. The throughput change is divided by the baseline value of 8500 and multiplied by the weighting factor of 0.5, and the latency change is divided by the baseline value of 120 and multiplied by the weighting factor of 0.5. The two are added together to obtain the instant reward value. An increase in throughput generates a positive reward, and a decrease in latency also generates a positive reward. The system state vector before adjustment, the parameter adjustment action vector, the instant reward value, and the system state vector after adjustment are packaged into an experience tuple and stored in the experience replay buffer. The experience replay buffer adopts a first-in-first-out queue structure. When the buffer capacity reaches the upper limit, the oldest experience tuple is overwritten by the new experience tuple.
[0070] 128 experience tuples are randomly selected from the experience replay buffer to form a training batch. The loss functions of the policy network and the value network are calculated using this batch of data. The goal of the policy network is to maximize the cumulative reward, and the goal of the value network is to accurately estimate the state value. The gradient of the loss function with respect to the network parameters is calculated using the backpropagation algorithm. The network parameters are updated using the gradient descent method. The iterative loop of parameter adjustment, reward calculation, experience storage, and network training is repeated. After each iteration, the current instantaneous reward value is recorded, and the average reward value of the last 100 iterations is calculated. When the absolute value of the average reward change rate over 20 consecutive iterations is less than 0.01, the optimization process is considered to have converged. At this point, the policy network has learned the mapping relationship from the system state to the optimal parameter adjustment. The parameter adjustment vector output by the policy network is extracted as the target parameter configuration vector. This vector contains the optimal adjustment range of each kernel parameter. This vector is applied to the actual production environment to complete the system-level optimization.
[0071] In one specific embodiment, step S5 includes:
[0072] Extract parameter nodes with non-zero adjustment magnitude from the target parameter configuration vector as adjustment parameter nodes. Perform a forward breadth-first traversal in the three-layer causal directed acyclic graph starting from each adjustment parameter node. Record the intermediate state layer nodes passed and the performance index layer nodes reached during the traversal to obtain the causal path sequence.
[0073] Extract the weight values of each directed edge in the causal path sequence, and multiply the weight values of all directed edges on the same path to obtain the path causal strength.
[0074] Extract the parameter adjustment magnitude corresponding to each adjustment parameter node in the target parameter configuration vector, and multiply the path causal strength with the corresponding parameter adjustment magnitude to obtain the causal contribution.
[0075] The causal contribution of all adjusted parameter nodes is sorted in descending order of numerical value to generate a parameter importance list as an interpretable basis for system-level optimization decisions.
[0076] Specifically, the adjustment magnitude values of all 48 parameter dimensions in the target parameter configuration vector are examined to identify parameter dimensions with non-zero adjustment magnitudes. For example, the adjustment magnitude of the 3rd dimension corresponding to the `vm.swappiness` parameter is +0.15, the adjustment magnitude of the 15th dimension corresponding to the `vm.dirty_ratio` parameter is -0.08, and the adjustment magnitude of the 27th dimension corresponding to the `kernel.numa_balancing` parameter is +0.12. The adjustment magnitudes of the remaining 45 dimensions are all zero. The parameter nodes corresponding to these three non-zero adjustment magnitudes are extracted as adjustment parameter nodes. Starting from the `vm.swappiness` parameter node, a forward breadth-first traversal is performed in the three-layer causal directed acyclic graph. Forward traversal refers to moving along the positive direction of the directed edges from the starting point to the ending point, searching for all directed edges derived from this parameter node. Assuming this parameter node is connected to the page table missing count node in the intermediate state layer, the forward traversal continues from the page table missing count node along the directed edges. Find its downstream node, assuming the downstream node is the memory access latency node, and then traverse forward from the memory access latency node to the average response latency node of the performance metric layer. Record the complete traversal path as vm.swappiness node to page table miss count node to memory access latency node to average response latency node. This path contains three directed edges connecting four nodes respectively. Perform the same forward breadth-first traversal process on the vm.dirty_ratio parameter node and kernel.numa_balancing parameter node. Assume the traversal path of the vm.dirty_ratio node is the parameter node to disk write frequency node to block device queue depth node to system throughput node, and the traversal path of the kernel.numa_balancing node is the parameter node to cross-node memory access ratio node to memory bandwidth utilization node to average response latency node. Collect the traversal paths of all the parameter adjustment nodes to obtain the causal path sequence.
[0077] Extract the directed edges contained in each path in the causal path sequence, and read the weight value of each directed edge stored in the three-layer causal directed acyclic graph. The weight value was calculated according to the F-statistic of Granger causality test when constructing the causal graph, reflecting the strength of causal influence. Assuming that the path of the vm.swappiness node contains three edges, the first edge from the vm.swappiness node to the page table missing count node has a weight of 0.42, the second edge from the page table missing count node to the memory access latency node has a weight of 0.35, and the third edge from the memory access latency node to the average response latency node has a weight of... The initial value is 0.28. Multiplying these three weight values in the order of the path, 0.42 multiplied by 0.35 equals 0.147, and then multiplied by 0.28 equals 0.041. The path causality strength is 0.041. Path causality strength reflects the comprehensive influence of the parameter node on the performance index node through the causal path. The longer the path and the more intermediate nodes it passes through, the smaller the path causality strength after multiplication. Assuming the path causality strength of the vm.dirty_ratio node is 0.038 and the path causality strength of the kernel.numa_balancing node is 0.052.
[0078] Extract the parameter adjustment magnitude values corresponding to each adjustment parameter node in the target parameter configuration vector. The adjustment magnitude of the `vm.swappiness` node is +0.15, the adjustment magnitude of the `vm.dirty_ratio` node is -0.08, and the adjustment magnitude of the `kernel.numa_balancing` node is +0.12. Multiply the path causality strength of each node by the corresponding parameter adjustment magnitude. The causal contribution of the `vm.swappiness` node equals the path causality strength 0.041 multiplied by the adjustment magnitude 0.15, which equals 0.00615. The causal contribution of the `vm.dirty_ratio` node equals the path causality strength 0.038 multiplied by the adjustment magnitude -0.08, which equals -0.00304. The causal contribution of the `kernel.numa_balancing` node equals the path causality strength 0.038 multiplied by the adjustment magnitude -0.08, which equals -0.00304. The intensity 0.052 multiplied by the adjustment range 0.12 equals 0.00624. The causal contribution rate comprehensively considers the parameter adjustment range and the intensity of causal influence. The larger the value, the greater the contribution of the parameter adjustment to the performance improvement. The causal contribution rates of all adjusted parameter nodes are sorted in descending order of absolute value. The kernel.numa_balancing node with an absolute causal contribution rate of 0.00624 ranks first, the vm.swappiness node with an absolute causal contribution rate of 0.00615 ranks second, and the vm.dirty_ratio node with an absolute causal contribution rate of 0.00304 ranks third. A parameter importance list is generated. This list, combined with the complete path of each parameter node in the causal graph, constitutes an interpretable basis for system-level optimization decisions. Operation and maintenance personnel can clearly understand the causal logic and contribution size of each parameter adjustment by viewing this list.
[0079] In one specific embodiment, the weight values of each directed edge in the causal path sequence are extracted, and the weight values of all directed edges on the same path are multiplied together to obtain the path causal strength, including:
[0080] From the causal path sequence, each directed edge is extracted in topological order, and the weight value of each directed edge stored in the three-layer causal directed acyclic graph is read to obtain the edge weight sequence.
[0081] Index all weight values belonging to the same causal path in the edge weight sequence according to the path direction to obtain the path weight vector;
[0082] Perform a cumulative multiplication operation on each weight value in the path weight vector. The cumulative multiplication result is equal to the first weight value of the path weight vector multiplied by the second weight value and then multiplied by all subsequent weight values, thus obtaining the path causality strength.
[0083] The path causality strength corresponding to each adjustment parameter node is stored as a key-value pair mapping relationship, where the key is the adjustment parameter node identifier and the value is the path causality strength value, thus obtaining the path causality strength mapping table.
[0084] Specifically, directed edges are extracted from the causal path sequence in topological order, meaning they are processed sequentially from upstream to downstream nodes according to the order of causal propagation. Assuming the causal path of the `vm.swappiness` parameter node contains three directed edges: the first edge connects the `vm.swappiness` node to the page table miss count node; the second edge connects the page table miss count node to the memory access latency node; and the third edge connects the memory access latency node to the average response latency node. These three edges are extracted sequentially according to the causal propagation order. The weight of the first edge stored in the three-layer causal directed acyclic graph is read as 0.42. The weight of the second edge is read as... The weight of the first edge is 0.35, and the weight of the third edge is 0.28. These three weight values are arranged in the order of extraction to form an edge weight sequence. The same operation is performed on the causal path of the vm.dirty_ratio parameter node. Assuming that the path contains three edges with weight values of 0.38, 0.31, and 0.32 respectively, the same edge weight sequence is extracted for the causal path of the kernel.numa_balancing parameter node. Assuming that the path contains three edges with weight values of 0.45, 0.36, and 0.32 respectively, the edge weight sequences corresponding to the causal paths of all adjusted parameter nodes are collected to obtain a complete set of edge weight sequences.
[0085] The path weight vector is constructed by indexing all weight values belonging to the same causal path in the edge weight sequence according to the path direction. For the causal path of the vm.swappiness parameter node, its edge weight sequence contains three weight values: 0.42, 0.35, and 0.28. Following the path direction from the parameter configuration layer to the intermediate state layer and then to the performance index layer, the first weight value 0.42 is marked as the first element of the vector, the second weight value 0.35 is marked as the second element, and the third weight value 0.28 is marked as the third element. After construction, a path weight vector containing three elements is obtained. For the vm.dirty_ratio parameter node, the path weight vector contains three elements: 0.38, 0.31, and 0.32. For the kernel.numa_balancing parameter node, the path weight vector contains three elements: 0.45, 0.36, and 0.32. The path weight vector maintains the order of the weight values in the causal path to ensure that subsequent cumulative multiplication operations are performed in the correct causal propagation direction.
[0086] The path weight vector is multiplied cumulatively. For the path weight vector of the `vm.swappiness` parameter node, the first weight value of 0.42 is taken as the initial value for multiplication. The initial value of 0.42 is multiplied by the second weight value of 0.35 to obtain an intermediate result of 0.147. The intermediate result of 0.147 is then multiplied by the third weight value of 0.28 to obtain the final cumulative result of 0.041. This cumulative result is the path causality strength of the `vm.swappiness` parameter node. The path causality strength value reflects the comprehensive influence of the parameter node on the performance index node through this causal path. The path weight vector of the parameter node is multiplied by a cumulative multiplication operation. The first weight value of 0.38 is multiplied by the second weight value of 0.31 to get 0.118, and then multiplied by the third weight value of 0.32 to get the path causal strength of 0.038. The path weight vector of the kernel.numa_balancing parameter node is multiplied by a cumulative multiplication operation. The first weight value of 0.45 is multiplied by the second weight value of 0.36 to get 0.162, and then multiplied by the third weight value of 0.32 to get the path causal strength of 0.052. The cumulative multiplication operation combines the strength of multiple causal influence links on the path. The longer the path and the more edges it contains, the smaller the path causal strength after the cumulative multiplication is usually.
[0087] A path causality strength mapping table is constructed by storing the path causality strength corresponding to each adjustment parameter node as a key-value pair mapping relationship. The mapping table adopts a hash table data structure. The key is the identifier of the adjustment parameter node, i.e., the parameter name string, and the value is the path causality strength value. The first record is created in the mapping table with the key set to the string "vm.swappiness" and the value set to 0.041. The second record is created with the key set to the string "vm.dirty_ratio" and the value set to 0.038. The third record is created with the key set to the string "kernel.numa_balancing" and the value set to 0.052. The mapping table allows for quick lookup of the corresponding path causality strength value by parameter name. Operations personnel can obtain the impact strength of the parameter on system performance through the causal path by entering the parameter name. The mapping table serves as the data foundation for subsequent calculation of causal contribution. The actual contribution of each parameter to performance improvement is obtained by multiplying the path causality strength by the parameter adjustment magnitude.
[0088] The above describes the system-level optimization method for computing power servers in high-load scenarios in the embodiments of this application. The following describes the system-level optimization system for computing power servers in high-load scenarios in the embodiments of this application. Please refer to [link / reference]. Figure 2 One embodiment of the computing server system-level optimization system for high-load scenarios in this application includes:
[0089] The data acquisition module is used to collect data on the CPU instruction cycle count, cache hit rate, page table miss count, memory access latency, and block device queue depth of the computing server to obtain a system performance dataset.
[0090] The analysis module is used to perform causal relationship analysis on the system performance dataset using the Granger causality test algorithm to obtain a causal adjacency matrix, and to construct a three-layer causal directed acyclic graph based on the causal adjacency matrix;
[0091] The backtracking module is used to locate bottleneck nodes whose anomalies exceed a threshold in the three-layer causal directed acyclic graph, and backtrack from the bottleneck node to the parameter configuration layer to obtain an effective set of adjustments.
[0092] The adjustment module is used to set the dimension of parameters that are not in the effective adjustment set to zero to reduce the action space, and iteratively perform parameter adjustment within the reduced action space to obtain the target parameter configuration vector;
[0093] The traversal module is used to perform a forward traversal of the adjustment parameters of the target parameter configuration vector through the three-layer causal directed acyclic graph to obtain the causal path sequence, and calculate the causal contribution by multiplying the causal edge weights and parameter adjustment magnitudes in the causal path sequence.
[0094] above Figure 2 The optimization system for high-load scenarios of the computing server system layer in this embodiment of the invention is described in detail from the perspective of modular functional entities. The optimization device for high-load scenarios of the computing server system layer in this embodiment of the invention is described in detail from the perspective of hardware processing.
[0095] Reference Figure 3 This invention also provides a computing server system-level optimization device for high-load scenarios. This device can be a server, and its internal structure can be as follows: Figure 3 As shown, this computing server system-level optimization device for high-load scenarios includes a processor, memory, display screen, input device, network interface, and database connected via a system bus. The processor in this computer design provides computing and control capabilities. The memory of this computing server system-level optimization device for high-load scenarios includes non-volatile storage media and internal memory. The non-volatile storage media stores the operating system, computer programs, and database. The internal memory provides an environment for the operation of the operating system and computer programs in the non-volatile storage media. The database of this computing server system-level optimization device for high-load scenarios stores the data corresponding to this embodiment. The network interface of this computing server system-level optimization device for high-load scenarios is used for communication with external terminals via network connection. When the computer program is executed by the processor, it implements the above-described method.
[0096] Those skilled in the art will understand that Figure 3 The structure shown is merely a block diagram of a portion of the structure related to the present invention and does not constitute a limitation on the computing server system layer optimization device for high-load scenarios to which the present invention is applied.
[0097] The present invention also provides a computer-readable storage medium, which can be a non-volatile computer-readable storage medium or a volatile computer-readable storage medium. The computer-readable storage medium stores instructions that, when executed on a computer, cause the computer to perform the steps of the optimization method for the computing power server system layer for high-load scenarios.
[0098] Those skilled in the art will clearly understand that, for the sake of convenience and brevity, the specific working processes of the systems and units described above can be referred to the corresponding processes in the foregoing method embodiments, and will not be repeated here.
[0099] If the integrated unit is implemented as a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present invention, in essence, or the part that contributes to the prior art, or all or part of the technical solution, can be embodied in the form of a software product. This computer software product is stored in a storage medium and includes several instructions to cause a computing power server system-level optimization device (which may be a personal computer, server, or network device, etc.) for high-load scenarios to execute all or part of the steps of the methods described in the various embodiments of the present invention. The aforementioned storage medium includes various media capable of storing program code, such as USB flash drives, portable hard drives, read-only memory (ROM), random access memory (RAM), magnetic disks, or optical disks.
[0100] The above embodiments are only used to illustrate the technical solutions of the present invention, and are not intended to limit it. Although the present invention has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that modifications can still be made to the technical solutions described in the foregoing embodiments, or equivalent substitutions can be made to some of the technical features. Such modifications or substitutions do not cause the essence of the corresponding technical solutions to deviate from the spirit and scope of the technical solutions of the embodiments of the present invention.
Claims
1. A system-level optimization method for computing servers in high-load scenarios, characterized in that, The method includes: Step S1: Collect the CPU instruction cycle count, cache hit rate, page table miss count, memory access latency, and block device queue depth of the computing server to obtain the system performance dataset; Step S2: Perform causal relationship analysis on the system performance dataset using the Granger causality test algorithm to obtain a causal adjacency matrix. Construct a three-layer causal directed acyclic graph based on the causal adjacency matrix, including: extracting any two time series indicators from the system performance dataset as indicator pairs, defining the first time series indicator in the indicator pair as the explained indicator, and the second time series indicator in the indicator pair as the explained indicator; constructing an autoregressive model and an extended autoregressive model and calculating the residual sum of squares; calculating the F statistic based on the residual sum of squares; setting the corresponding element in the causal adjacency matrix to 1 when the F statistic is greater than a preset critical value; traversing all indicator pairs to obtain the causal adjacency matrix; constructing a parameter configuration layer, an intermediate state layer, and a performance indicator layer based on the causal adjacency matrix, wherein the parameter configuration layer contains kernel parameter nodes, the intermediate state layer contains performance indicator nodes, and the performance indicator layer contains throughput nodes and response latency nodes; establishing directed edges between corresponding nodes based on the positions of elements with a value of 1 in the causal adjacency matrix to obtain the three-layer causal directed acyclic graph. Step S3: Locate the bottleneck node whose anomaly exceeds the threshold in the three-layer causal directed acyclic graph, and backtrack from the bottleneck node to the parameter configuration layer to obtain the effective adjustment set; Step S4: Set the parameter dimensions that are not in the effective adjustment set to zero to obtain a reduced action space. Iteratively perform parameter adjustments within the reduced action space to obtain the target parameter configuration vector. Step S5: Perform a forward traversal through the three-layer causal directed acyclic graph from the adjustment parameters of the target parameter configuration vector to obtain the causal path sequence, and calculate the causal contribution by multiplying the causal edge weights and parameter adjustment magnitudes in the causal path sequence.
2. The system-level optimization method for computing power servers in high-load scenarios according to claim 1, characterized in that, Step S1 includes: By deploying a performance monitoring module at the operating system kernel layer and using a preset sampling period, the system files are read synchronously to obtain the number of CPU instruction cycles, page table misses, memory access latency, and block device queue depth, thus obtaining raw performance indicator sampling data. The original performance index sampling data were subjected to sliding statistics according to short time windows, medium time windows and long time windows respectively. The arithmetic mean, variance and rate of change of each performance index in each time window were calculated to obtain multi-time window statistical characteristics. The feature matrix is obtained by concatenating the statistical values of each performance index in the three time windows in the multi-time window statistical features row by row. The feature values of each dimension in the feature matrix are standardized to obtain the system performance dataset.
3. The system-level optimization method for computing power servers in high-load scenarios according to claim 1, characterized in that, Step S3 includes: Extract the current value of each performance index node from the intermediate state layer of the three-layer causal directed acyclic graph, calculate the anomaly of each performance index node by subtracting the historical mean from the current value and dividing by the historical standard deviation, and select the performance index node whose anomaly exceeds the preset threshold as the bottleneck node. Starting from the bottleneck node, perform a reverse breadth-first search along the directed edges of the three-layer causal directed acyclic graph, record all nodes passed in the search path, and stop the search when the search reaches the parameter configuration layer, thus obtaining a set of reverse search paths. Extract all kernel parameter nodes located in the parameter configuration layer from the set of reverse search paths, and store the identifiers of the kernel parameter nodes into a set container to obtain the effective adjustment set; The number of kernel parameter nodes in the effective adjustment set is counted, and the number of kernel parameter nodes is compared with the total number of parameter nodes in the parameter configuration layer to calculate the parameter space reduction ratio, thus obtaining the parameter space reduction ratio.
4. The system-level optimization method for computing power servers in high-load scenarios according to claim 1, characterized in that, Step S4 includes: The initial action space is constructed to include all kernel parameter nodes of the parameter configuration layer. Each parameter dimension in the initial action space is traversed, and it is determined whether the kernel parameter node corresponding to each parameter dimension is in the effective adjustment set. The adjustment range of parameter dimensions that are not in the effective adjustment set is assigned to zero, thus obtaining the reduced action space. The current system state vector is read from the intermediate state layer of the three-layer causal directed acyclic graph. The system state vector is input into the policy network to generate parameter adjustment actions. The values of each dimension of the parameter adjustment actions are limited to the non-zero dimension range of the reduced action space to obtain the parameter adjustment actions of the current iteration. Modify the corresponding kernel parameter values according to the parameter adjustment action, and after waiting for the system to enter a steady state, collect a new system state vector, calculate the weighted sum of the throughput change value and the latency change value as the instant reward value, and store the system state vector, the parameter adjustment action and the instant reward value into the experience replay buffer. The policy network and value network are trained by randomly sampling batch data from the experience replay buffer. The iteration is terminated when the average rate of change of reward in multiple consecutive iterations is less than a preset convergence threshold. The parameter adjustment vector output by the policy network is extracted as the target parameter configuration vector.
5. The system-level optimization method for computing power servers in high-load scenarios according to claim 1, characterized in that, Step S5 includes: Extract parameter nodes with non-zero adjustment magnitude from the target parameter configuration vector as adjustment parameter nodes. Perform a forward breadth-first traversal on the three-layer causal directed acyclic graph starting from each adjustment parameter node. Record the intermediate state layer nodes passed and the performance index layer nodes reached during the traversal to obtain the causal path sequence. Extract the weight values of each directed edge in the causal path sequence, and multiply the weight values of all directed edges on the same path to obtain the path causal strength. Extract the parameter adjustment magnitude corresponding to each adjustment parameter node in the target parameter configuration vector, and multiply the path causal strength with the corresponding parameter adjustment magnitude to obtain the causal contribution. The causal contribution of all adjusted parameter nodes is sorted in descending order of numerical value to generate a parameter importance list as an interpretable basis for system-level optimization decisions.
6. The system-level optimization method for computing power servers in high-load scenarios according to claim 5, characterized in that, The step of extracting the weight values of each directed edge in the causal path sequence and multiplying the weight values of all directed edges on the same path to obtain the path causality strength includes: From the causal path sequence, each directed edge is extracted in topological order, and the weight value of each directed edge stored in the three-layer causal directed acyclic graph is read to obtain the edge weight sequence. Index all weight values belonging to the same causal path in the edge weight sequence according to the path direction to obtain the path weight vector; Perform a cumulative multiplication operation on each weight value in the path weight vector, and calculate the cumulative multiplication result as the first weight value of the path weight vector multiplied by the second weight value and then multiplied by all subsequent weight values to obtain the path causality strength. The path causality strength corresponding to each adjustment parameter node is stored as a key-value pair mapping relationship, where the key is the adjustment parameter node identifier and the value is the path causality strength value, thus obtaining the path causality strength mapping table.
7. A computing server system-level optimization system for high-load scenarios, characterized in that, A method for optimizing a computing server system layer for high-load scenarios as described in any one of claims 1 to 6, wherein the computing server system layer optimization system for high-load scenarios comprises: The data acquisition module is used to collect data on the CPU instruction cycle count, cache hit rate, page table miss count, memory access latency, and block device queue depth of the computing server to obtain a system performance dataset. The analysis module is used to perform causal relationship analysis on the system performance dataset using the Granger causality test algorithm to obtain a causal adjacency matrix. Based on the causal adjacency matrix, a three-layer causal directed acyclic graph is constructed, including: extracting any two time-series indicators from the system performance dataset as indicator pairs; defining the first time-series indicator in the indicator pair as the explained indicator and the second time-series indicator in the indicator pair as the explanatory indicator; constructing an autoregressive model and an extended autoregressive model and calculating the residual sum of squares; calculating the F-statistic based on the residual sum of squares; setting the corresponding element in the causal adjacency matrix to 1 when the F-statistic is greater than a preset critical value; traversing all indicator pairs to obtain the causal adjacency matrix; constructing a parameter configuration layer, an intermediate state layer, and a performance indicator layer based on the causal adjacency matrix, wherein the parameter configuration layer contains kernel parameter nodes, the intermediate state layer contains performance indicator nodes, and the performance indicator layer contains throughput nodes and response latency nodes; establishing directed edges between corresponding nodes based on the positions of elements with a value of 1 in the causal adjacency matrix to obtain the three-layer causal directed acyclic graph. The backtracking module is used to locate bottleneck nodes whose anomalies exceed a threshold in the three-layer causal directed acyclic graph, and backtrack from the bottleneck node to the parameter configuration layer to obtain an effective set of adjustments. The adjustment module is used to set the dimension of parameters that are not in the effective adjustment set to zero to reduce the action space, and iteratively perform parameter adjustment within the reduced action space to obtain the target parameter configuration vector; The traversal module is used to perform a forward traversal of the adjustment parameters of the target parameter configuration vector through the three-layer causal directed acyclic graph to obtain the causal path sequence, and calculate the causal contribution by multiplying the causal edge weights and parameter adjustment magnitudes in the causal path sequence.
8. A system-level optimization device for computing server systems designed for high-load scenarios, characterized in that, It includes a memory and a processor, wherein the memory stores a computer program that can run on the processor, and the processor executes the computer program to implement the computing server system layer optimization method for high-load scenarios as described in any one of claims 1 to 6.
9. A computer-readable storage medium having a computer program stored thereon, characterized in that, When the computer program is run by the processor, it causes the processor to execute the computing server system layer optimization method for high-load scenarios as described in any one of claims 1 to 6.