Virtual machine-oriented cloud resource allocation method and system
By selecting performance indicators and mining the relationship between the business needs of virtual machines, and evaluating the host with the performance evaluation model, the problems of virtual machines in host performance evaluation and allocation are solved, and the stable operation of virtual machines and efficient resource utilization are achieved.
Patent Information
- Application Number
- CN202510285052.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-03-11
- Publication Date
- 2025-06-27
AI Technical Summary
The prior art is difficult to effectively evaluate and allocate the performance of the host in the virtual machine release process, resulting in the virtual machine being centrally allocated to high-performance hosts, resulting in overload load and performance degradation, or causing service outages in the event of a host failure.
By selecting performance metrics based on the business needs of the virtual machines to be published, mining the association relationship between virtual machines generates business rules and constraints, using a preset performance evaluation model to evaluate all hosts, and finally allocate the virtual machine the cloud resource pool of the host with the highest performance score.
The stable operation of the virtual machine is achieved, the risk of resource competition and excessive load is reduced, and service interruption is avoided due to host failure.
Smart Images

Figure CN120216099A_ABST
Abstract
Description
Technical Field
[0001] This application belongs to the field of cloud computing technology, and particularly relates to a cloud resource allocation method and system for virtual machines. Background Art
[0002] The existing virtual machine publishing process requires manually selecting the required computing resource pool, storage resource pool, and network resource pool on the cloud platform according to the specific requirements of the deployed application or service, and connecting to the corresponding host machine of the cloud resource pool through the API interface to achieve automated virtual machine publishing. Due to the different actual installation locations and hardware devices of the host machines, there are differences in the performance between different cloud resource pools, which are mainly reflected in aspects such as operating energy consumption, task processing speed, network load capacity, and storage load capacity. These performance differences will affect the efficiency and stability of cloud services. Therefore, in order to meet the needs of customers in different scenarios and improve the user experience, it is necessary to reasonably evaluate the performance of the host machines and allocate cloud resources for virtual machines with different requirements according to the evaluation results.
[0003] The existing host machine performance evaluation methods mainly conduct non-discriminatory and comprehensive tests on multiple host machines one by one. However, this method may concentrate multiple virtual machines on a certain high-performance host machine. When this host machine is overloaded, the overall performance will decline, affecting the operation of relevant virtual machines. Moreover, once this host machine has a hardware failure, all virtual machines running on it will be affected, resulting in service interruption. Summary of the Invention
[0004] This application proposes a cloud resource allocation method and system for virtual machines, which selects the most suitable host machine for the virtual machine to be published based on the current resource allocation situation, reduces the load of the host machine, and enables the virtual machine to run stably all the time.
[0005] The first aspect of this application provides a cloud resource allocation method for virtual machines, and the method includes:
[0006] Select several performance indicators from the collected network status data according to the business requirements of the virtual machine to be published;
[0007] Mine the association relationship between the virtual machines to be published to generate business rules, and generate corresponding constraint conditions according to the resource allocation target;
[0008] Based on the performance indicators, with the goal of meeting the constraint conditions and the business rules, perform performance evaluation on all host machines through a preset performance evaluation model to obtain the host machine performance evaluation results;
[0009] Allocate cloud resource pools for the virtual machines to be published according to the host machine performance evaluation results.
[0010] The above solution first selects corresponding performance indicators according to the business requirements that the virtual machines to be released focus on. For example, if the virtual machines to be released require a high business response speed, the load situation of the host is selected as one of the performance indicators to reduce the risk of resource contention. Then, relationship mining is performed among multiple virtual machines to be released to obtain corresponding business rules and constraints, which helps to allocate resources more reasonably later to meet the actual needs of each virtual machine. Next, the performance scores of each host are calculated through the performance evaluation model using the performance indicators. When the constraint conditions and the business rules are met, the host performance evaluation results are output to obtain the performance evaluation data of each host. Finally, the cloud resource pool corresponding to the host with the highest performance score is allocated to the virtual machines to be released, reducing the resource contention situation and enabling the virtual machines to run stably all the time.
[0011] In a possible implementation method of the first aspect, several performance indicators are selected from the collected network status data according to the business requirements of the virtual machines to be released, specifically:
[0012] Collect the current network usage data to obtain the network status data;
[0013] Select several performance indicators that meet the business requirements from the network status data and normalize the performance indicators.
[0014] In a possible implementation method of the first aspect, the association relationships among the virtual machines to be released are mined to generate business rules, and corresponding constraint conditions are generated according to the resource allocation objectives, specifically:
[0015] According to the services to be executed by each virtual machine to be released, determine the virtual machines to be released with association relationships and generate business rules; among them, the business rules include that the virtual machines to be released with association relationships cannot be placed on the same host;
[0016] Generate the constraint conditions through the resource allocation objectives in the cloud resource pool allocation process.
[0017] The above solution first analyzes whether there are business associations among each virtual machine to be released, and requires that the virtual machines to be released with association relationships be deployed on different hosts respectively to avoid all services being unable to run due to failures of some hosts.
[0018] In a possible implementation method of the first aspect, the resource allocation objectives include reducing the load situation of the host and maximizing the resource utilization rate of the host.
[0019] In a possible implementation method of the first aspect, based on the performance metrics, with the goal of meeting the constraint conditions and the business rules, all host machines are performance-evaluated through a preset performance evaluation model to obtain the host machine performance evaluation results, specifically:
[0020] Collect the operation data of the host machine according to the performance metrics;
[0021] Input the operation data and the resource requirements of the virtual machines to be released collected into the performance evaluation model, and optimize the parameters of the performance evaluation model with the goal of meeting the constraint conditions and the business rules, and calculate the performance scores of each host machine;
[0022] Rank all host machines according to the performance scores to generate the host machine performance evaluation results.
[0023] In a possible implementation method of the first aspect, with the goal of meeting the constraint conditions and the business rules, optimize the parameters of the performance evaluation model and calculate the performance scores of each host machine, specifically:
[0024] Iteratively optimize the weight coefficients of the performance evaluation model through the constraint conditions and the business rules, and determine the optimal weight coefficients corresponding to each performance metric when the constraint conditions and the business rules are met;
[0025] Calculate the performance scores of each host machine according to the optimal weight coefficients and the operation data corresponding to the optimal weight coefficients.
[0026] The above solution determines what the performance metrics that need to be most concerned about when deploying the virtual machine are through the constraint conditions and the business rules, and adjusts the values of the weight coefficients accordingly. Through the obtained optimal weight coefficients and the corresponding current actual operation data, the performance scores of each host machine are calculated. According to the performance scores, the currently active host machines can be ranked, and the virtual machine is deployed to run on the optimal host machine.
[0027] In a possible implementation method of the first aspect, calculate the performance scores of each host machine, specifically:
[0028]
[0029] In the formula, Score is the performance score of the host machine, n is the total number of performance metrics, Metric i is the operation data corresponding to the i-th performance metric, and Weight i is the optimal weight coefficient corresponding to the i-th performance metric.
[0030] In a possible implementation method of the first aspect, it further includes:
[0031] Collect the operation status data and resource usage data of the host machine in real time at a preset frequency, and input the operation status data and the resource usage data into the performance evaluation model to update the performance evaluation result of the host machine;
[0032] Perform data migration on the published virtual machines according to the updated performance evaluation result of the host machine.
[0033] The above solution monitors the operation status of the host machine regularly, updates the performance ranking of the host machine in real time, and can migrate the virtual machine to a suitable host machine in time when the performance of the host machine drops severely, ensuring that the service can run normally.
[0034] The second aspect of the present application provides a cloud resource allocation system for virtual machines, and the system includes: a performance index selection module, a constraint condition generation module, a performance evaluation module, and a cloud resource allocation module;
[0035] Among them, the performance index selection module is used to select several performance indexes from the collected network status data according to the service requirements of the virtual machine to be published;
[0036] The constraint condition generation module is used to mine the association relationship between the virtual machines to be published, generate business rules, and generate corresponding constraint conditions according to the resource allocation target;
[0037] The performance evaluation module is used to perform performance evaluation on all host machines through a preset performance evaluation model based on the performance indexes with the goal of meeting the constraint conditions and the business rules, and obtain the performance evaluation result of the host machine;
[0038] The cloud resource allocation module is used to allocate a cloud resource pool for the virtual machine to be published according to the performance evaluation result of the host machine.
[0039] The third aspect of the present application provides a terminal device, and the device includes: a terminal device, including a processor and a memory, the memory stores a computer program, and when the processor executes the computer program, it implements the steps of a cloud resource allocation method for virtual machines according to any one of the embodiments of the present application. Description of the Drawings
[0040] In order to more clearly illustrate the technical solutions of the present application, the drawings required for implementation will be briefly introduced below. Obviously, the drawings in the following description are only some embodiments of the present application. For those of ordinary skill in the art, other drawings can be obtained based on these drawings without creative efforts.
[0041] Figure 1It is a schematic diagram of the specific process of a cloud resource allocation method for virtual machines provided by an embodiment of the present application;
[0042] Figure 2 It is a specific structural diagram of a cloud resource allocation system for virtual machines provided by an embodiment of the present application;
[0043] Figure 3 It is a structural diagram of a terminal device provided by an embodiment of the present application. Specific embodiments
[0044] Next, the technical solutions in the embodiments of the present application will be clearly and completely described in conjunction with the accompanying drawings in the embodiments of the present application. Obviously, the described embodiments are only a part of the embodiments of the present application, rather than all the embodiments. Based on the embodiments in the present application, all other embodiments obtained by those of ordinary skill in the art without creative efforts shall fall within the protection scope of the present application.
[0045] It should be understood that the step numbers used in the text are only for convenient description and are not used to limit the execution order of the steps.
[0046] First embodiment
[0047] Virtual machine publishing is usually deployed and published on a physical host, and the required cloud resource pool is configured through the cloud platform to support the operation of the business. However, when multiple virtual machines need to be published, they are often published on the same host, which easily leads to multiple virtual machines of the same application being deployed on the same host. Once the host has a hardware failure, all virtual machines running on it will be affected, resulting in service interruption. In addition, if the virtual machines are located in the same network failure domain, then any network problems affecting the failure domain (such as switch failure, network attack, etc.) will affect these virtual machines at the same time, increasing the risk of service interruption. Therefore, how to allocate cloud resources to reduce the risk of virtual machine service interruption, while ensuring that each virtual machine can obtain the required computing resources and avoiding performance degradation caused by resource competition, is the main research direction of the embodiments of the present application.
[0048] As Figure 1 shown, Figure 1 It is a schematic diagram of the specific process of a cloud resource allocation method for virtual machines provided by an embodiment of the present application. The cloud resource allocation method for virtual machines in this embodiment includes steps S1 to S4, which are described in detail as follows:
[0049] Step S1, select several performance indicators from the collected network status data according to the business requirements of the virtual machine to be published.
[0050] In the embodiments of the present application, first, data such as physical host machines (such as CPU utilization rate, memory occupancy, disk I / O, etc.), network status (such as bandwidth usage, latency, etc.), network fault domain status (such as switch partitions, network fault domains to which physical host machines belong, etc.), and virtual machine resource usage requirements (such as CPU utilization trend, memory size, etc.) are collected from an existing data center management system, etc. The current network usage data is collected from them to obtain the network status data.
[0051] Then, the business requirements of the currently to-be-released virtual machines are obtained, and according to the business requirements, the characteristics of the host machines that each to-be-released virtual machine focuses on are determined, and a corresponding number of performance indicators are obtained.
[0052] Specifically, the main performance indicators collected in the embodiments of the present application include CPU utilization rate (peak value and average value), memory utilization rate, virtual machine density (physical core oversubscription ratio), network bandwidth usage, etc.
[0053] Exemplarily, if the to-be-released virtual machine has high requirements for response speed, then the characteristics of the host machines that are focused on are less resource contention, lower network latency, and lower disk I / O latency, etc.
[0054] Furthermore, in order to better distinguish the business requirements of different to-be-released virtual machines, the to-be-released virtual machines in the embodiments of the present application are divided into four types, including CPU-intensive, memory-sensitive, I / O-sensitive, and network-sensitive.
[0055] CPU-intensive: The services corresponding to this type of to-be-released virtual machines often keep the CPU in a high-load state, which means that they will occupy a large amount of processor time to complete complex computing tasks. Therefore, the resource contention rate is relatively high, and it is required that the allocated cloud resource pool can support the continuous operation of the services.
[0056] Memory-sensitive: The services corresponding to this type of to-be-released virtual machines have high requirements for memory and require a large amount of physical memory to ensure that data can be accessed quickly. If the memory is insufficient, the system will frequently use the disk swap space, which will significantly reduce the performance.
[0057] I / O-sensitive: The services corresponding to this type of to-be-released virtual machines are, for example, applications that frequently perform read and write operations (such as database services). Therefore, they have high requirements for disk I / O speed and efficiency. The services processed by these virtual machines are very sensitive to the latency, throughput, and IOPS (input / output operations per second) of the storage system.
[0058] Network-sensitive: The services corresponding to this type of to-be-released virtual machines rely on network communication, such as Web servers or distributed computing tasks. These services have high requirements for network bandwidth, latency, and stability.
[0059] Then, normalize or standardize the obtained performance metrics for subsequent use.
[0060] S2. Mine the association relationships between the virtual machines to be released, generate business rules, and generate corresponding constraint conditions according to the resource allocation goals.
[0061] In the embodiment of the present application, perform relationship mining on the virtual machines to be released. By sorting out the relationships between the services to be executed by each virtual machine, the virtual machines with cross relationships between services are defined as the virtual machines to be released with association relationships. Since there are cross relationships between the services of these virtual machines, these virtual machines cannot go down at the same time. If these virtual machines are deployed on the same host, when a hardware failure occurs on the host, all virtual machines running on it will be affected, resulting in the interruption of the services to which the services belong. Therefore, the business rules generated according to the services to be executed by each virtual machine to be released can require that the virtual machines to be released with association relationships cannot be deployed on the same host.
[0062] In addition, the business rules may further include that different services of the same service cannot be placed in the same network failure domain. This is because if the virtual machines are located in the same network failure domain, then any network problems affecting the failure domain (such as switch failures, network attacks, etc.) will affect these virtual machines at the same time, increasing the risk of service interruption.
[0063] Then, generate the constraint conditions through the resource allocation goals in the cloud resource pool allocation process, which may specifically include maximizing resource utilization and reducing resource contention (i.e., reducing the load on the host). For example, if there are already multiple CPU-intensive virtual machines loaded on a host, adding more will cause resource contention. At this time, according to the set constraint conditions, no more virtual machines will be configured on this host.
[0064] S3. Based on the performance metrics, with the goal of meeting the constraint conditions and the business rules, perform performance evaluation on all hosts through a preset performance evaluation model to obtain the host performance evaluation results.
[0065] In the embodiment of the present application, first, according to the determined performance metrics, collect the operation data of the active hosts in real time, including the current CPU usage rate, memory occupancy, disk I / O, etc. of each host.
[0066] Then, input these operation data and the resource requirements of the virtual machines to be released collected into the trained performance evaluation model to calculate the performance score of each host. Among them, the training process of the performance evaluation model is to adjust the model parameters through a supervised learning algorithm to minimize the loss function of the model by minimizing the gap between the prediction and the actual placement location of the virtual machine.
[0067] The performance evaluation model aims to meet the constraint conditions and the business rules, and continuously iteratively optimizes the weight coefficients corresponding to each performance metric through the constraint conditions and the business rules. For example, the constraint condition requires reducing resource contention, indicating that the virtual machine to be released attaches great importance to the load situation of the host machine, and will preferentially deploy the virtual machine on the host machine with less load pressure. At this time, the weight coefficient corresponding to this performance metric (the load situation of the host machine) will be increased to highlight the importance of this performance metric.
[0068] When the constraint conditions and the business rules are met, the optimal weight coefficients corresponding to each performance metric are determined. Through the optimal weight coefficients and the operation data corresponding to the optimal weight coefficients, the performance score of each host machine is calculated, specifically:
[0069]
[0070] In the formula, Score is the performance score of the host machine, n is the total number of performance metrics, Metric i is the operation data corresponding to the i-th performance metric, and Weight i is the optimal weight coefficient corresponding to the i-th performance metric.
[0071] All host machines are sorted according to the performance scores of each host machine, and the host machine performance evaluation results are output.
[0072] S4. According to the host machine performance evaluation results, allocate cloud resource pools for the virtual machines to be released.
[0073] In the embodiment of the present application, according to the host machine performance evaluation results, the virtual machines to be released are preferentially placed on the host machine with the highest performance score and cloud resource pools are allocated for them. When the operation status and network status of the host machine are affected due to a large number of deployed virtual machines in the future, the performance evaluation model will be dynamically adjusted again and the performance scores will be recalculated.
[0074] Specifically, the operation status data and resource usage data of the host machine are collected in real time at a preset frequency, and the operation status data and the resource usage data are input into the performance evaluation model to update the host machine performance evaluation results to re-evaluate the host machine status.
[0075] If the current status of the host machine is too poor, for example, the load of the host machine is too heavy, the virtual machines deployed on this host machine will be migrated to other host machines with good loads to ensure that the services of the virtual machines can run normally, and the overall performance of the virtual machines with too large loads will not decline.
[0076] Implementing the embodiments of the present application has the following beneficial effects:
[0077] In the embodiments of the present application, first, according to the business requirements that the virtual machines to be released focus on, corresponding performance indicators are selected. For example, if the virtual machines to be released require a high business response speed, then the load situation of the host is selected as one of the performance indicators to reduce the risk of resource contention. Then, relationship mining is performed among multiple virtual machines to be released to obtain corresponding business rules and constraints, which helps to allocate resources more reasonably subsequently and meet the actual needs of each virtual machine. Then, the performance scores of each host are calculated through the performance evaluation model using the performance indicators. When the constraint conditions and the business rules are met, the host performance evaluation results are output to obtain the performance evaluation data of each host. Finally, the cloud resource pool corresponding to the host with the highest performance score is allocated to the virtual machines to be released, reducing the resource contention situation and enabling the virtual machines to run stably all the time.
[0078] Second Embodiment
[0079] Furthermore, in order to execute the cloud resource allocation system for virtual machines corresponding to the above method embodiments to achieve the corresponding functions and technical effects, Figure 2 A structural diagram of a cloud resource allocation system for virtual machines is provided. For the sake of convenience of description, only the parts related to this embodiment are shown. The cloud resource allocation system for virtual machines provided by the embodiments of the present application includes:
[0080] A performance indicator selection module 201, configured to select a plurality of performance indicators from the collected network status data according to the business requirements of the virtual machines to be released.
[0081] In the embodiments of the present application, first, data such as physical host (such as CPU usage rate, memory occupancy, disk I / O, etc.), network status (such as bandwidth usage, latency, etc.), network fault domain situation (such as switch partition, network fault domain to which the physical host belongs, etc.) and virtual machine resource usage requirements (such as CPU utilization trend, memory size, etc.) are collected from the existing data center management system, etc., and the current network usage data is collected from them to obtain the network status data.
[0082] Then, the business requirements of the current virtual machines to be released are obtained, and according to the business requirements, the characteristics of the hosts that each virtual machine to be released focuses on are determined to obtain corresponding performance indicators.
[0083] Exemplarily, if the virtual machines to be released have high requirements for response speed, then the characteristics of the hosts that are focused on are less resource contention, lower network latency, and lower disk I / O latency, etc.
[0084] Further, to better distinguish the business requirements of different virtual machines to be released, the embodiments of the present application classify the virtual machines to be released into four types, including CPU-intensive, memory-sensitive, I / O-sensitive, and network-sensitive.
[0085] CPU-intensive: The operations corresponding to such virtual machines to be released often keep the CPU in a high-load state, which means they will occupy a large amount of processor time to complete complex computing tasks. Therefore, the resource contention rate is relatively high, and it is required that the allocated cloud resource pool can support the continuous operation of the operations.
[0086] Memory-sensitive: The operations corresponding to such virtual machines to be released have high requirements for memory and require a large amount of physical memory to ensure that data can be accessed quickly. If the memory is insufficient, the system will frequently use the disk swap space, which will significantly reduce the performance.
[0087] I / O-sensitive: The operations corresponding to such virtual machines to be released are applications that frequently perform read and write operations (such as database services), so they have high requirements for the disk I / O speed and efficiency. The operations processed by such virtual machines are very sensitive to the latency, throughput, and IOPS (input / output operations per second) of the storage system.
[0088] Network-sensitive: The operations corresponding to such virtual machines to be released rely on network communication, such as Web servers or distributed computing tasks. These operations have high requirements for network bandwidth, latency, and stability.
[0089] Then, the obtained performance metrics are normalized or standardized for subsequent use.
[0090] The constraint condition generation module 202 is configured to mine the association relationships between the virtual machines to be released, generate business rules, and generate corresponding constraint conditions according to the resource allocation target.
[0091] In the embodiments of the present application, relationship mining is performed on the virtual machines to be released. By sorting out the relationships between the operations to be executed by each virtual machine, the virtual machines with cross relationships between the operations are defined as the virtual machines to be released with association relationships. Because there are cross relationships between the operations of these virtual machines, these virtual machines cannot be down at the same time. If these virtual machines are deployed on the same host, when the host has a hardware failure, all the virtual machines running on it will be affected, resulting in the interruption of the services to which the operations belong. Therefore, the business rules generated according to the operations to be executed by each virtual machine to be released can require that the virtual machines to be released with association relationships cannot be deployed on the same host.
[0092] In addition, the business rules may further include that different services of the same service cannot be placed in the same network failure domain. This is because if virtual machines are located in the same network failure domain, any network problems affecting this failure domain (such as switch failures, network attacks, etc.) will affect these virtual machines simultaneously, increasing the risk of service interruption.
[0093] Then, through the resource allocation objectives in the cloud resource pool allocation process, the constraint conditions are generated, which may specifically include maximizing resource utilization and reducing resource contention. For example, if there are already multiple CPU-intensive virtual machines loaded on a host, resource contention will occur if more are added. At this time, according to the set constraint conditions, virtual machines will not be configured on this host anymore.
[0094] The performance evaluation module 203 is used to perform performance evaluation on all hosts based on the performance metrics, with the goal of meeting the constraint conditions and the business rules, through a preset performance evaluation model to obtain the host performance evaluation results.
[0095] In the embodiment of the present application, first, according to the determined performance metrics, the operation data of the active hosts is collected in real time, including the current CPU usage rate, memory occupancy, disk I / O, etc. of each host.
[0096] Then, these operation data and the resource requirements of the virtual machines to be published collected are input into the trained performance evaluation model to calculate the performance score of each host. Among them, the training process of the performance evaluation model is to adjust the model parameters through a supervised learning algorithm to minimize the loss function of the model by minimizing the gap between the prediction and the actual placement location of the virtual machine.
[0097] The performance evaluation model takes meeting the constraint conditions and the business rules as the goal, and continuously iteratively optimizes the weight coefficients corresponding to each performance metric through the constraint conditions and the business rules. For example, the constraint condition requires reducing resource contention, indicating that the virtual machines to be published attach more importance to the load situation of the hosts, and will preferentially deploy the virtual machines on the hosts with less load pressure. At this time, the weight coefficient corresponding to this performance metric (the load situation of the host) will be increased to highlight the importance of this performance metric.
[0098] When the constraint conditions and the business rules are met, the optimal weight coefficients corresponding to each performance metric are determined. Through the optimal weight coefficients and the operation data corresponding to the optimal weight coefficients, the performance score of each host is calculated, specifically:
[0099]
[0100] Wherein, Score is the performance score of the host, n is the total number of performance metrics, Metric i is the operation data corresponding to the i-th performance metric, and Weight i is the optimal weight coefficient corresponding to the i-th performance metric.
[0101] Sort all hosts according to the performance scores of each host, and output the host performance evaluation results.
[0102] The cloud resource allocation module 204 is used to allocate a cloud resource pool for the virtual machines to be released according to the host performance evaluation results.
[0103] In the embodiment of the present application, according to the host performance evaluation results, the virtual machines to be released are preferentially placed on the host with the highest performance score and a cloud resource pool is allocated for it. When the subsequent large number of deployed virtual machines affects the operation status and network status of the host, the performance evaluation model will be dynamically adjusted and the performance scores will be recalculated.
[0104] Specifically, the operation status data and resource usage data of the host are collected in real time at a preset frequency, and the operation status data and the resource usage data are input into the performance evaluation model to update the host performance evaluation results to re-evaluate the host status.
[0105] If the current status of the host is too poor, for example, the load of the host is too heavy, the virtual machines deployed on this host will be migrated to other hosts with good loads to ensure that the services of the virtual machines can run normally, and the overall performance of the virtual machines with too large loads will not decline.
[0106] Implementing the embodiment of the present application has the following beneficial effects:
[0107] In the embodiment of the present application, first, according to the business requirements that the virtual machines to be released focus on, the corresponding performance metrics are selected. For example, if the virtual machines to be released require high business response speed, then the load condition of the host is selected as one of the performance metrics to reduce the risk of resource contention. Then, relationship mining is performed among multiple virtual machines to be released to obtain the corresponding business rules and constraints, which helps to allocate resources more reasonably and meet the actual needs of each virtual machine. Then, the performance scores of each host are calculated through the performance metrics by the performance evaluation model, and the host performance evaluation results are output when the constraints and the business rules are met to obtain the performance evaluation data of each host. Finally, a cloud resource pool corresponding to the host with the highest performance score is allocated for the virtual machines to be released, reducing the resource contention situation and enabling the virtual machines to run stably all the time.
[0108] Furthermore, Figure 3The structural diagram of a terminal device provided by an embodiment of the present application. As Figure 3 shown, the terminal device 3 of this embodiment includes: at least one processor 30 (only one is shown in Figure 3 the figure), a memory 31, and a computer program 32 stored in the memory 31 and executable on the at least one processor. When the processor 30 executes the computer program 32, it can implement the steps of a cloud resource allocation method for a virtual machine described in any one of the embodiments of the present application.
[0109] The terminal device 3 may be a computing device such as a desktop computer, a cloud server, and a laptop computer. The computing device may include, but is not limited to, the processor 30 and the memory 31. Figure 3 This is only an example of the terminal device 3 and does not limit the terminal device 3. It may include more or fewer components than those shown in the figure.
[0110] The above specific embodiments further elaborate on the purpose, technical solution, and beneficial effects of the present application. It should be understood that the above are only specific embodiments of the present application and are not used to limit the protection scope of the present application. In particular, for those skilled in the art, any modifications, equivalent replacements, improvements, etc. made within the spirit and principle of the present application shall be included in the protection scope of the present application.
Claims
1. A cloud resource allocation method for virtual machines, characterized in that: include: According to the business requirements of the virtual machine to be released, several performance indicators are selected from the collected network status data; Mining the associations between virtual machines to be released, generating business rules, and generating corresponding constraints based on resource allocation goals; Based on the performance indicators, with the goal of satisfying the constraints and the business rules, a performance evaluation is performed on all host machines through a preset performance evaluation model to obtain a host machine performance evaluation result; According to the host machine performance evaluation result, a cloud resource pool is allocated to the virtual machine to be released.
2. The cloud resource allocation method for virtual machines according to claim 1, characterized in that: According to the business requirements of the virtual machine to be released, several performance indicators are selected from the collected network status data, specifically: Collect current network usage data to obtain the network status data; A plurality of performance indicators that meet the business requirements are selected from the network status data, and the performance indicators are normalized.
3. The cloud resource allocation method for virtual machines according to claim 1, characterized in that: The association relationship between the virtual machines to be released is mined to generate business rules, and corresponding constraint conditions are generated according to the resource allocation target, specifically: According to the services to be performed by each to-be-released virtual machine, determine the to-be-released virtual machines with associated relationships, and generate business rules; wherein the business rules include that the to-be-released virtual machines with associated relationships cannot be placed on the same host machine; The constraint condition is generated through the resource allocation target in the cloud resource pool allocation process.
4. The cloud resource allocation method for virtual machines according to claim 3, characterized in that: The resource allocation objectives include reducing the load of the host machine and maximizing the resource utilization of the host machine.
5. The cloud resource allocation method for virtual machines according to claim 1, characterized in that: Based on the performance indicators, with the goal of satisfying the constraints and the business rules, the performance of all hosts is evaluated through a preset performance evaluation model to obtain a host performance evaluation result, specifically: According to the performance indicators, collect the operation data of the host machine; Inputting the operation status data and the collected resource requirements of the virtual machines to be released into the performance evaluation model, optimizing the parameters of the performance evaluation model with the goal of satisfying the constraints and the business rules, and calculating the performance score of each host machine; All hosts are ranked according to the performance scores to generate host performance evaluation results.
6. The cloud resource allocation method for virtual machines according to claim 5, characterized in that: The performance evaluation model is tuned for parameters to meet the constraint conditions and the business rules, and the performance score of each host is calculated, specifically: Iteratively tuning the weight coefficient of the performance evaluation model according to the constraint conditions and the business rules, and determining the optimal weight coefficient corresponding to each performance indicator when the constraint conditions and the business rules are met; The performance score of each host machine is calculated according to the optimal weight coefficient and the operating status data corresponding to the optimal weight coefficient.
7. The cloud resource allocation method for virtual machines according to claim 6, characterized in that: The calculation of the performance score of each host is specifically as follows: In the formula, Score is the performance score of the host, n is the total number of performance indicators, and Metric i is the operating data corresponding to the i-th performance indicator, Weight i is the optimal weight coefficient corresponding to the i-th performance indicator.
8. The cloud resource allocation method for virtual machines according to any one of claims 1 to 7, characterized in that: Also includes: Collecting the operating status data and resource usage data of the host machine in real time at a preset frequency, and inputting the operating status data and the resource usage data into the performance evaluation model to update the host machine performance evaluation result; According to the updated host machine performance evaluation result, data migration is performed on the published virtual machine.
9. A cloud resource allocation system for virtual machines, characterized in that: include: Performance indicator selection module, constraint condition generation module, performance evaluation module and cloud resource allocation module; Among them, the performance indicator selection module is used to select several performance indicators from the collected network status data according to the business requirements of the virtual machine to be released; The constraint generation module is used to mine the associations between virtual machines to be released, generate business rules, and generate corresponding constraint conditions according to resource allocation goals; The performance evaluation module is used to perform performance evaluation on all host machines through a preset performance evaluation model based on the performance indicators and with the goal of satisfying the constraint conditions and the business rules, to obtain a host machine performance evaluation result; The cloud resource allocation module is used to allocate a cloud resource pool to the virtual machine to be released according to the host machine performance evaluation result.
10. A terminal device, characterized in that: The method comprises a processor and a memory, wherein the memory stores a computer program, and when the processor executes the computer program, the steps of a cloud resource allocation method for virtual machines according to any one of claims 1 to 8 are implemented.