Server performance optimization processing method and device, storage medium and program product
By analyzing the historical performance data of the server, generating resource evaluation information, trend change information, correlation information and fluctuation information, combined with these information generation optimization strategies, the problem of inability to effectively reveal potential server performance problems in the existing technology and improving the performance optimization effect of the server.
Patent Information
- Application Number
- CN202510423301.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-04-07
- Publication Date
- 2025-05-06
- Estimated Expiration
- 2045-04-07
AI Technical Summary
When analyzing short-time real-time data of the server, the prior art cannot effectively reveal the potential performance problems of the server, resulting in a reduced performance optimization effect.
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.
By obtaining multiple information from historical data, the server's performance optimization effect is improved, and potential performance problems can be more accurately identified and solved.
Smart Images

Figure CN119938483A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of server technology, and in particular to a server performance optimization processing method, device, storage medium and program product. 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 a server performs complex computing tasks, performance issues such as freezes and response delays may occur, affecting the user experience and the server's work efficiency. When a server has performance issues, it is necessary to analyze and optimize the server in a timely manner to avoid affecting the user experience.
[0003] In the related art, the real-time data of the server is obtained and analyzed to optimize the performance of the server. However, in the related art, the real-time data of the server is data within a time period, which is usually short. When analyzing the short-term server data and generating an optimization strategy, it is impossible to reveal the potential performance problems of the server, resulting in a reduced performance optimization effect on the server. Summary of the invention
[0004] The present application provides a server performance optimization processing method, device, storage medium and program product to at least solve the problem of reduced performance optimization effect on the server in the related art.
[0005] The present application provides a server performance optimization processing method, including:
[0006] Obtain historical performance data of multiple parameters of any server to be processed;
[0007] Acquire resource parameter performance data from historical performance data of multiple parameters, and generate resource evaluation information of multiple parameters based on the resource parameter performance data;
[0008] Obtaining trend parameter performance data from historical performance data of multiple parameters, and generating change trend information of multiple parameters based on the trend parameter performance data;
[0009] Acquire associated parameter performance data from historical performance data of multiple parameters, and generate correlation information of multiple parameters based on the associated parameter performance data;
[0010] Obtaining fluctuation parameter performance data from historical performance data of multiple parameters, and generating fluctuation information of multiple parameters based on the fluctuation parameter performance data;
[0011] Generate server optimization strategies based on resource evaluation information, change trend information, correlation information, and fluctuation information;
[0012] Process the server according to the server optimization policy.
[0013] The present application also provides a server performance optimization processing device, including:
[0014] A first acquisition module is used to acquire historical performance data of multiple parameters of any server to be processed;
[0015] A resource evaluation module, used to obtain resource parameter performance data from historical performance data of multiple parameters, and generate resource evaluation information of multiple parameters based on the resource parameter performance data;
[0016] A trend analysis module, used to obtain trend parameter performance data from historical performance data of multiple parameters, and generate change trend information of multiple parameters based on the trend parameter performance data;
[0017] A collaborative analysis module, used to obtain associated parameter performance data from historical performance data of multiple parameters, and generate correlation information of multiple parameters based on the associated parameter performance data;
[0018] A fault backtracking module is used to obtain fluctuation parameter performance data from historical performance data of multiple parameters, and generate fluctuation information of multiple parameters according to the fluctuation parameter performance data;
[0019] A strategy generation module is used to generate server optimization strategies based on resource evaluation information, change trend information, correlation information and fluctuation information;
[0020] The processing module is used for processing the server according to the server optimization strategy.
[0021] The present application also provides an electronic device, comprising: a memory for storing a computer program; and a processor for implementing the steps of any of the above-mentioned server performance optimization processing methods when executing the computer program.
[0022] The present application also provides a computer-readable storage medium, in which a computer program is stored, wherein when the computer program is executed by a processor, the steps of any of the above-mentioned server performance optimization processing methods are implemented.
[0023] The present application also provides a computer program product, including a computer program, which implements the steps of any of the above-mentioned server performance optimization processing methods when the computer program is executed by a processor.
[0024] Through this application, historical performance data of the server is obtained, 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 according to the resource evaluation information, trend change information, correlation information and fluctuation information to optimize the server. Compared with the existing technology, multiple information is obtained from the historical performance data, which improves the performance optimization effect of the server. BRIEF DESCRIPTION OF THE DRAWINGS
[0025] In order to more clearly illustrate the embodiments of the present application, the following is a brief introduction to the drawings required for use in the embodiments. Obviously, the drawings described below are only some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative work.
[0026] Figure 1 A schematic diagram of the system structure of a server provided in an embodiment of the present application;
[0027] Figure 2 A flow chart of a method for optimizing server performance provided in an embodiment of the present application;
[0028] Figure 3 A schematic diagram of the structure of a server performance optimization processing device provided in an embodiment of the present application;
[0029] Figure 4 A schematic diagram of the structure of the electronic device provided in this application. DETAILED DESCRIPTION
[0030] The following will be combined with the drawings in the embodiments of the present application to clearly and completely describe the technical solutions in the embodiments of the present application. Obviously, the described embodiments are only part of the embodiments of the present application, not all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of this application.
[0031] It should be noted that, in the description of this application, the terms "include", "comprise" or any other variant thereof are intended to cover non-exclusive inclusion, so that a process, method, article or device including a series of elements includes not only those elements, but also includes other elements not explicitly listed, or also includes elements inherent to such process, method, article or device. The terms "first", "second", etc. in this application are used to distinguish similar objects, and are not used to describe a specific order or sequence.
[0032] First, the terms involved in this application are explained:
[0033] CPU: Central Processing Unit (CPU) is the computing and control core of the computer system and the final execution unit for information processing and program running.
[0034] IO: (Input Output) refers to the input and 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] In order to solve the problem of reduced performance optimization effect of the server in the related technology, the embodiments of the present application propose the following technical concepts: the inventor considers obtaining 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 associated parameter performance data from the historical performance data, generating correlation information based on the associated 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 resource evaluation information, change trend information, correlation information and fluctuation information, thereby improving the performance optimization effect of the server.
[0036] In order to enable those skilled in the art to better understand the present application, the present application is further described in detail below in conjunction with the accompanying drawings and specific implementation methods.
[0037] In conjunction 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 is described herein. Figure 1 , Figure 1 A schematic diagram of the system structure of the server provided in the embodiment of the present application. Figure 1 As shown, the server includes: a receiving device 101, a processing device 102 and an output device 103.
[0038] It is understandable that the structure illustrated in the embodiment of the present application does not constitute a specific limitation on the object identification method. In other feasible implementations of the present application, the above architecture may include more or fewer components than shown in the figure, or combine certain components, or split certain components, or arrange the components differently, which can be determined according to the actual application scenario and is not limited here. Figure 1 The components shown may be implemented in hardware, software, or a combination of software and hardware.
[0039] In a specific implementation process, the receiving device 101 may be an input / output interface or a communication interface, and may obtain 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-mentioned server optimization strategy and the like.
[0042] It should be understood that the above-mentioned processing device can be implemented by a processor reading instructions in a memory and executing the instructions, or it can be implemented by a chip circuit.
[0043] In addition, the network architecture and business scenarios described in the embodiments of the present application are intended to more clearly illustrate the technical solutions of the embodiments of the present application, and do not constitute a limitation on the technical solutions provided in the embodiments of the present application. Ordinary technicians in this field can know that with the evolution of network architecture and the emergence of new business scenarios, the technical solutions provided in the embodiments of the present application are also applicable to similar technical problems.
[0044] Figure 2 A flow chart of a server performance optimization processing method provided in an embodiment of the present application, such as Figure 2 As shown, the embodiment of the present application provides a server performance optimization processing method, and the method is described in detail as follows:
[0045] S201: Obtain historical performance data of multiple parameters of any server to be processed.
[0046] In this embodiment, the historical performance data of multiple parameters include but are not limited to CPU, IO, memory, network latency, disk throughput, process and thread, etc.
[0047] In this embodiment, the process of collecting sensor data through the baseboard management controller firmware records the sensor data into a file, and configures a sampling time for each sensor data.
[0048] S202: Acquire resource parameter performance data from historical performance data of multiple parameters, and generate resource evaluation information of the multiple parameters according to the resource parameter performance data.
[0049] Specifically, the resource utilization and resource occupation time of multiple parameters are obtained, and the resource utilization and resource occupation time are compared with the preset limit values respectively, the duration of the resource utilization tension state and the corresponding resource utilization are obtained, and the time period of idle resource utilization is obtained to generate resource evaluation information of multiple parameters.
[0050] S203: Acquire trend parameter performance data from historical performance data of multiple parameters, and generate change trend information of the multiple parameters according to the trend parameter performance data.
[0051] Specifically, usage information of multiple parameters is obtained, a weighted average is calculated according to the usage information, and a change trend of the parameters is determined according to the size of the weighted average.
[0052] Exemplarily, the CPU usage is obtained, and the change trend of the CPU usage over a period of time is calculated by weighted average method.
[0053] S204: Acquire associated parameter performance data from historical performance data of multiple parameters, and generate correlation information of the multiple parameters according to the associated parameter performance data.
[0054] Specifically, the usage rates of multiple parameters in the same time period are obtained, the usage rates of the multiple parameters are normalized, and the correlation coefficients of the normalized usage rates are calculated. The changes of other parameters caused by the change of a certain parameter are determined based on the correlation coefficients to generate correlation information.
[0055] S205: Acquire fluctuation parameter performance data from historical performance data of multiple parameters, and generate fluctuation information of multiple parameters according to the fluctuation parameter performance data.
[0056] Specifically, when an exception occurs in a server, historical data from a period of time before the exception occurs is obtained, and a retrospective analysis is performed on the historical data from the previous period of time to determine whether there is a performance fluctuation.
[0057] The backtracking time is set by the performance benchmark setting module.
[0058] In this embodiment, after the fluctuation information of the multiple parameters is generated, the peak parameter performance data is obtained from the historical performance data of the multiple parameters.
[0059] Specifically, according to the preset statistical cycle, the peak recognition function is called to identify the time when the parameters generating the peak exceed the threshold and the corresponding usage rate, generate a system event log, and determine whether the operation generating the peak is an abnormal operation based on the system event log.
[0060] The content recorded in the system event log includes but is not limited to user operation records, firmware upgrades, and user requests.
[0061] S206: Generate a server optimization strategy based on the resource evaluation information, change trend information, correlation information and fluctuation information.
[0062] Specifically, short-term fluctuations in the fluctuation information are screened, and parameters with high resource utilization and frequent fluctuations are analyzed in combination with resource evaluation information to be determined as problem parameters. Based on the change trend information and correlation information, the abnormalities of other parameters caused by the problem parameters are determined to be linkage problem parameters. According to the types of problem parameters and linkage problem parameters, server optimization strategies are generated respectively.
[0063] S207: Process the server according to the server optimization strategy.
[0064] Specifically, the question parameters and the question types corresponding to the linkage question parameters are optimized respectively according to the server optimization strategy to optimize the server.
[0065] It can be seen from the above embodiments that by acquiring 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 a server optimization strategy is 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, which improves the performance optimization effect of the server.
[0066] In one embodiment of the present application, step S202 includes:
[0067] S2021: Obtain resource utilization and resource occupation duration of multiple parameters from historical performance data of multiple parameters.
[0068] In this embodiment, the resource utilization rates of the multiple parameters include resource utilization rates when resources are idle and when resources are tight.
[0069] Exemplarily, the resource utilization of the multiple parameters includes, but is not limited to, CPU resource utilization, IO resource utilization, and memory resource utilization.
[0070] In this embodiment, the resource occupation duration is the resource occupation duration under the resource shortage state.
[0071] S2022: Compare the resource utilization of the multiple parameters with a preset range of resource utilization values to obtain resource utilization information of the multiple parameters.
[0072] In this embodiment, the range value of resource utilization is set by a 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 utilization in resource idle and resource tight states and the longest duration in resource tight state, or it can be: the time of historical data of CPU, IO and memory utilization traced back when the system fails.
[0074] The performance benchmark value can be set in the following ways:
[0075] The system takes the average of multiple performance indicator data values in a stable operating state within a preset period of time as the performance benchmark value.
[0076] Performance baseline values entered directly in the configuration file.
[0077] S2023: Compare the resource occupation time of the multiple parameters with the preset resource occupation time limit to obtain the resource occupation time information of the multiple parameters.
[0078] Specifically, the resource occupancy rate under the resource tension state is obtained, and the resource occupancy duration information exceeding the preset resource occupancy rate limit is obtained, and compared with the preset resource occupancy duration limit, the resource occupancy duration information of multiple parameters is obtained.
[0079] Exemplarily, in a resource-constrained state, the CPU occupancy limit is set to 65%, and the resource occupancy time when the actual CPU occupancy exceeds 65% is obtained and compared with the preset resource occupancy time limit in the resource-constrained state.
[0080] S2024: Generate resource evaluation information of the multiple parameters according to the resource utilization information of the multiple parameters and the resource occupation duration information of the multiple parameters.
[0081] Specifically, according to the resource utilization information of the multiple parameters and the resource occupation duration information of the multiple parameters, the resource occupation status of each parameter is evaluated to generate resource evaluation information.
[0082] It can be seen from the above embodiments that by obtaining the resource utilization and resource occupancy time of multiple parameters, comparing the resource utilization and the range value of the resource utilization, obtaining the resource utilization information of idle resource utilization and out-of-range resource utilization, comparing the resource occupancy time with the resource occupancy time limit, obtaining the resource occupancy time information exceeding the limit, recording the resource utilization information and the resource occupancy time information to generate resource evaluation information, and optimizing the parameters that exceed the resource occupancy time and exceed the resource utilization range value.
[0083] In one embodiment of the present application, step S203 includes:
[0084] S2031: Obtain usage information of multiple parameters from historical performance data of multiple parameters.
[0085] In this embodiment, the usage information of the multiple parameters includes but is not limited to CPU usage, IO usage and memory usage.
[0086] S2032: Calculate a weighted average value of the multiple parameters according to the usage information of the multiple parameters.
[0087] In this embodiment, the formula for calculating the weighted average of multiple parameters is:
[0088]
[0089] 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.
[0090] In this embodiment, the weight coefficient may be a linearly decreasing weight or an exponentially decreasing weight.
[0091] S2033: Generate change trend information of multiple parameters according to the weighted average values of the 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 CPU usage has increased.
[0093] Exemplarily, if the weighted average value of the CPU shows a downward trend of 70%, 50%, and 10%, it is determined that the CPU usage has decreased.
[0094] Exemplarily, if the weighted average value of the CPU fluctuates within the usage limit range, it is determined that the CPU usage is stable.
[0095] It can be seen from the above embodiments that by using the weighted moving average method to calculate the weighted average value of each parameter, the change trend of multiple parameters is obtained according to the weighted average value of each parameter, 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 one embodiment of the present application, step S204 includes:
[0097] S2041: Obtain usage information of multiple parameters in the same period from historical performance data of multiple parameters.
[0098] Specifically, the usage rates of multiple parameters in the same time period are normalized, and after the usage rate data are mapped to an interval range from 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 period include but are not limited to CPU usage rate, IO usage rate and memory usage rate.
[0100] S2042: Calculate correlation coefficients of the multiple parameters based on usage 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 of parameters X and Y; represents the variance of parameter X; Represents the variance of parameter Y.
[0104] S2043: Generate correlation information of multiple parameters according to the correlation coefficient.
[0105] In this embodiment, the value range of the correlation coefficient is from -1 to 1.
[0106] A correlation coefficient of -1 indicates a positive correlation, that is, when one variable increases, the other variable also increases proportionally.
[0107] A correlation coefficient of 1 indicates a negative correlation, meaning that as one variable increases, the other variable decreases proportionally.
[0108] A correlation coefficient of 0 indicates that there is no correlation between the two variables.
[0109] From the above embodiments, it can be seen that by calculating the correlation coefficients of multiple parameters and judging whether a change in a certain parameter will cause a change in a strongly correlated parameter based on the correlation coefficients, the accuracy of generating an optimization strategy is improved based on the correlation information between the parameters.
[0110] In one embodiment of the present application, after step S207, the following steps are further included:
[0111] S208: Collecting performance data of the optimized server, and generating optimization feedback information according to 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, IO usage and memory usage.
[0113] S209: Obtain performance data of multiple parameters in the optimization feedback information.
[0114] Specifically, performance data of multiple parameters in the optimization feedback information are obtained, and optimized resource parameter performance data, trend parameter performance data, associated parameter performance data, and fluctuation parameter performance data are determined.
[0115] S210: 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.
[0116] Specifically, the optimized resource parameter performance data, trend parameter performance data, associated parameter performance data and fluctuation parameter performance data are compared with the corresponding preset parameter thresholds. If the performance data of multiple parameters in the optimization feedback information does not meet the preset parameter thresholds, a new optimization strategy is generated.
[0117] From the above embodiments, it can be seen that the server is optimized by applying the generated optimization strategy, collecting the performance data of the optimized server, generating optimization feedback information based on the performance data, and judging whether the parameters in the optimization feedback information meet the preset parameter threshold. If the parameter threshold is not met, a new optimization strategy is generated by the server performance optimization system based on the optimization feedback information to adapt to the changed server environment.
[0118] In one embodiment of the present application, step S206 includes:
[0119] S2061: Filter the short-term fluctuation information in the fluctuation information to obtain filtered fluctuation information.
[0120] In this embodiment, short-term fluctuations in the fluctuation information are obtained, and it is determined whether the short-term fluctuations are caused by abnormal operation of the server, so as to obtain filtered fluctuation information.
[0121] S2062: Determine the problem parameters to be optimized based on the filtered fluctuation information and resource evaluation information.
[0122] Specifically, according to the filtered fluctuation information and resource evaluation information, parameters that frequently fluctuate and have a high resource occupancy rate for a long time are determined to be problematic parameters.
[0123] S2063: Determine linkage question parameters of question parameters according to the change trend information and the correlation information.
[0124] Specifically, according to the change trend information and the correlation information, when the problem parameter changes, the parameter causing the change is determined as the linkage problem parameter.
[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 one embodiment of the present application, when the problem parameter is a CPU parameter, the server optimization strategy includes:
[0139] Get the blocking operation data corresponding to the problem parameters.
[0140] In this embodiment, the blocking operation data that causes the problem parameters include but are not limited to network requests, reading and writing files, and database queries.
[0141] Encapsulate blocking operation data as asynchronous tasks.
[0142] Specifically, the blocking operation data is encapsulated into an asynchronous function, and the asynchronous function is recorded in an asynchronous task.
[0143] Execute asynchronous tasks according to the task scheduler to process pending servers.
[0144] Specifically, asynchronous tasks are triggered and executed through the task scheduler, and the operation results are captured through the callback function to optimize the server.
[0145] In this embodiment, when the problem parameter is a central processing unit parameter, the optimization strategy of the server includes but is not limited to asynchronous programming, load balancing, algorithm optimization, and CPU process binding.
[0146] The load balancing method includes: allocating requests in the server to different servers in the distributed system through a load balancer to avoid overloading of a single server.
[0147] The CPU process binding method includes: setting the CPU affinity of the process, binding the process with high resource usage to the CPU core, reducing context switching, and improving the cache hit rate.
[0148] It can be seen from the above embodiments that, through asynchronous programming, blocking operations are encapsulated as asynchronous tasks, and asynchronous tasks are executed through a task scheduler to trigger asynchronous operations, thereby ensuring that the operation of the main thread is not blocked and reducing the utilization rate of the server's central processing unit parameters.
[0149] In one embodiment of the present application, when the problem parameter is a memory parameter, the server optimization strategy includes:
[0150] Get 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, the data size of the program to be run is obtained, a continuous memory is allocated in the memory pool according to the data size, the continuous memory is cut into memory blocks of equal capacity, and the memory blocks are marked through a free linked 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 a program to be run requests memory, a memory block is taken out through a free linked list. If the free memory blocks are insufficient, the memory pool is dynamically expanded.
[0155] Call the free memory block through the free list and run the program in the memory call request.
[0156] Specifically, the free memory block is called through the free linked list, the state of the memory block is marked 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 ends, the free memory blocks are stored in the memory pool through the free list to process the pending servers.
[0158] Specifically, when the program to be run is finished, the memory block is released, the free list stores the memory block into the memory pool, and the state is marked as free.
[0159] In this embodiment, when the problem parameter is a memory parameter, the optimization strategy of the server includes but is 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, object pool technology is used to reuse objects to avoid repeated creation.
[0161] Among them, memory analysis tools are used to detect memory, obtain abnormal memory usage records, and monitor the memory access process.
[0162] It can be seen from the above embodiments that through the memory pool technology, a memory area is allocated according to the program to be run, an adapted memory block is obtained, the memory block is called through the free list to run the program, and when the program ends, the memory block is stored back in the memory pool, thereby avoiding repeated calls to the memory block and matching the appropriate memory block according to the program data capacity, thereby reducing the usage rate of the server's memory parameters.
[0163] In one embodiment of the present application, when the problem parameter is a data interaction interface parameter, the server optimization strategy includes:
[0164] The asynchronous data interaction interface function is called by 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 the IO operation to the kernel.
[0166] The kernel writes the data to be processed into the kernel buffer.
[0167] Specifically, the kernel receives IO operations and reads data from disk into kernel buffers.
[0168] When the data to be processed is written, it is sent to the service buffer through the kernel to be processed by the server.
[0169] Specifically, after the kernel completes data reading, it copies the data in the kernel buffer and sends it to the service buffer. Through a predefined callback function, it notifies the application process that the IO operation is completed. The application process processes the IO 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 strategy of the server includes but is not limited to cache technology, asynchronous IO and file system optimization.
[0171] It can be seen from the above embodiments that the data to be processed is sent to the kernel and written into the kernel buffer through the method of asynchronous data interaction interface. The kernel takes over the data interaction operation and writes the data to be processed into the buffer to avoid repeated reading and writing of data. When the writing of the data to be processed is completed, the data to be processed is sent to the business buffer and the data to be processed is directly read through the business buffer to avoid data blocking, reduce context switching and thus reduce the utilization rate of the server's data interaction interface.
[0172] Through the description of the above implementation methods, those skilled in the art can clearly understand that the method according to the above embodiment can be implemented by means of software plus a necessary general hardware platform, and of course by hardware, but in many cases the former is a better implementation method.
[0173] Figure 3 This is a schematic diagram of the structure of the server performance optimization processing device provided in the embodiment of the present application. Figure 3 As 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 strategy 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 obtain 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 obtain trend parameter performance data from the historical performance data of multiple parameters, and generate change trend information of the multiple parameters according to the trend parameter performance data.
[0177] The collaborative analysis module 304 is used to obtain the associated parameter performance data from the historical performance data of the multiple parameters, and generate the correlation information of the multiple parameters according to the associated parameter performance data.
[0178] The fault backtracking module 305 is used to obtain 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.
[0179] The strategy generation module 306 is used to generate a server optimization strategy based on resource evaluation information, change trend information, correlation information and fluctuation information.
[0180] The processing module 307 is used to process the server according to the server optimization strategy.
[0181] In one embodiment of the present application, the resource evaluation module 302 includes:
[0182] The first acquisition unit is used to acquire resource utilization and resource occupation duration of multiple parameters from historical performance data of multiple parameters.
[0183] The first comparison unit is used to compare the resource utilization of multiple parameters with a preset range value of the resource utilization to obtain the resource utilization information of the multiple parameters.
[0184] The second comparison unit is used to compare the resource occupation time of multiple parameters with the preset resource occupation time limit to obtain the resource occupation time information of the multiple parameters.
[0185] The first generating unit is used to generate resource evaluation information of multiple parameters according to resource utilization information of multiple parameters and resource occupation duration information of multiple parameters.
[0186] In one embodiment of the present application, the trend analysis module 303 includes:
[0187] The second acquisition unit is used to acquire usage rate information of multiple parameters from historical performance data of multiple parameters.
[0188] The first calculation unit is used to calculate the weighted average values of the multiple parameters according to the usage information of the multiple parameters.
[0189] The second generating unit is used to generate the change trend information of the multiple parameters according to the weighted average values of the multiple parameters.
[0190] In one embodiment of the present application, the collaborative analysis module 304 includes:
[0191] The third acquisition unit is used to acquire usage rate information of multiple parameters in the same period from the historical performance data of multiple parameters.
[0192] The second calculation unit is used to calculate the correlation coefficients of the multiple parameters according to the usage rate information of the multiple parameters.
[0193] The third generating unit is used to generate correlation information of multiple parameters according to the correlation coefficient.
[0194] In one embodiment of the present application, the server performance optimization processing device 30 further includes:
[0195] The collection module is used to collect the performance data of the optimized server and generate optimization feedback information according to the performance data of the optimized server.
[0196] The second acquisition module is used to obtain performance data of multiple parameters in the optimization feedback information.
[0197] The generation module is used to generate a new server optimization strategy according to the optimization feedback information if the performance data of multiple parameters in the optimization feedback information do not meet the preset parameter thresholds.
[0198] In one embodiment of the present application, the policy generation module 306 includes:
[0199] The screening unit is used to screen the short-term fluctuation information in the fluctuation information to obtain the screened fluctuation information.
[0200] The first determination unit is used to determine the problem parameters to be optimized according to the filtered fluctuation information and resource evaluation information.
[0201] The second determining unit is used to determine the linkage question parameters of the question parameters according to the change trend information and the correlation information.
[0202] The third determining unit is used to determine the parameter types corresponding to the problem parameters and the linkage problem parameters to generate the corresponding server optimization strategy.
[0203] In one embodiment of the present application, the strategy generation module 306 further includes:
[0204] The simulation unit is used to simulate and apply the generated multiple server optimization strategies to the server, and generate simulation results corresponding to the multiple server optimization strategies.
[0205] The third calculation unit is used to calculate the simulation scores of the simulation results corresponding to the multiple server optimization strategies according to the preset evaluation weights.
[0206] The application unit is used to apply the corresponding server optimization strategy to the server according to the simulation score.
[0207] In one embodiment of the present application, when the problem parameter is a central processing unit parameter, the third determination unit includes:
[0208] The first acquisition subunit is used to acquire blocking operation data corresponding to the problem parameters.
[0209] The encapsulation subunit is used to encapsulate blocking operation data into asynchronous tasks.
[0210] The execution subunit is used to execute asynchronous tasks according to the task scheduler to process the servers to be processed.
[0211] In one embodiment of the present application, when the problem parameter is a memory parameter, the third determining unit includes:
[0212] The second acquisition subunit is used to acquire the data capacity of the program to be run.
[0213] The matching subunit is used to match the free memory blocks in the memory pool according to the data capacity of the program to be run.
[0214] The calling subunit is used to call the free memory block through the free linked list and run the program in the memory call request.
[0215] The storage subunit is used to store the free memory blocks into the memory pool through the free linked list when the program in the memory call request ends, so as to process the pending server.
[0216] For the description of the features in the embodiment corresponding to the server performance optimization processing device, please refer to the relevant description of the embodiment corresponding to the server performance optimization processing method, which will not be repeated here.
[0217] Figure 4 This is a schematic diagram of the structure of the electronic device provided in this application. Figure 4 As 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. The processor 401, the memory 402 and the communication component 403 are connected via a bus.
[0218] In the specific implementation process, at least one processor 401 executes the 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] The specific implementation process of the processor 401 can be found in the above method embodiment, and its implementation principle and technical effect are similar, so this embodiment will not be repeated here.
[0220] In the above embodiments, it should be understood that the processor may be a central processing unit (CPU), or other general-purpose processors, digital signal processors (DSP), application-specific integrated circuits (ASIC), etc. A general-purpose processor may be a microprocessor or any conventional processor, etc. The steps of the method disclosed in the application may be directly implemented as being executed by a hardware processor, or may be executed by a combination of hardware and software modules in the processor.
[0221] The memory may include a high-speed memory (Random Access Memory, RAM), and may also include a non-volatile memory (NVM), such as at least one disk storage.
[0222] The bus can be an Industry Standard Architecture (ISA) bus, a Peripheral Component Interconnect (PCI) bus, or 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 ease of representation, the bus in the drawings of this application is not limited to only one bus or one type of bus.
[0223] An embodiment of the present application further provides a computer-readable storage medium, in which a computer program is stored, wherein the computer program is configured to execute the steps of any of the above-mentioned server performance optimization processing method embodiments when running.
[0224] In an exemplary embodiment, the computer-readable storage medium may include, but is not limited to, various media that can store computer programs, such as a USB flash drive, a read-only memory (ROM), a random access memory (RAM), a mobile hard disk, a magnetic disk or an optical disk.
[0225] An embodiment of the present application further provides a computer program product, which includes a computer program. When the computer program is executed by a processor, the steps in any of the above-mentioned server performance optimization processing method embodiments are implemented.
[0226] An embodiment of the present application also provides another computer program product, including a non-volatile computer-readable storage medium, the non-volatile computer-readable storage medium storing a computer program, and when the computer program is executed by a processor, the steps in any of the above-mentioned server performance optimization processing method embodiments are implemented.
[0227] Professionals may further appreciate that the units and algorithm steps of each example described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, computer software, or a combination of the two. In order to clearly illustrate the interchangeability of hardware and software, the composition and steps of each example have been generally described in the above description according to function. Whether these functions are performed in hardware or software depends on the specific application and design constraints of the technical solution. Professionals and technicians may use different methods to implement the described functions for each specific application, but such implementation should not be considered to be beyond the scope of this application.
[0228] The above is a detailed introduction to a server performance optimization processing method, device, storage medium and program product provided by the present application. Specific examples are used in this article to illustrate the principles and implementation methods of the present application. The description of the above embodiments is only used to help understand the method and core idea of the present application. It should be pointed out that for ordinary technicians in this technical field, without departing from the principles of the present application, several improvements and modifications can be made to the present application, and these improvements and modifications also fall within the scope of protection 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; The server is processed according to the server optimization policy.
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: 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.
9. The server performance optimization processing method according to claim 8, 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.
10. The server performance optimization processing method according to claim 8, 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.
11. The server performance optimization processing method according to claim 10, 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.
12. The server performance optimization processing method according to claim 10, 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.
13. 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 12 when executing the computer program.
14. 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 12.
15. 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 according to any one of claims 1 to 12 are implemented.
Citation Information
Patent Citations
Big data machine learning-based intelligent server operation and maintenance method and computer equipment
CN108446200A
Task scheduling method, device, platform, server and storage medium
CN111625331A
Capacity data processing method and device, electronic equipment and storage medium
CN117093439A
Method and apparatus for accelerating cold-starting of application, and terminal
WO2020078314A1
Method, apparatus and device for estimating cloud host resources, and storage medium
WO2021051529A1