Server load balancing adjustment method and device, equipment and medium
Through the method based on the time series prediction model, the load situation of the virtual machine and the load strategy is determined, the problems of unbalanced and downtime of virtual machine in the existing technology are solved, and the balanced use and load balancing of virtual machine resources are realized.
Patent Information
- Application Number
- CN202510224819.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-02-27
- Publication Date
- 2025-06-06
AI Technical Summary
The prior art is difficult to adjust according to the load conditions of different servers at different times, resulting in unbalanced utilization of virtual machines and even excessive load of virtual machines, resulting in downtime.
The method based on the target time series prediction model is adopted to predict the memory usage and central processor usage of each virtual machine in the target time period, determine the comprehensive load of the virtual machine, and determine the load strategy based on the comprehensive load and application number to adjust the load balancing of the server.
The optimal load strategy is achieved for the loads of different virtual machines at different times every day, ensuring the balanced use of resources between virtual machines and preventing excessive load and downtime of virtual machines caused by sudden increase in access.
Smart Images

Figure CN120104335A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of computer technology, and in particular to a server load balancing adjustment method, device, equipment and medium. Background Art
[0002] Most applications now use nginx as a load balancing middleware. Most of them use fixed load balancing strategies or default strategies. This makes it impossible to adjust according to the load conditions of different servers at different times, resulting in uneven utilization of virtual machines, and even some virtual machines crashing due to excessive load. Therefore, how to achieve server load balancing is an urgent problem to be solved. Summary of the invention
[0003] In view of this, the purpose of the present invention is to provide a server load balancing adjustment method, device, equipment and medium, which can make the best load strategy for the load of different virtual machines at different times of the day, so as to ensure the balanced use of resources between each virtual machine and achieve server load balancing. The specific scheme is as follows:
[0004] In a first aspect, the present application discloses a server load balancing adjustment method, comprising:
[0005] Predict the memory usage and CPU usage of each virtual machine in the target time period based on the target time series prediction model;
[0006] Determine the memory ratio corresponding to the memory usage of each virtual machine and the CPU ratio corresponding to the CPU usage, and determine the comprehensive load of each virtual machine according to each memory ratio and each CPU ratio;
[0007] The load strategy of the virtual machine is determined according to the comprehensive load of each virtual machine and the application running on each virtual machine, so as to adjust the load balancing of the server by using the load strategy.
[0008] Optionally, before predicting the memory usage and the CPU usage of each virtual machine in the target time period based on the target time series prediction model, the method further includes:
[0009] A first scheduled task is set, and the historical memory usage and the historical CPU usage of the virtual machine are periodically obtained according to the first scheduled task and a preset virtual machine load monitoring command.
[0010] Optionally, before predicting the memory usage and the CPU usage of each virtual machine in the target time period based on the target time series prediction model, the method further includes:
[0011] The initial time series prediction model is trained based on the acquisition time corresponding to each of the historical memory usage and the historical CPU usage, the historical memory usage, and the historical CPU usage to obtain the target time series prediction model.
[0012] Optionally, determining the comprehensive load of each of the virtual machines according to the memory proportions and the central processing unit proportions includes:
[0013] Determine a first preset weight of each memory ratio and a second preset weight of each CPU ratio;
[0014] The comprehensive load of each of the virtual machines is determined based on the memory proportions, the first preset weight, the central processing unit proportions, and the second preset weight.
[0015] Optionally, determining the load strategy of the virtual machine according to the comprehensive load of each virtual machine and the application running on each virtual machine includes:
[0016] The load strategy is determined by allocating target requests to each virtual machine based on the comprehensive load of each virtual machine and the number of applications running on each virtual machine.
[0017] Optionally, determining the load strategy of the virtual machine according to the comprehensive load of each virtual machine and the application running on each virtual machine so as to adjust the load balancing of the server by using the load strategy includes:
[0018] The load strategy of the virtual machine is determined by the comprehensive load of each virtual machine and the application running on each virtual machine, so as to deploy a second scheduled task on the server, adjust the target parameters of the configuration file of the server according to the second scheduled task and the load strategy, and achieve load balancing of the server based on the target parameters.
[0019] Optionally, implementing load balancing of the server based on the target parameter includes:
[0020] The target parameters of the configuration file of the server are read by periodically executing a shell script, and the application deployed on the server is restarted to achieve load balancing of the server.
[0021] In a second aspect, the present application discloses a server load balancing adjustment device, comprising:
[0022] A usage prediction module is used to predict the memory usage and CPU usage of each virtual machine within a target time period based on a target time series prediction model;
[0023] A comprehensive load determination module, used to determine the memory ratio corresponding to the memory usage of each virtual machine and the CPU ratio corresponding to the CPU usage, and determine the comprehensive load of each virtual machine according to each memory ratio and each CPU ratio;
[0024] The load strategy determination module is used to determine the load strategy of the virtual machine according to the comprehensive load of each virtual machine and the application running on each virtual machine, so as to adjust the load balance of the server by using the load strategy.
[0025] In a third aspect, the present application discloses an electronic device, comprising:
[0026] Memory for storing computer programs;
[0027] The processor is used to execute a computer program to implement the server load balancing adjustment method as described above.
[0028] In a fourth aspect, the present application discloses a computer-readable storage medium, on which a computer program is stored. When the computer program is executed by a processor, the server load balancing adjustment method as described above is implemented.
[0029] When adjusting the load balancing of the server, the present application first predicts the memory usage and CPU usage of each virtual machine within the target time period based on the target time series prediction model; then determines the memory ratio corresponding to the memory usage of each virtual machine and the CPU ratio corresponding to the CPU usage, and determines the comprehensive load of each virtual machine based on the memory ratio and the CPU ratio; finally, determines the load strategy of the virtual machine through the comprehensive load of each virtual machine and the application running on each virtual machine, so as to use the load strategy to adjust the load balancing of the server. In this way, the present application can use the data model to accurately specify the dynamic load balancing strategy based on the virtual machine load at different historical moments, and can make the optimal load strategy for the load of different virtual machines at different times every day, so as to ensure the balanced use of resources between virtual machines and prevent downtime caused by excessive virtual machine load due to excessive access at certain times. BRIEF DESCRIPTION OF THE DRAWINGS
[0030] In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are only embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on the provided drawings without paying creative work.
[0031] Figure 1A flow chart of a server load balancing adjustment method disclosed in this application;
[0032] Figure 2 A schematic diagram of the structure of a server load balancing adjustment device disclosed in this application;
[0033] Figure 3 This is a structural diagram of an electronic device disclosed in this application. DETAILED DESCRIPTION
[0034] The following will be combined with the drawings in the embodiments of the present invention to clearly and completely describe the technical solutions in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.
[0035] Most applications now use nginx as a load balancing middleware. Most of them use a fixed load balancing strategy or a default strategy for load balancing. This makes it impossible to adjust according to the load conditions of different servers at different times, resulting in uneven utilization of virtual machines, and even some virtual machines are overloaded and crash. In order to solve the above technical problems, the present application discloses a server load balancing adjustment method, device, equipment and medium, which can make the optimal load strategy for the loads of different virtual machines at different times of the day, thereby ensuring the balanced use of resources between virtual machines and achieving server load balancing.
[0036] See also Figure 1 As shown, an embodiment of the present invention discloses a server load balancing adjustment method, comprising:
[0037] Step S11: predicting the memory usage and the CPU usage of each virtual machine within the target time period based on the target time series prediction model.
[0038] In this embodiment, firstly, a first scheduled task is set, and the historical memory usage and historical CPU usage of the virtual machine are obtained according to the first scheduled task and the preset virtual machine load monitoring command. Specifically, a virtual machine load status collection script is deployed on the application server, and the virtual machine status is collected regularly through the cron scheduled task and some virtual machine load status monitoring commands. Specific implementation: Through crontab -e, add a scheduled task:
[0039] 0 * * * * / home / your_username / collect_system_info.sh;
[0040] Use the free -m command and then format the data results to obtain the memory usage of the virtual machine; use the top -b-n1 command and then format the data results to obtain the CPU (Central Processing Unit) usage of the virtual machine. In this way, the load conditions at different times are obtained as shown in Table 1.
[0041] Table 1
[0042]
[0043] Then, the initial time series prediction model is trained based on the acquisition time corresponding to each of the historical memory usage and the historical CPU usage, the historical memory usage and the historical CPU usage, so as to obtain the target time series prediction model. That is to say, according to the load of the virtual machine at different times, as the historical data set, the python program is used to combine Prophet for prediction. In the program, the data set is first read:
[0044] columns = ['time', 'virtual machine IP', 'heap memory used (MB)', 'maximum heap memory used (MB)'];
[0045] Then, the time series prediction library is introduced, and the data is trained model.fit(vm_df), and finally the initial time series prediction model is trained to obtain the target time series prediction model.
[0046] After obtaining the target time series prediction model, the trained model is used to predict the data for the next day, and the prediction results are output to obtain files on the load conditions of different virtual machines, that is, the memory usage and CPU usage of each virtual machine in the target time period are predicted.
[0047] Step S12, determining the memory ratio corresponding to the memory usage of each virtual machine and the CPU ratio corresponding to the CPU usage, and determining the comprehensive load of each virtual machine according to the memory ratio and the CPU ratio.
[0048] In this embodiment, after predicting the memory usage and CPU usage of the virtual machine, the comprehensive load of each virtual machine is determined according to the memory usage and CPU usage of the virtual machine. Specifically, first determine the memory share corresponding to the memory usage of each virtual machine and the CPU share corresponding to the CPU usage, then determine the first preset weight of each memory share and the second preset weight of each CPU share; determine the comprehensive load of each virtual machine based on each memory share, the first preset weight, each CPU share and the second preset weight. Taking four virtual machines as an example, after predicting the load at a certain moment, the comprehensive load is calculated based on the CPU and memory, with each weight of 50, as shown in Table 2.
[0049] Table 2
[0050]
[0051] As can be seen from Table 2, the memory share can be determined according to the memory usage of the virtual machine, the CPU share can be determined according to the CPU usage, and then the comprehensive load can be calculated according to the algorithm that the memory share and CPU share each account for 50%.
[0052] Step S13: determining the load strategy of the virtual machine according to the comprehensive load of each virtual machine and the application running on each virtual machine, so as to adjust the load balancing of the server by using the load strategy.
[0053] In this embodiment, target requests are allocated to each virtual machine based on the comprehensive load of each virtual machine and the number of applications running on each virtual machine to determine the load strategy, so as to deploy a second scheduled task on the server, adjust the target parameters of the configuration file of the server according to the second scheduled task and the load strategy, and implement load balancing of the server based on the target parameters. Wherein, when implementing the load balancing of the server based on the target parameters, the target parameters of the configuration file of the server are read by regularly executing a shell script, and the application deployed on the server is restarted to implement load balancing of the server. In other words, because different virtual machines may be running other different applications, fewer requests are allocated to those with higher loads, and more requests are allocated to those with lower loads, as shown in Table 3. Therefore, the load strategy of the virtual machine can be determined based on the comprehensive load of the virtual machine and the applications running on each virtual machine.
[0054] Table 3
[0055]
[0056] Then put the file on the nginx application virtual machine and configure the nginx load balancing strategy according to this file. In this application, you can modify the upstrem module in the Nginx configuration file to implement dynamic load balancing strategies at different times. First, use the prediction file generated in the previous step to deploy a scheduled task that is executed every hour on the deployment server of the nginx application. According to the time of the prediction file and the load parameters of different virtual machines, change the weigh parameter of the nginx configuration file to achieve the purpose of differentiated load balancing. For example, according to the load situation in the previous step, you can configure it as follows:
[0057] upstream myapp {
[0058] server vm1 weight=84;
[0059] server vm2 weight=49;
[0060] server vm3 weight=85;
[0061] server vm4 weight=81;
[0062] };
[0063] Then, by executing the shell script at a scheduled time, the configuration is read and the nginx application is restarted to achieve the purpose of dynamic load balancing. This shell script matches the time information and then replaces the existing upstream module, thereby realizing a dynamic load balancing strategy at different times.
[0064] In addition, we can know that load strategies may include dynamic resource scheduling, auto-scaling, load balancing, priority adjustment, etc. Therefore, when determining the load strategy, you can preset a fixed threshold (such as CPU ≥ 90% for overload), and you can also automatically calculate the normal fluctuation range based on historical data. If the comprehensive load > 85% for 5 minutes, it means that the overall load continues to exceed the standard. At this time, you can clone a new virtual machine and add it to the load balancing pool. If the comprehensive load < 20% for 30 minutes, you can merge virtual machines or reduce capacity. And if CPU ≥ 90%, it means a single resource bottleneck (insufficient memory), and you can dynamically adjust the CPU / memory quota at this time. In addition, if the service level guarantee is in case of sudden traffic or insufficient resources, non-critical business resources are restricted and core services are prioritized. Finally, after determining the load strategy and executing it, lock the adjustment window for a certain period of time to avoid frequent shocks, achieve smooth implementation of the strategy, and avoid frequent adjustments that cause system instability.
[0065] In summary, when adjusting the load balancing of the server, the present application first predicts the memory usage and CPU usage of each virtual machine within the target time period based on the target time series prediction model; then determines the memory ratio corresponding to the memory usage of each virtual machine and the CPU ratio corresponding to the CPU usage, and determines the comprehensive load of each virtual machine based on the memory ratio and the CPU ratio; finally, determines the load strategy of the virtual machine through the comprehensive load of each virtual machine and the application running on each virtual machine, so as to use the load strategy to adjust the load balancing of the server. In this way, the present application can use the data model to accurately specify the dynamic load balancing strategy based on the virtual machine load at different historical moments, and can make the optimal load strategy for the load of different virtual machines at different times every day, so as to ensure the balanced use of resources between virtual machines and prevent downtime caused by excessive virtual machine load due to excessive access at certain times.
[0066] Based on the previous embodiment, it can be seen that the method of the present application is applicable to the scenario where nginx is used as the application load balancing server. It can dynamically adjust the nginx load balancing according to the predicted load situation at different times of the day. The method of the present application specifically needs to be implemented in combination with application data collection, model prediction, and dynamic load balancing.
[0067] First, deploy the virtual machine load collection script, collect_system_info.sh, on the application virtual machine to collect load data into a file:
[0068] 1. Use the free -h command to collect memory usage, and use the top -b n1 command to collect CPU usage;
[0069] 2. Define cron scheduled tasks;
[0070] 0 * * * * / home / your_username / collect_system_info.sh;
[0071] Then, the execution time, virtual machine IP, and load status are written to the file regularly.
[0072] Then, use the Prophet model time series forecasting library to predict the virtual machine load for the next day.
[0073] The load conditions of different virtual machines at different times obtained in the previous step are used as historical data. The Prophet model is used to predict the load conditions of different virtual machines at different times. The prediction results are written into a new file backend_weights.txt as the basis for the load balancing strategy.
[0074] Finally, load balancing can be dynamically modified by modifying the upstream file.
[0075] Through the shell script, read the rationalized load balancing status generated in the previous step, and in the Nginx configuration file, modify the upsteam module to achieve the purpose of dynamically adjusting nginx load balancing.
[0076] In this way, this application can ensure the balanced use of resources among the virtual machines, and prevent the virtual machine from crashing due to excessive load caused by an increase in access volume at certain times.
[0077] See also Figure 2 As shown, an embodiment of the present invention discloses a server load balancing adjustment device, comprising:
[0078] The usage prediction module 11 is used to predict the memory usage and CPU usage of each virtual machine within a target time period based on the target time series prediction model;
[0079] The comprehensive load determination module 12 is used to determine the memory ratio corresponding to the memory usage of each virtual machine and the CPU ratio corresponding to the CPU usage, and determine the comprehensive load of each virtual machine according to each memory ratio and each CPU ratio;
[0080] The load strategy determination module 13 is used to determine the load strategy of the virtual machine according to the comprehensive load of each virtual machine and the application running on each virtual machine, so as to adjust the load balance of the server by using the load strategy.
[0081] When adjusting the load balancing of the server, the present application first predicts the memory usage and CPU usage of each virtual machine within the target time period based on the target time series prediction model; then determines the memory ratio corresponding to the memory usage of each virtual machine and the CPU ratio corresponding to the CPU usage, and determines the comprehensive load of each virtual machine based on the memory ratio and the CPU ratio; finally, determines the load strategy of the virtual machine through the comprehensive load of each virtual machine and the application running on each virtual machine, so as to use the load strategy to adjust the load balancing of the server. In this way, the present application can use the data model to accurately specify the dynamic load balancing strategy based on the virtual machine load at different historical moments, and can make the optimal load strategy for the load of different virtual machines at different times every day, so as to ensure the balanced use of resources between virtual machines and prevent downtime caused by excessive virtual machine load due to excessive access at certain times.
[0082] In some specific embodiments, the device may further include:
[0083] The historical usage acquisition module is used to set a first scheduled task, and regularly acquire the historical memory usage and historical CPU usage of the virtual machine according to the first scheduled task and a preset virtual machine load monitoring command.
[0084] In some specific embodiments, the device may further include:
[0085] The target time series prediction model acquisition module is used to train the initial time series prediction model based on the acquisition time corresponding to each of the historical memory usage and the historical CPU usage, the historical memory usage and the historical CPU usage to obtain the target time series prediction model.
[0086] In some specific embodiments, the comprehensive load determination module 12 may specifically include:
[0087] A weight determination unit, used to determine a first preset weight of each memory ratio and a second preset weight of each CPU ratio;
[0088] A comprehensive load determination unit is used to determine the comprehensive load of each of the virtual machines based on the memory proportions, the first preset weights, the central processing unit proportions, and the second preset weights.
[0089] In some specific embodiments, the load strategy determination module 13 may specifically include:
[0090] The load strategy determining unit is used to allocate target requests to each virtual machine based on the comprehensive load of each virtual machine and the number of applications running on each virtual machine, so as to determine the load strategy.
[0091] In some specific embodiments, the load strategy determination module 13 may specifically include:
[0092] A load balancing implementation unit is used to determine the load strategy of the virtual machine through the comprehensive load of each virtual machine and the application running on each virtual machine, so as to deploy a second scheduled task on the server, adjust the target parameters of the configuration file of the server according to the second scheduled task and the load strategy, and implement load balancing of the server based on the target parameters.
[0093] In some specific embodiments, the load balancing implementation unit may specifically include:
[0094] The load balancing implementation subunit is used to read the target parameters of the configuration file of the server by periodically executing a shell script, and restart the application deployed on the server to implement load balancing of the server.
[0095] Furthermore, the present application also discloses an electronic device. Figure 3 This is a structural diagram of an electronic device 20 according to an exemplary embodiment. The content in the diagram cannot be regarded as any limitation on the scope of use of the present application.
[0096] Figure 3 A schematic diagram of the structure of an electronic device 20 provided in an embodiment of the present application. The electronic device 20 may specifically include: at least one processor 21, at least one memory 22, a power supply 23, a communication interface 24, an input / output interface 25, and a communication bus 26. The memory 22 is used to store a computer program, which is loaded and executed by the processor 21 to implement the relevant steps in the server load balancing adjustment method disclosed in any of the aforementioned embodiments. In addition, the electronic device 20 in this embodiment may specifically be an electronic computer.
[0097] In this embodiment, the power supply 23 is used to provide working voltage for each hardware device on the electronic device 20; the communication interface 24 can create a data transmission channel between the electronic device 20 and the external device, and the communication protocol it follows is any communication protocol that can be applied to the technical solution of the present application, and is not specifically limited here; the input and output interface 25 is used to obtain external input data or output data to the outside world, and its specific interface type can be selected according to specific application needs and is not specifically limited here.
[0098] In addition, the memory 22, as a carrier for storing resources, can be a read-only memory, a random access memory, a disk or an optical disk, etc. The resources stored thereon can include an operating system 221, a computer program 222, etc., and the storage method can be temporary storage or permanent storage.
[0099] The operating system 221 is used to manage and control the hardware devices on the electronic device 20 and the computer program 222, which can be Windows Server, Netware, Unix, Linux, etc. In addition to including a computer program that can be used to complete the server load balancing adjustment method performed by the electronic device 20 disclosed in any of the aforementioned embodiments, the computer program 222 can further include a computer program that can be used to complete other specific tasks.
[0100] Furthermore, the present application also discloses a computer-readable storage medium for storing a computer program; wherein the computer program, when executed by a processor, implements the aforementioned disclosed server load balancing adjustment method. The specific steps of the method can refer to the corresponding contents disclosed in the aforementioned embodiments, and will not be repeated here.
[0101] In this specification, each embodiment is described in a progressive manner, and each embodiment focuses on the differences from other embodiments. The same or similar parts between the embodiments can be referred to each other. For the device disclosed in the embodiment, since it corresponds to the method disclosed in the embodiment, the description is relatively simple, and the relevant parts can be referred to the method part.
[0102] 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.
[0103] The steps of the method or algorithm described in conjunction with the embodiments disclosed herein may be implemented directly using hardware, a software module executed by a processor, or a combination of the two. The software module may be placed in a random access memory (RAM), a memory, a read-only memory (ROM), an electrically programmable ROM, an electrically erasable programmable ROM, a register, a hard disk, a removable disk, a CD-ROM, or any other form of storage medium known in the art.
[0104] Finally, it should be noted that, in this article, relational terms such as first and second, etc. are only used to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Moreover, the terms "include", "comprise" or any other variants 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 other elements not explicitly listed, or also includes elements inherent to such process, method, article or device. In the absence of further restrictions, the elements defined by the sentence "comprise a ..." do not exclude the presence of other identical elements in the process, method, article or device including the elements.
[0105] The technical solution provided by the present application is introduced in detail above. 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 of the present application and its core idea. At the same time, for general technicians in this field, according to the idea of the present application, there will be changes in the specific implementation methods and application scope. In summary, the content of this specification should not be understood as a limitation on the present application.
Claims
1. A server load balancing adjustment method, characterized in that: include: Predict the memory usage and CPU usage of each virtual machine in the target time period based on the target time series prediction model; Determine the memory ratio corresponding to the memory usage of each virtual machine and the CPU ratio corresponding to the CPU usage, and determine the comprehensive load of each virtual machine according to each memory ratio and each CPU ratio; The load strategy of the virtual machine is determined according to the comprehensive load of each virtual machine and the application running on each virtual machine, so as to adjust the load balancing of the server by using the load strategy.
2. The server load balancing adjustment method according to claim 1, characterized in that: Before predicting the memory usage and the CPU usage of each virtual machine in the target time period based on the target time series prediction model, the method further includes: A first scheduled task is set, and the historical memory usage and the historical CPU usage of the virtual machine are periodically obtained according to the first scheduled task and a preset virtual machine load monitoring command.
3. The server load balancing adjustment method according to claim 2, characterized in that: Before predicting the memory usage and the CPU usage of each virtual machine in the target time period based on the target time series prediction model, the method further includes: The initial time series prediction model is trained based on the acquisition time corresponding to each of the historical memory usage and the historical CPU usage, the historical memory usage, and the historical CPU usage to obtain the target time series prediction model.
4. The server load balancing adjustment method according to claim 1, characterized in that: Determining the comprehensive load of each virtual machine according to the memory ratio and the CPU ratio includes: Determine a first preset weight of each memory ratio and a second preset weight of each CPU ratio; The comprehensive load of each of the virtual machines is determined based on the memory proportions, the first preset weight, the central processing unit proportions, and the second preset weight.
5. The server load balancing adjustment method according to claim 1, characterized in that: The determining the load strategy of the virtual machine according to the comprehensive load of each virtual machine and the application running on each virtual machine includes: The load strategy is determined by allocating target requests to each virtual machine based on the comprehensive load of each virtual machine and the number of applications running on each virtual machine.
6. The server load balancing adjustment method according to any one of claims 1 to 5, characterized in that: Determining the load strategy of the virtual machine by the comprehensive load of each virtual machine and the application running on each virtual machine so as to adjust the load balancing of the server by using the load strategy includes: The load strategy of the virtual machine is determined by the comprehensive load of each virtual machine and the application running on each virtual machine, so as to deploy a second scheduled task on the server, adjust the target parameters of the configuration file of the server according to the second scheduled task and the load strategy, and achieve load balancing of the server based on the target parameters.
7. The server load balancing adjustment method according to claim 6, characterized in that: The implementing load balancing of the server based on the target parameter includes: The target parameters of the configuration file of the server are read by periodically executing a shell script, and the application deployed on the server is restarted to achieve load balancing of the server.
8. A server load balancing adjustment device, characterized in that: include: A usage prediction module is used to predict the memory usage and CPU usage of each virtual machine within a target time period based on a target time series prediction model; A comprehensive load determination module, used to determine the memory ratio corresponding to the memory usage of each virtual machine and the CPU ratio corresponding to the CPU usage, and determine the comprehensive load of each virtual machine according to each memory ratio and each CPU ratio; The load strategy determination module is used to determine the load strategy of the virtual machine according to the comprehensive load of each virtual machine and the application running on each virtual machine, so as to adjust the load balance of the server by using the load strategy.
9. An electronic device, characterized in that: include: Memory for storing computer programs; A processor is used to execute a computer program to implement the steps of any one of the server load balancing adjustment methods according to claims 1 to 7.
10. A computer-readable storage medium, characterized in that: A computer program is stored on a computer-readable storage medium, and when the computer program is executed by a processor, the steps of the server load balancing adjustment method according to any one of claims 1 to 7 are implemented.