Server Performance Optimization Processing Method, Device, Storage Medium and Program Product
By analyzing the historical performance data of the server and generating optimization strategies, the problem of inability to effectively reveal potential performance problems in the existing technology is solved, and the performance optimization effect of the server is improved.
Patent Information
- Application Number
- CN202510423301.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2025-04-07
- Publication Date
- 2025-06-24
- Estimated Expiration
- 2045-04-07
AI Technical Summary
In the prior art, real-time data analysis of servers cannot effectively reveal potential performance problems, resulting in reduced performance optimization effects.
By obtaining the historical performance data of the server, extracting resource parameter performance data, trend parameter performance data, associated parameter performance data and fluctuation parameter performance data, generating corresponding evaluation information and trend information, and combining this information to generate a server optimization strategy.
It improves the performance optimization effect of the server, can reveal potential performance issues more comprehensively, and improves the work efficiency and user experience of the server.
Smart Images

Figure CN119938483B_ABST
Abstract
Description
Technical Field
[0001] This application relates to the technical field of servers, and particularly to a method, device, storage medium and program product for optimizing server performance. Background Art
[0002] A server is a device that provides computing power and runs software applications in a network environment, providing computing and application services in the network. When performing complex computing tasks, the server may experience performance problems such as lag and response latency, affecting the user experience and the server's work efficiency. When performance problems occur in the server, it is necessary to analyze and optimize the server in a timely manner to avoid affecting the user experience.
[0003] In related technologies, by obtaining the real-time data of the server and analyzing the real-time data, the performance of the server is optimized. However, in related technologies, the real-time data of the server is data within a period of time, usually relatively short. When analyzing short-term server data and generating optimization strategies, potential performance problems of the server cannot be revealed, resulting in a reduction in the performance optimization effect of the server. Summary of the Invention
[0004] This application provides a method, device, storage medium and program product for optimizing server performance, so as to at least solve the problem of reduced performance optimization effect of the server in related technologies.
[0005] This application provides a method for optimizing server performance, including:
[0006] Obtaining historical performance data of multiple parameters of any server to be processed;
[0007] Obtaining resource parameter performance data from the historical performance data of multiple parameters, and generating resource evaluation information of multiple parameters according to the resource parameter performance data;
[0008] Obtaining trend parameter performance data from the historical performance data of multiple parameters, and generating change trend information of multiple parameters according to the trend parameter performance data;
[0009] Obtaining correlation parameter performance data from the historical performance data of multiple parameters, and generating correlation information of multiple parameters according to the correlation parameter performance data;
[0010] Obtaining fluctuation parameter performance data from the historical performance data of multiple parameters, and generating fluctuation information of multiple parameters according to the fluctuation parameter performance data;
[0011] Generating a server optimization strategy according to the resource evaluation information, change trend information, correlation information and fluctuation information;
[0012] Process the server according to the server optimization strategy.
[0013] This application also provides a server performance optimization processing device, including:
[0014] A first acquisition module, configured to acquire historical performance data of multiple parameters of any server to be processed;
[0015] A resource evaluation module, configured to acquire resource parameter performance data from the historical performance data of multiple parameters, and generate resource evaluation information of multiple parameters according to the resource parameter performance data;
[0016] A trend analysis module, configured to acquire trend parameter performance data from the historical performance data of multiple parameters, and generate change trend information of multiple parameters according to the trend parameter performance data;
[0017] A collaborative analysis module, configured to acquire associated parameter performance data from the historical performance data of multiple parameters, and generate association information of multiple parameters according to the associated parameter performance data;
[0018] A fault backtracking module, configured to acquire fluctuation parameter performance data from the historical performance data of multiple parameters, and generate fluctuation information of multiple parameters according to the fluctuation parameter performance data;
[0019] A policy generation module, configured to generate a server optimization policy according to the resource evaluation information, change trend information, association information, and fluctuation information;
[0020] A processing module, configured to process the server according to the server optimization policy.
[0021] This application also provides an electronic device, including: a memory, configured to store a computer program; a processor, configured to implement the steps of any of the above server performance optimization processing methods when executing the computer program.
[0022] This application also provides a computer-readable storage medium, in which a computer program is stored, and wherein the computer program implements the steps of any of the above server performance optimization processing methods when executed by a processor.
[0023] This application also provides a computer program product, including a computer program, and the computer program implements the steps of any of the above server performance optimization processing methods when executed by a processor.
[0024] Through this application, historical performance data of the server is obtained, and resource parameter performance data, trend parameter performance data, correlation parameter performance data, and fluctuation parameter performance data are obtained from the historical performance data. Resource evaluation information, trend change information, correlation information, and fluctuation information are generated, and a server optimization strategy is generated based on the resource evaluation information, trend change information, correlation information, and fluctuation information to optimize the server. Compared with the prior art, multiple pieces of information are obtained from the historical performance data, improving the performance optimization effect of the server. BRIEF DESCRIPTION OF THE DRAWINGS
[0025] To more clearly illustrate the embodiments of the present application, the accompanying drawings required for use in the embodiments will be briefly introduced below. Obviously, the accompanying drawings in the following description are only some embodiments of the present application. For those of ordinary skill in the art, other drawings can be obtained based on these drawings without creative efforts.
[0026] Figure 1 It is a schematic system structure diagram of the server provided by the embodiment of the present application;
[0027] Figure 2 It is a schematic flowchart of the server performance optimization processing method provided by the embodiment of the present application;
[0028] Figure 3 It is a schematic structure diagram of the server performance optimization processing device provided by the embodiment of the present application;
[0029] Figure 4 It is a schematic structure diagram of the electronic device provided by the present application. DETAILED DESCRIPTION OF THE EMBODIMENTS
[0030] The technical solutions in the embodiments of the present application will be clearly and completely described below with reference to the accompanying drawings in the embodiments of the present application. Obviously, the described embodiments are only some embodiments of the present application, rather than all embodiments. All other embodiments obtained by those of ordinary skill in the art based on the embodiments of the present application without creative efforts fall within the protection scope of the present application.
[0031] It should be noted that in the description of the present application, the terms "including", "comprising" or any other variant thereof are intended to cover a non-exclusive inclusion, such that a process, method, article or device including a series of elements includes not only those elements but also other elements not explicitly listed, or elements inherent to such process, method, article or device. The terms "first", "second", etc. in the present application are used to distinguish similar objects and are not used to describe a specific order or sequence.
[0032] First, the terms involved in the present application will be explained:
[0033] CPU: The Central Processing Unit (CPU for short) is the operation and control core of a computer system and the final execution unit for information processing and program operation.
[0034] IO: (Input Output) refers to the input / output device interface. The IO port is the connection circuit for exchanging information between the CPU and external devices and is connected to the CPU through a bus.
[0035] To solve the problem of reduced performance optimization effect of servers in related technologies, the technical concept proposed in the embodiments of this application is as follows: The inventor considered obtaining the historical performance data of the server, obtaining resource parameter performance data from the historical performance data, generating resource evaluation information based on the resource parameter performance data, considering obtaining trend parameter performance data from the historical performance data, generating change trend information based on the trend parameter performance data, considering obtaining correlation parameter performance data from the historical performance data, generating correlation information based on the correlation parameter performance data, considering obtaining fluctuation parameter performance data from the historical performance data, generating fluctuation information based on the fluctuation parameter performance data, and generating a server optimization strategy by combining the resource evaluation information, change trend information, correlation information, and fluctuation information, thereby improving the performance optimization effect of the server.
[0036] To enable those skilled in the art of this technology to better understand the solution of this application, the following further detailed description of this application will be given in conjunction with the accompanying drawings and specific implementation manners.
[0037] Combined with the specific application environment architecture or specific hardware architecture on which the execution of the server performance optimization processing method depends, the specific application environment architecture or specific hardware architecture will be described herein. Refer to Figure 1 , Figure 1 is the schematic system structure diagram of the server provided by the embodiments of this application. As Figure 1 shown, the server includes: a receiving device 101, a processing device 102, and an output device 103.
[0038] It can be understood that the structure schematically shown in the embodiments of this application does not constitute a specific limitation on the article recognition method. In some other feasible embodiments of this application, the above architecture may include more or fewer components than shown in the figure, or combine certain components, or split certain components, or have different component arrangements, which can be specifically determined according to the actual application scenario and will not be limited herein. Figure 1 The components shown can be implemented in hardware, software, or a combination of software and hardware.
[0039] In the specific implementation process, the receiving device 101 can be an input / output interface or a communication interface, and can obtain the historical performance data of multiple parameters of the server to be processed.
[0040] The processing device 102 can generate a server optimization strategy.
[0041] The output device 103 can be used to output the above server optimization strategy, etc.
[0042] It should be understood that the above processing device can be implemented by a processor reading and executing instructions in a memory, or can be implemented by a chip circuit.
[0043] In addition, the network architecture and service scenarios described in the embodiments of the present application are for more clearly explaining the technical solutions of the embodiments of the present application, and do not constitute a limitation on the technical solutions provided by the embodiments of the present application. Those of ordinary skill in the art know that with the evolution of the network architecture and the emergence of new service scenarios, the technical solutions provided by the embodiments of the present application are equally applicable to similar technical problems.
[0044] Figure 2 It is a schematic flowchart of the server performance optimization processing method provided by the embodiments of the present application. As Figure 2 shown, the embodiments of the present application provide a server performance optimization processing method, and the method is described in detail as follows:
[0045] S201: Obtain the historical performance data of multiple parameters of any server to be processed.
[0046] In this embodiment, the historical performance data of multiple parameters includes but is not limited to CPU, IO, memory, network latency, disk throughput, processes, and threads, etc.
[0047] In this embodiment, the process of collecting sensor data by the baseboard management controller firmware records the sensor data into a file and configures the sampling time for each sensor data.
[0048] S202: Obtain the resource parameter performance data from the historical performance data of multiple parameters, and generate resource evaluation information of multiple parameters according to the resource parameter performance data.
[0049] Specifically, obtain the resource utilization rate and resource occupation duration of multiple parameters, compare the resource utilization rate and resource occupation duration with the preset limits respectively, obtain the duration of the resource utilization rate tension state and the corresponding resource utilization rate, obtain the idle period of the resource utilization rate, and generate the resource evaluation information of multiple parameters.
[0050] S203: Obtain the trend parameter performance data from the historical performance data of multiple parameters, and generate the change trend information of the multiple parameters according to the trend parameter performance data.
[0051] Specifically, obtain the usage rate information of multiple parameters, calculate the weighted average according to the usage rate information, and judge the change trend of the parameters according to the magnitude of the weighted average.
[0052] Exemplarily, obtain the usage rate of the CPU, and calculate the change trend of the CPU usage rate within a period of time by the weighted average method.
[0053] S204: Obtain the associated parameter performance data from the historical performance data of multiple parameters, and generate the association information of the multiple parameters according to the associated parameter performance data.
[0054] Specifically, obtain the usage rates of multiple parameters in the same time period, normalize the usage rates of the multiple parameters, calculate the correlation coefficient of the normalized usage rates, and judge the changes of other parameters caused by the change of a certain parameter according to the correlation coefficient, and generate the association information.
[0055] S205: Obtain the fluctuation parameter performance data from the historical performance data of multiple parameters, and generate the fluctuation information of the multiple parameters according to the fluctuation parameter performance data.
[0056] Specifically, when an exception occurs in the server, obtain the historical data for a period of time before the occurrence of the exception, perform a retrospective analysis on the historical data for the previous period of time, and judge whether there is a performance fluctuation.
[0057] Among them, the retrospective time is set by the performance benchmark setting module.
[0058] In this embodiment, after generating the fluctuation information of multiple parameters, obtain the peak parameter performance data from the historical performance data of multiple parameters.
[0059] Specifically, according to the preset statistical period, call the peak recognition function to identify the time when the parameter generating the peak exceeds the threshold and the corresponding usage rate, generate a system event log, and judge whether the operation generating the peak is an abnormal operation according to the system event log.
[0060] Among them, the content recorded in the system event log includes but is not limited to the operation records of users, firmware upgrades, and user requests, etc.
[0061] S206: Generate a server optimization strategy according to the resource evaluation information, change trend information, association information, and fluctuation information.
[0062] Specifically, short-term fluctuations in the fluctuation information are screened, combined with the resource evaluation information, parameters with high resource occupancy rate and frequent fluctuations are analyzed and determined as problem parameters, and based on the change trend information and correlation information, abnormalities of other parameters caused by the problem parameters are determined and identified as associated problem parameters. Server optimization strategies are generated respectively according to the types of the problem parameters and the associated problem parameters.
[0063] S207: Process the server according to the server optimization strategy.
[0064] Specifically, the problem types corresponding to the problem parameters and the associated problem parameters are optimized respectively according to the server optimization strategy to optimize the server.
[0065] As can be seen from the above embodiments, by obtaining the historical performance data of the server, resource parameter performance data, trend parameter performance data, correlation parameter performance data, and fluctuation parameter performance data are obtained from the historical performance data, resource evaluation information, trend change information, correlation information, and fluctuation information are generated, and server optimization strategies are generated according to the resource evaluation information, trend change information, correlation information, and fluctuation information to optimize the server. Compared with the prior art, multiple pieces of information are obtained from the historical performance data, improving the performance optimization effect of the server.
[0066] In an embodiment of the present application, step S202 includes:
[0067] S2021: Obtain the resource utilization rate and resource occupancy duration of multiple parameters from the historical performance data of multiple parameters.
[0068] In this embodiment, the resource utilization rate of multiple parameters includes the resource utilization rate when the resources are idle and when the resources are in short supply.
[0069] Exemplarily, the resource utilization rate of multiple parameters includes but is not limited to the resource utilization rate of the CPU, the resource utilization rate of the IO, and the resource utilization rate of the memory.
[0070] In this embodiment, the resource occupancy duration is the resource occupancy duration in the state of resource shortage.
[0071] S2022: Compare the resource utilization rate of multiple parameters with the preset range value of the resource utilization rate to obtain the resource utilization rate information of multiple parameters.
[0072] In this embodiment, the range value of the resource utilization rate is set by the performance benchmark setting module.
[0073] Exemplarily, the performance benchmark values recorded in the performance benchmark setting module can be: the percentage values of CPU, IO, and memory usage rates in resource idle and resource tense states, as well as the longest duration in the resource tense state, or can be: the time of historical data of CPU, IO, and memory usage rates traced back when the system fails.
[0074] Among them, the setting methods of the performance benchmark values include:
[0075] For the system within a preset period of time, the average value of multiple performance index data values in the stable operation state is taken as the performance benchmark value.
[0076] The performance benchmark values directly input in the configuration file.
[0077] S2023: Compare the resource occupation durations of multiple parameters with the preset resource occupation duration limit values to obtain the resource occupation duration information of multiple parameters.
[0078] Specifically, obtain the resource occupation rate in the resource tense state, and at the same time obtain the resource occupation duration information exceeding the preset resource occupation rate limit value, and compare it with the preset resource occupation duration limit value to obtain the resource occupation duration information of multiple parameters.
[0079] Exemplarily, in the resource tense state, set the occupation rate limit value of the CPU to 65%, obtain the resource occupation duration when the actual occupation rate of the CPU exceeds 65%, and compare it with the preset resource occupation duration limit value in the resource tense state.
[0080] S2024: Generate the resource evaluation information of multiple parameters according to the resource utilization information of multiple parameters and the resource occupation duration information of multiple parameters.
[0081] Specifically, according to the resource utilization information of multiple parameters and the resource occupation duration information of multiple parameters, evaluate the resource occupation situation of each parameter to generate the resource evaluation information.
[0082] As can be seen from the above embodiments, by obtaining the resource utilization rate and resource occupation duration of multiple parameters, comparing the resource utilization rate with the range value of the resource utilization rate, obtaining the resource utilization rate information of resource utilization rate idle and exceeding the range value, comparing the resource occupation duration with the resource occupation duration limit value, obtaining the resource occupation duration information exceeding the limit value, recording the resource utilization rate information and resource occupation duration information to generate the resource evaluation information, and optimizing the parameters exceeding the resource occupation duration and the range value of the resource utilization rate.
[0083] In an embodiment of the present application, step S203 includes:
[0084] S2031: Obtain the utilization rate information of multiple parameters from the historical performance data of multiple parameters.
[0085] In this embodiment, the utilization rate information of multiple parameters includes but is not limited to CPU utilization rate, IO utilization rate, and memory utilization rate.
[0086] S2032: Calculate the weighted average values of multiple parameters based on the utilization rate information of multiple parameters.
[0087] In this embodiment, the formula for calculating the weighted average values of multiple parameters is:
[0088]
[0089] In the formula, represents the weighted average value of the parameter at time t; represents the weight coefficient; represents the parameter data at time t - i + 1; represents the number of parameters.
[0090] In this embodiment, the weight coefficient can be a linearly decreasing weight or an exponentially decreasing weight.
[0091] S2033: Generate the change trend information of multiple parameters based on the weighted average values of multiple parameters.
[0092] Exemplarily, if the weighted average value of the CPU shows an upward trend of 10%, 30%, and 50%, it is determined that the usage amount of the CPU increases.
[0093] Exemplarily, if the weighted average value of the CPU shows a downward trend of 70%, 50%, and 10%, it is determined that the usage amount of the CPU decreases.
[0094] Exemplarily, if the weighted average value of the CPU fluctuates within the utilization rate limit range, it is determined that the utilization rate of the CPU is stable.
[0095] As can be seen from the above embodiments, by using the weighted moving average method to calculate the weighted average value of each parameter, based on the weighted average value of each parameter, the change trend of multiple parameters is obtained, and the change trend of the parameters is judged by the weighted moving average method, which improves the timeliness of historical data and reduces the noise in the data.
[0096] In an embodiment of the present application, step S204 includes:
[0097] S2041: Obtain the utilization rate information of multiple parameters in the same time period from the historical performance data of multiple parameters.
[0098] Specifically, the usage rates of multiple parameters in the same time period are normalized. After mapping the usage rate data to the range of 0 to 1, the correlation coefficients of the multiple parameters are calculated.
[0099] In this embodiment, the usage rates of multiple parameters in the same time period include, but are not limited to, CPU usage rate, IO usage rate, and memory usage rate.
[0100] S2042: Calculate the correlation coefficients of multiple parameters based on the usage rate information of the multiple parameters.
[0101] In this embodiment, the formula for calculating the correlation coefficients of multiple parameters is:
[0102]
[0103] In the formula, represents the correlation coefficient between parameter X and parameter Y; represents the covariance between parameter X and parameter Y; represents the variance of parameter X; represents the variance of parameter Y.
[0104] S2043: Generate the association information of multiple parameters based on the correlation coefficients.
[0105] In this embodiment, the value range of the correlation coefficient is from -1 to 1.
[0106] Among them, a correlation coefficient of -1 indicates a positive correlation, that is, when one variable increases, the other variable also increases proportionally.
[0107] Among them, a correlation coefficient of 1 indicates a negative correlation, that is, when one variable increases, the other variable decreases proportionally.
[0108] Among them, a correlation coefficient of 0 indicates that there is no correlation relationship between the two variables.
[0109] As can be seen from the above embodiments, by calculating the correlation coefficients of multiple parameters and judging whether the change of a certain parameter will cause the change of strongly correlated parameters according to the correlation coefficients, the accuracy of generating the optimization strategy is improved according to the association information between the parameters.
[0110] In an embodiment of the present application, after step S207, it further includes:
[0111] S208: Collect the performance data of the optimized server, and generate optimization feedback information based on the performance data of the optimized server.
[0112] In this embodiment, the performance data of the optimized server includes, but is not limited to, CPU usage rate, IO usage rate, and memory usage rate.
[0113] S209: Obtain the performance data of multiple parameters in the optimization feedback information.
[0114] Specifically, obtain the performance data of multiple parameters in the optimization feedback information, and judge the performance data of the optimized resource parameters, trend parameters, correlation parameters, and fluctuation parameters.
[0115] S210: If the performance data of multiple parameters in the optimization feedback information do not meet the preset parameter thresholds, generate a new server optimization strategy according to the optimization feedback information.
[0116] Specifically, compare the performance data of the optimized resource parameters, trend parameters, correlation parameters, and fluctuation parameters with the corresponding preset parameter thresholds. If the performance data of multiple parameters in the optimization feedback information do not meet the preset parameter thresholds, generate a new optimization strategy.
[0117] As can be seen from the above embodiments, by applying the generated optimization strategy to optimize the server, collecting the performance data of the optimized server, generating optimization feedback information based on the performance data, judging whether each parameter in the optimization feedback information meets the preset parameter thresholds. If it does not meet the parameter thresholds, the server performance optimization system generates a new optimization strategy according to the optimization feedback information to adapt to the changing server environment.
[0118] In an embodiment of the present application, step S206 includes:
[0119] S2061: Screen the short-term fluctuation information in the fluctuation information to obtain the screened fluctuation information.
[0120] In this embodiment, obtain the short-term fluctuations in the fluctuation information, judge whether the short-term fluctuations are caused by abnormal server operations, and obtain the screened fluctuation information.
[0121] S2062: Determine the problem parameters to be optimized according to the screened fluctuation information and resource evaluation information.
[0122] Specifically, according to the screened fluctuation information and resource evaluation information, determine the parameters that frequently fluctuate and have a high resource occupancy rate for a long time, and determine them as problem parameters.
[0123] S2063: Determine the associated problem parameters of the problem parameters according to the change trend information and correlation information.
[0124] Specifically, according to the change trend information and correlation information, determine the parameters that cause changes when the problem parameters change, and determine them as associated problem parameters.
[0125] S2064: Determine the parameter types corresponding to the problem parameters and the linkage problem parameters to generate corresponding server optimization strategies.
[0126] Specifically, server optimization strategies are generated respectively according to the types of problem parameters and linkage problem parameters.
[0127] The generated server optimization strategy includes at least one optimization strategy.
[0128] It can be seen from the above embodiments that by screening the fluctuation information, the interference of short-term fluctuation information on the formulation of optimization strategies is screened out, and the problem parameters to be optimized are determined by combining the screened fluctuation information and resource evaluation information. According to the parameter change trend and the correlation information of multiple parameters, the parameters affected by the linkage of the problem parameters are determined, and optimization strategies are generated for the problem parameters and the linkage parameters of the problem parameters at the same time to improve the performance of the server.
[0129] In one embodiment of the present application, after step S2064, the method further includes:
[0130] S2065: Simulate and apply the generated multiple server optimization strategies to the server to generate simulation results corresponding to the multiple server optimization strategies.
[0131] Specifically, through simulation software, multiple server optimization strategies are simulated respectively, the server optimization effects corresponding to the optimization strategies are obtained, and simulation results are generated.
[0132] S2066: Calculate simulation scores of simulation results corresponding to multiple server optimization strategies according to preset evaluation weights.
[0133] Specifically, according to the preset evaluation weights of the problem parameters in the server, the simulation score is calculated according to the optimization effect of the server in the simulation results.
[0134] S2067: Apply the corresponding server optimization strategy to the server according to the simulation score.
[0135] Specifically, the optimization strategies with high simulation scores are selected and applied to the optimization server.
[0136] It can be seen from the above embodiments that by simulating and applying multiple optimization strategies to the server to be optimized, the optimization effects of multiple optimization strategies are determined, the scores of the simulation results are calculated according to the simulation results and preset evaluation weights, and the optimization strategies corresponding to the simulation results with high scores are selected to optimize the servers, thereby improving the optimization effect of the servers.
[0137] In one embodiment of the present application, the problem parameters include but are not limited to at least one of a central processing unit parameter, a data exchange interface parameter, and a memory parameter.
[0138] In an embodiment of the present application, when the problem parameter is a central processing unit parameter, the server optimization strategy includes:
[0139] Obtain the blocking operation data corresponding to the problem parameter.
[0140] In this embodiment, the blocking operation data causing the problem parameter includes, but is not limited to, network requests, reading and writing files, and database queries.
[0141] Encapsulate the blocking operation data into an asynchronous task.
[0142] Specifically, encapsulate the blocking operation data into an asynchronous function and record the asynchronous function in the asynchronous task.
[0143] Execute the asynchronous task according to the task scheduler to process the server to be processed.
[0144] Specifically, trigger the execution of the asynchronous task through the task scheduler, capture the operation result through the callback function, and optimize the server.
[0145] In this embodiment, when the problem parameter is a central processing unit parameter, the server optimization strategy includes, but is not limited to, asynchronous programming, load balancing, algorithm optimization, and CPU process binding.
[0146] Among them, the load balancing method includes: through the load balancer, distribute the requests in the server to different servers in the distributed system to avoid overloading a single server.
[0147] Among them, the CPU process binding method includes: set the CPU affinity of the process, bind the process with high resource utilization to the core of the CPU, reduce the context switch, and improve the cache hit rate.
[0148] As can be seen from the above embodiment, through asynchronous programming, encapsulate the blocking operation into an asynchronous task, execute the asynchronous task through the task scheduler, trigger the asynchronous operation, ensure that the operation of the main thread is not blocked, and reduce the utilization rate of the central processing unit parameter of the server.
[0149] In an embodiment of the present application, when the problem parameter is a memory parameter, the server optimization strategy includes:
[0150] Obtain the data capacity of the program to be run.
[0151] In this embodiment, the data capacity is the data size of the program to be run.
[0152] Specifically, obtain the data size of the program to be run, divide a continuous memory in the memory pool according to the data size, cut the continuous memory into memory blocks with equal capacity, and mark the memory blocks through the free list.
[0153] Match the free memory blocks in the memory pool according to the data capacity of the program to be run.
[0154] Specifically, when the program to be run requests memory, retrieve the memory block through the free list. If there are insufficient free memory blocks, dynamically expand the memory pool.
[0155] Call the free memory block through the free list to run the program in the memory call request.
[0156] Specifically, call the free memory block through the free list, mark the status of the memory block from free to used, and the program to be run runs the program in the memory block.
[0157] When the program in the memory call request finishes running, deposit the free memory block into the memory pool through the free list to process the server to be processed.
[0158] Specifically, when the program to be run finishes running, release the memory block. The free list deposits the memory block into the memory pool and marks the status as free.
[0159] In this embodiment, when the problem parameter is a memory parameter, the optimization strategies of the server include but are not limited to memory pool technology, object pool technology, memory compression, memory monitoring, and memory optimization.
[0160] Among them, for objects that are frequently created and destroyed, use the object pool technology to reuse the objects and avoid repeated creation.
[0161] Among them, through the memory analysis tool, detect the memory, obtain the abnormal memory usage record, and monitor the memory access process.
[0162] As can be seen from the above embodiments, through the memory pool technology, allocate the memory area according to the program to be run, obtain the adapted memory block, call the memory block to run the program through the free list, and when the program finishes running, deposit the memory block back into the memory pool, avoiding repeated calls of the memory block and matching the appropriate memory block according to the program data capacity, reducing the usage rate of the memory parameter of the server.
[0163] In an embodiment of the present application, when the problem parameter is a data interaction interface parameter, the server optimization strategy includes:
[0164] Call the asynchronous data interaction interface function through the application process to send the data to be processed to the kernel.
[0165] Specifically, initialize the asynchronous IO environment, configure the asynchronous context, call the IO function, and send an IO operation to the kernel.
[0166] Write the data to be processed into the kernel buffer through the kernel.
[0167] Specifically, the kernel receives an I / O operation and reads data from the disk into the kernel buffer.
[0168] After the data to be processed is written, the data to be processed is sent to the service buffer through the kernel to process the server to be processed.
[0169] Specifically, after the kernel finishes reading the data, it copies and sends the data in the kernel buffer to the service buffer, and notifies the application process that the I / O operation is completed through a predefined callback function. The application process processes the I / O completion event in the event loop and executes the callback function.
[0170] In this embodiment, when the problem parameter is a data interaction interface parameter, the optimization strategies of the server include but are not limited to caching technology, asynchronous I / O, and file system optimization.
[0171] As can be seen from the above embodiments, through the method of the asynchronous data interaction interface, the data to be processed is sent to the kernel and written into the kernel buffer. The kernel takes over the data interaction operation to write the data to be processed into the buffer to avoid repeated reading and writing of data. After the data to be processed is written, the data to be processed is sent to the service buffer, and the data to be processed is directly read through the service buffer to avoid data blocking, reduce context switching, and thus reduce the usage rate of the data interaction interface of the server.
[0172] Through the description of the above embodiments, those skilled in the art can clearly understand that the method according to the above embodiments can be implemented by means of software plus a necessary general hardware platform. Of course, it can also be implemented by hardware, but in many cases the former is a better implementation.
[0173] Figure 3 It is a schematic structural diagram of a server performance optimization processing device provided by an embodiment of the present application. As Figure 3 shown, an embodiment of the present application also provides a server performance optimization processing device 30, including: a first acquisition module 301, a resource evaluation module 302, a trend analysis module 303, a collaborative analysis module 304, a fault backtracking module 305, a policy generation module 306, and a processing module 307.
[0174] The first acquisition module 301 is used to acquire historical performance data of multiple parameters of any server to be processed.
[0175] The resource evaluation module 302 is used to acquire resource parameter performance data from the historical performance data of multiple parameters, and generate resource evaluation information of multiple parameters according to the resource parameter performance data.
[0176] The trend analysis module 303 is used to acquire trend parameter performance data from the historical performance data of multiple parameters, and generate change trend information of multiple parameters according to the trend parameter performance data.
[0177] The collaborative analysis module 304 is configured to obtain associated parameter performance data from the historical performance data of multiple parameters, and generate association information of the multiple parameters according to the associated parameter performance data.
[0178] The fault backtracking module 305 is configured to obtain fluctuating parameter performance data from the historical performance data of multiple parameters, and generate fluctuation information of the multiple parameters according to the fluctuating parameter performance data.
[0179] The policy generation module 306 is configured to generate a server optimization policy according to the resource evaluation information, the change trend information, the association information, and the fluctuation information.
[0180] The processing module 307 is configured to process the server according to the server optimization policy.
[0181] In an embodiment of the present application, the resource evaluation module 302 includes:
[0182] The first obtaining unit is configured to obtain the resource utilization rate and the resource occupation duration of multiple parameters from the historical performance data of the multiple parameters.
[0183] The first comparison unit is configured to compare the resource utilization rate of the multiple parameters with a preset range value of the resource utilization rate to obtain the resource utilization rate information of the multiple parameters.
[0184] The second comparison unit is configured to compare the resource occupation duration of the multiple parameters with a preset limit value of the resource occupation duration to obtain the resource occupation duration information of the multiple parameters.
[0185] The first generation unit is configured to generate resource evaluation information of the multiple parameters according to the resource utilization rate information of the multiple parameters and the resource occupation duration information of the multiple parameters.
[0186] In an embodiment of the present application, the trend analysis module 303 includes:
[0187] The second obtaining unit is configured to obtain the usage rate information of multiple parameters from the historical performance data of the multiple parameters.
[0188] The first calculation unit is configured to calculate a weighted average value of the multiple parameters according to the usage rate information of the multiple parameters.
[0189] The second generation unit is configured to generate change trend information of the multiple parameters according to the weighted average value of the multiple parameters.
[0190] In an embodiment of the present application, the collaborative analysis module 304 includes:
[0191] A third acquisition unit, configured to acquire the utilization rate information of multiple parameters in the same period from the historical performance data of the multiple parameters.
[0192] A second calculation unit, configured to calculate the correlation coefficients of the multiple parameters according to the utilization rate information of the multiple parameters.
[0193] A third generation unit, configured to generate the correlation information of the multiple parameters according to the correlation coefficients.
[0194] In an embodiment of the present application, the server performance optimization processing device 30 further includes:
[0195] An acquisition module, configured to acquire the performance data of the optimized server and generate optimization feedback information according to the performance data of the optimized server.
[0196] A second acquisition module, configured to acquire the performance data of multiple parameters in the optimization feedback information.
[0197] A generation module, configured to generate a new server optimization strategy according to the optimization feedback information if the performance data of the multiple parameters in the optimization feedback information does not meet the preset parameter threshold.
[0198] In an embodiment of the present application, the policy generation module 306 includes:
[0199] A screening unit, configured to screen the short-term fluctuation information in the fluctuation information to obtain the screened fluctuation information.
[0200] A first determination unit, configured to determine the problem parameters to be optimized according to the screened fluctuation information and the resource evaluation information.
[0201] A second determination unit, configured to determine the associated problem parameters of the problem parameters according to the change trend information and the correlation information.
[0202] A third determination unit, configured to determine the parameter types corresponding to the problem parameters and the associated problem parameters to generate corresponding server optimization strategies.
[0203] In an embodiment of the present application, the policy generation module 306 further includes:
[0204] A simulation unit, configured to simulate and apply the generated multiple server optimization strategies to the server to generate simulation results corresponding to the multiple server optimization strategies.
[0205] A third calculation unit, configured to calculate the simulation scores of the simulation results corresponding to the multiple server optimization strategies according to the preset evaluation weights.
[0206] An application unit, configured to apply the corresponding server optimization strategy to the server according to the simulation scores.
[0207] In one embodiment of the present application, when the problem parameter is a central processing unit parameter, the third determination unit includes:
[0208] A first acquisition subunit, configured to acquire blocked operation data corresponding to the problem parameter.
[0209] An encapsulation subunit, configured to encapsulate the blocked operation data into an asynchronous task.
[0210] An execution subunit, configured to execute the asynchronous task according to a task scheduler to process the server to be processed.
[0211] In one embodiment of the present application, when the problem parameter is a memory parameter, the third determination unit includes:
[0212] A second acquisition subunit, configured to acquire the data capacity of the program to be run.
[0213] A matching subunit, configured to match free memory blocks in the memory pool according to the data capacity of the program to be run.
[0214] An invocation subunit, configured to invoke free memory blocks through a free list to run the program in the memory invocation request.
[0215] A storage subunit, configured to, when the program in the memory invocation request finishes running, store the free memory blocks into the memory pool through the free list to process the server to be processed.
[0216] For the description of the features in the corresponding embodiments of the server performance optimization processing device, reference may be made to the relevant description in the corresponding embodiments of the server performance optimization processing method, which will not be elaborated here one by one.
[0217] Figure 4 It is a schematic structural diagram of the electronic device provided by the present application. As Figure 4 shown, the electronic device 40 provided in this embodiment includes: at least one processor 401 and a memory 402. Optionally, the electronic device 40 further includes a communication component 403. Among them, the processor 401, the memory 402, and the communication component 403 are connected through a bus.
[0218] In a specific implementation process, at least one processor 401 executes computer execution instructions stored in the memory 402, so that at least one processor 401 executes the above-mentioned server performance optimization processing method embodiment.
[0219] For the specific implementation process of the processor 401, reference may be made to the above-mentioned method embodiment, and its implementation principle and technical effects are similar, which will not be elaborated here in this embodiment.
[0220] In the above embodiments, it should be understood that the processor may be a central processing unit (CPU), or may also be other general-purpose processors, digital signal processors (DSPs), application specific integrated circuits (ASICs), etc. The general-purpose processor may be a microprocessor or the processor may also be any conventional processor, etc. The steps of the method disclosed in combination with the application can be directly implemented by a hardware processor, or implemented by a combination of hardware and software modules in the processor.
[0221] The memory may include a random access memory (RAM), and may also include a non-volatile memory (NVM), such as at least one disk memory.
[0222] The bus may be an industry standard architecture (ISA) bus, a peripheral component interconnect (PCI) bus, an extended industry standard architecture (EISA) bus, etc. The bus can be divided into an address bus, a data bus, a control bus, etc. For the sake of representation, the bus in the drawings of this application is not limited to only one bus or one type of bus.
[0223] The embodiments of the present application also provide a computer-readable storage medium, in which a computer program is stored, and the computer program is configured to execute the steps in any of the above embodiments of the server performance optimization processing method when running.
[0224] In an exemplary embodiment, the above computer-readable storage medium may include, but is not limited to: USB flash drives, read-only memories (ROMs), random access memories (RAMs), mobile hard disks, magnetic disks, or optical discs, etc., various media that can store computer programs.
[0225] The embodiments of the present application also provide a computer program product, the above computer program product includes a computer program, and when the computer program is executed by a processor, it implements the steps in any of the above embodiments of the server performance optimization processing method.
[0226] Embodiments of the present application also provide another computer program product, including a non-volatile computer-readable storage medium storing a computer program, where the computer program, when executed by a processor, implements the steps in any of the above-described embodiments of the server performance optimization processing method.
[0227] Those skilled in the art can further realize that the units and algorithm steps of each example described in combination with the embodiments disclosed herein can be implemented by electronic hardware, computer software, or a combination of both. To clearly illustrate the interchangeability of hardware and software, the composition and steps of each example have been generally described according to functions in the above description. Whether these functions are executed in a hardware or software manner depends on the specific application and design constraints of the technical solution. Skilled professionals can use different methods to implement the described functions for each specific application, but such implementation should not be considered to exceed the scope of the present application.
[0228] The above has introduced in detail a server performance optimization processing method, device, storage medium, and program product provided by the present application. Specific examples are used herein to elaborate on the principle and implementation manner of the present application. The description of the above embodiments is only used to help understand the method and its core idea of the present application. It should be noted that for those of ordinary skill in the art, without departing from the principle of the present application, several improvements and modifications can be made to the present application, and these improvements and modifications also fall within the protection scope of the claims of the present application.
Claims
1. A server performance optimization processing method, characterized in that: include: Obtain historical performance data of multiple parameters of any server to be processed; Acquire resource parameter performance data from the historical performance data of the plurality of parameters, and generate resource evaluation information of the plurality of parameters according to the resource parameter performance data; Acquire trend parameter performance data from the historical performance data of the multiple parameters, and generate change trend information of the multiple parameters according to the trend parameter performance data; Acquire associated parameter performance data from the historical performance data of the plurality of parameters, and generate correlation information of the plurality of parameters according to the associated parameter performance data; Acquire fluctuation parameter performance data from the historical performance data of the plurality of parameters, and generate fluctuation information of the plurality of parameters according to the fluctuation parameter performance data; Generate a server optimization strategy according to the resource evaluation information, the change trend information, the correlation information and the fluctuation information; Processing the server according to the server optimization strategy; Generating a server optimization strategy according to the resource evaluation information, the change trend information, the correlation information and the fluctuation information includes: filtering the short-term fluctuation information in the fluctuation information to obtain filtered fluctuation information; Determine the problem parameters to be optimized according to the filtered fluctuation information and the resource evaluation information; Determining linkage question parameters of the question parameters according to the change trend information and the correlation information; Determine the parameter types corresponding to the problem parameters and the linkage problem parameters to generate a corresponding server optimization strategy.
2. The server performance optimization processing method according to claim 1, characterized in that: The acquiring resource parameter performance data from the historical performance data of the multiple parameters, and generating resource evaluation information of the multiple parameters according to the resource parameter performance data, includes: Acquire resource utilization and resource occupation duration of the multiple parameters from historical performance data of the multiple parameters; Comparing the resource utilization rates of the multiple parameters with a preset range of resource utilization rates to obtain resource utilization rate information of the multiple parameters; Compare the resource occupation durations of the multiple parameters with preset resource occupation duration limits to obtain resource occupation duration information of the multiple parameters; Resource evaluation information of the multiple parameters is generated according to the resource utilization information of the multiple parameters and the resource occupation duration information of the multiple parameters.
3. The server performance optimization processing method according to claim 1, characterized in that: The acquiring trend parameter performance data from the historical performance data of the multiple parameters, and generating the change trend information of the multiple parameters according to the trend parameter performance data, includes: Acquire usage information of the plurality of parameters from historical performance data of the plurality of parameters; Calculating a weighted average value of the multiple parameters according to the usage rate information of the multiple parameters; The change trend information of the multiple parameters is generated according to the weighted average values of the multiple parameters.
4. The server performance optimization processing method according to claim 3, characterized in that: The formula for calculating the weighted average of the multiple parameters is: In the formula, represents the weighted average of the parameters at time t; represents the weight coefficient; Represents parameter data at time t-i+1; Indicates the number of parameters.
5. The server performance optimization processing method according to claim 1, characterized in that: The acquiring the associated parameter performance data from the historical performance data of the multiple parameters, and generating the correlation information of the multiple parameters according to the associated parameter performance data, includes: Acquire usage rate information of the multiple parameters in the same period from the historical performance data of the multiple parameters; Calculate the correlation coefficients of the multiple parameters according to the usage rate information of the multiple parameters; The correlation information of the plurality of parameters is generated according to the correlation coefficient.
6. The server performance optimization processing method according to claim 5, characterized in that: The formula for calculating the correlation coefficients of the multiple parameters is: In the formula, Represents the correlation coefficient between parameter X and parameter Y; Represents the covariance of parameters X and Y; represents the variance of parameter X; Represents the variance of parameter Y.
7. The server performance optimization processing method according to claim 1, characterized in that: After processing the server according to the server optimization strategy, the method further includes: Collecting performance data of the optimized server, and generating optimization feedback information according to the performance data of the optimized server; Acquiring performance data of multiple parameters in the optimization feedback information; If the performance data of multiple parameters in the optimization feedback information do not meet the preset parameter thresholds, a new server optimization strategy is generated according to the optimization feedback information.
8. The server performance optimization processing method according to claim 1, characterized in that: After determining the parameter types corresponding to the problem parameters and the linkage problem parameters to generate the corresponding server optimization strategy, the method further includes: Simulate and apply the generated multiple server optimization strategies to the server to generate simulation results corresponding to the multiple server optimization strategies; Calculate the simulation scores of the simulation results corresponding to the multiple server optimization strategies according to the preset evaluation weights; A corresponding server optimization strategy is applied to the server according to the simulation score.
9. The server performance optimization processing method according to claim 1, characterized in that: The problem parameters include but are not limited to: at least one of a CPU parameter, a data exchange interface parameter and a memory parameter.
10. The server performance optimization processing method according to claim 9, characterized in that: When the problem parameter is a CPU parameter, the server optimization strategy includes: Obtaining blocking operation data corresponding to the problem parameters; Encapsulating the blocking operation data as an asynchronous task; The asynchronous task is executed according to the task scheduler to process the server to be processed.
11. The server performance optimization processing method according to claim 9, characterized in that: When the problem parameter is a memory parameter, the server optimization strategy includes: Get the data capacity of the program to be run; Matching free memory blocks in the memory pool according to the data capacity of the program to be run; Call the free memory block through the free linked list to run the program in the memory call request; When the program in the memory call request is finished running, the free memory block is stored in the memory pool through the free linked list to process the server to be processed.
12. An electronic device, characterized in that: include: Memory for storing computer programs; A processor, used to implement the steps of the server performance optimization processing method as described in any one of claims 1 to 11 when executing the computer program.
13. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores a computer program, wherein the computer program, when executed by a processor, implements the steps of the server performance optimization processing method according to any one of claims 1 to 11.
14. A computer program product comprising a computer program, characterized in that When the computer program is executed by a processor, the steps of the server performance optimization processing method as described in any one of claims 1 to 11 are implemented.
Citation Information
Patent Citations
Big data machine learning-based intelligent server operation and maintenance method and computer equipment
CN108446200A
Capacity data processing method and device, electronic equipment and storage medium
CN117093439A