A method and device for scheduling cloud computing resources
Through filtering conditions and the remaining resources of the resource pool group, flexible and efficient resource scheduling of the private cloud is achieved, solving the problems of resource management and utilization of private clouds, and improving resource utilization and stability.
Patent Information
- Application Number
- CN202210326369.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-03-30
- Publication Date
- 2024-12-13
- Estimated Expiration
- 2042-03-30
AI Technical Summary
It is difficult for private cloud to be extracted from complicated hardware and resource management, and to flexibly and efficiently schedule various resources required for multi-users, while ensuring the stability, energy saving and high availability of the scheduling process.
Through the filtering conditions and the remaining resources of the resource pool group, the cloud computing resources that meet the filtering conditions and the largest number of remaining resources are scheduled to the user, including determining the maximum number of virtual machines based on the remaining resources of the resource pool group, sorting and allocating the resource pool group , ensure efficient use of resources.
It realizes flexible and efficient resource scheduling for private clouds. Compared with resource allocation that satisfies the condition, it improves resource utilization and stability, and reduces management complexity and energy consumption.
Smart Images

Figure CN114741190B_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of computers, and in particular to a method and device for scheduling cloud computing resources. Background Art
[0002] With the development of computer technology, cloud computing has also been widely used, which makes the scheduling algorithm of cloud computing platform increasingly important. Cloud computing is a service related to information technology, software, and the Internet. Cloud computing brings together many computing resources and realizes automatic management through software. Cloud computing platform, also known as cloud platform, refers to a service based on hardware resources and software resources, providing computing, network and storage capabilities. The cloud platform hides the hardware implementation and management details from users. Users only need to send requests to the cloud platform to get different levels and types of resource services.
[0003] Cloud resources include public clouds and private clouds. Due to their special needs for data, security, and service quality, private clouds are usually deployed in enterprise data centers. How can private clouds be separated from the complicated hardware and resource management, and flexibly and efficiently dispatch various resources required by many users, while ensuring the dispatching process is stable, energy-saving, and highly available? This is an urgent problem that private clouds need to solve. Summary of the invention
[0004] The present application provides a method for scheduling cloud computing resources, which can achieve flexible and efficient scheduling of private clouds.
[0005] The present application provides a method for scheduling cloud computing resources, the method comprising:
[0006] Filter multiple resource pool group GRUs according to the first filtering condition to obtain a first resource pool group GRU set;
[0007] Determine the maximum number of virtual machines that can be allocated to each resource pool group GRU according to the remaining number of resources of each resource pool group GRU in the first resource pool group GRU set;
[0008] Sort multiple resource pool groups GRU in descending order according to the maximum number of virtual machines that can be allocated;
[0009] The resource pool group GRU ranked first in the ranking is determined as the resource for the user to perform cloud computing.
[0010] Optionally, the first screening condition includes a first sub-screening condition and a second sub-screening condition; the first sub-screening condition includes at least the disaster recovery level, quantity and network area of the virtual machines required for cloud computing; the second sub-screening condition is that the number of remaining Internet Protocol IP addresses of the first resource pool group GRU is greater than the required number of IP addresses of the virtual machines required for the cloud computing;
[0011] The screening of the plurality of resource pool groups GRU according to the first screening condition to obtain a first resource pool group GRU set includes:
[0012] According to the first sub-screening condition and the second sub-screening condition, multiple resource pool groups GRU are screened in sequence to obtain a first resource pool group GRU set.
[0013] Optionally, the remaining resources include a central processing unit CPU, a memory and a storage space; each resource pool group GRU includes a plurality of minimum resource pool units RU;
[0014] The determining the maximum number of virtual machines that can be allocated to each resource pool group GRU according to the remaining number of resources of each resource pool group GRU in the first resource pool group GRU set includes:
[0015] Determine the maximum number of virtual machines that can be allocated to each minimum resource pool unit RU according to the remaining CPU quantity, remaining memory quantity and remaining storage space quantity of each minimum resource pool unit RU in each resource pool group GRU;
[0016] The maximum number of virtual machines that can be allocated to each resource pool group GRU is determined according to the maximum number of virtual machines that can be allocated to each minimum resource pool unit RU in each resource pool group GRU.
[0017] Optionally, before sorting the multiple resource pool groups GRU in descending order according to the maximum number of virtual machines that can be allocated, the method further includes:
[0018] Determine whether the maximum number of virtual machines that can be allocated by each resource pool group GRU is less than the number of virtual machines required by the user for cloud computing. If so, continue with the subsequent steps. If so, delete the resource pool group GRU with a number less than the number of virtual machines required by the user for cloud computing from the first resource pool group GRU set.
[0019] Optionally, each resource pool group GRU includes multiple minimum resource pool units RU, and each minimum resource pool unit RU includes multiple host machines host;
[0020] The method further comprises:
[0021] The actual number of virtual machines allocated to each host is less than half of the number of virtual machines required by the user for cloud computing.
[0022] Optionally, the multiple host machines host include a first host machine and a second host machine, and the first host machine and the second host machine can allocate the same number of actual virtual machines;
[0023] The method further comprises:
[0024] The actual number of virtual machines is allocated to the first host machine and the second host machine in descending order of unused time.
[0025] The present application provides a cloud computing resource scheduling device, the device comprising:
[0026] A screening unit, configured to screen the plurality of resource pool groups GRU according to a first screening condition to obtain a first resource pool group GRU set;
[0027] A first determining unit, configured to determine a maximum number of virtual machines that can be allocated to each resource pool group GRU according to the number of remaining resources of each resource pool group GRU in the first resource pool group GRU set;
[0028] A sorting unit, used for sorting the multiple resource pool groups GRU in descending order according to the maximum number of virtual machines that can be allocated;
[0029] The second determining unit is used to determine the resource pool group GRU that is ranked first in the sorting as the resource for the user to perform cloud computing.
[0030] Optionally, the first screening condition includes a first sub-screening condition and a second sub-screening condition; the first sub-screening condition includes at least the disaster recovery level, quantity and network area of the virtual machines required for cloud computing; the second sub-screening condition is that the number of remaining Internet Protocol IP addresses of the first resource pool group GRU is greater than the required number of IP addresses of the virtual machines required for the cloud computing;
[0031] The screening unit is specifically used for:
[0032] According to the first sub-screening condition and the second sub-screening condition, multiple resource pool groups GRU are screened in sequence to obtain a first resource pool group GRU set.
[0033] Optionally, the remaining resources include a central processing unit CPU, a memory and a storage space; each resource pool group GRU includes a plurality of minimum resource pool units RU;
[0034] The first determining unit is specifically configured to:
[0035] Determine the maximum number of virtual machines that can be allocated to each minimum resource pool unit RU according to the remaining CPU quantity, remaining memory quantity and remaining storage space quantity of each minimum resource pool unit RU in each resource pool group GRU;
[0036] The maximum number of virtual machines that can be allocated to each resource pool group GRU is determined according to the maximum number of virtual machines that can be allocated to each minimum resource pool unit RU in each resource pool group GRU.
[0037] Optionally, the device further comprises:
[0038] The judgment unit is used to judge whether the maximum number of virtual machines that can be allocated by each resource pool group GRU is less than the number of virtual machines required by the user for cloud computing. If so, continue with the subsequent steps; if so, delete the resource pool group GRU with a number less than the number of virtual machines required by the user for cloud computing in the first resource pool group GRU set.
[0039] The embodiment of the present application provides a method for scheduling cloud computing resources, the method comprising: screening multiple resource pool groups GRU according to a first screening condition to obtain a first resource pool group GRU set, determining the maximum number of virtual machines that each resource pool group GRU can allocate according to the number of remaining resources of each resource pool group GRU in the first resource pool group GRU set, sorting the multiple resource pool groups GRU in descending order according to the maximum number of virtual machines that can be allocated, and determining the resource pool group GRU that ranks first in the sorting as a resource for the user to perform cloud computing. It can be seen that the embodiment of the present application schedules the cloud computing resources that meet the screening conditions and the number of remaining resources of the GRU to the user through the screening conditions and the number of remaining resources of the GRU. Compared with scheduling cloud resources for users based on user applications only, the embodiment of the present application can achieve flexible and efficient scheduling of private clouds. BRIEF DESCRIPTION OF THE DRAWINGS
[0040] In order to more clearly illustrate the embodiments of the present application 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 some embodiments recorded in the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative work.
[0041] Figure 1 A flowchart of a method for scheduling cloud computing resources provided in an embodiment of the present application;
[0042] Figure 2 A flowchart of virtual machine allocation provided in an embodiment of the present application;
[0043] Figure 3 A structural block diagram of a cloud computing resource scheduling device provided in an embodiment of the present application. DETAILED DESCRIPTION
[0044] In order to enable those skilled in the art to better understand the solution of the present application, the technical solution in the embodiments of the present application will be clearly and completely described below in conjunction with the drawings 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.
[0045] With the development of computer technology, cloud computing has also been widely used, which makes the scheduling algorithm of cloud computing platform increasingly important. Cloud computing is a service related to information technology, software, and the Internet. Cloud computing brings together many computing resources and realizes automatic management through software. Cloud computing platform, also known as cloud platform, refers to a service based on hardware resources and software resources, providing computing, network and storage capabilities. The cloud platform hides the hardware implementation and management details from users. Users only need to send requests to the cloud platform to get different levels and types of resource services.
[0046] The cloud era is a stage of human technological progress. With the continuous development and progress of information technology, cloud computing is being applied in more and more fields. The widespread application of cloud computing makes the server allocation strategy of the cloud computing platform very important, because the server allocation strategy directly affects the performance of the cloud computing platform and the user experience.
[0047] Cloud computing is a new Internet model that provides convenient, on-demand, and configurable services. How to achieve cost reduction, efficiency improvement, stability, and high availability of resource allocation while meeting user service quality is a difficult problem that cloud computing needs to solve.
[0048] Cloud resources include public clouds and private clouds. Due to their special needs for data, security, and service quality, private clouds are usually deployed in enterprise data centers. How can private clouds be separated from the complicated hardware and resource management, and flexibly and efficiently dispatch various resources required by many users, while ensuring the dispatching process is stable, energy-saving, and highly available? This is an urgent problem that private clouds need to solve.
[0049] The current scheduling method for private clouds is to obtain the required resource information input by the user, search for all current resource information based on the resource information requested by the user, and select resources that meet the user's needs from all the found resources to allocate to the user. This is a conditional resource allocation solution. The conditional resource allocation method is not the optimal solution for enterprise private clouds. From a horizontal dimension, it does not fully consider the number, sequence, and rules of screening factors, and the scientific nature of the screening idea is insufficient. From a vertical dimension, it does not consider the design of multi-level fault domains and is lacking in ensuring high availability. Without structured work, the screening and allocation work is relatively rough, and insufficient attention is paid to cost reduction, efficiency improvement, and speed increase, which is not conducive to refined management.
[0050] Based on this, an embodiment of the present application provides a method for scheduling cloud computing resources, the method comprising: screening multiple resource pool groups GRU according to a first screening condition to obtain a first resource pool group GRU set, determining the maximum number of virtual machines that each resource pool group GRU can allocate according to the number of remaining resources of each resource pool group GRU in the first resource pool group GRU set, sorting the multiple resource pool groups GRU in descending order according to the maximum number of virtual machines that can be allocated, and determining the resource pool group GRU that ranks first in the sorting as a resource for the user to perform cloud computing. It can be seen that the embodiment of the present application schedules the cloud computing resources that meet the screening conditions and the number of remaining resources of the GRU to the user through the screening conditions and the number of remaining resources of the GRU. Compared with scheduling cloud resources for users based on user applications only, the embodiment of the present application can achieve flexible and efficient scheduling of private clouds.
[0051] See also Figure 1 , which is a flowchart of a scheduling method for cloud computing resources provided in an embodiment of the present application.
[0052] The cloud computing resource scheduling method provided in this embodiment includes the following steps:
[0053] S101, screening multiple resource pool groups GRU according to a first screening condition to obtain a first resource pool group GRU set.
[0054] In the embodiments of the present application, cloud resources can be integrated into resource pools, and all computing resources can be turned into pools. Cloud computing is built based on these resource pools and resources are delivered as services. In other words, cloud resources include multiple resource pool groups (Group of Resource Unit, GRU), and GRU is composed of three peer minimum resource pool units (ResourceUnit, RU). Multiple virtual machines of an application can be created by polling in the three peer RUs of a GRU.
[0055] The plurality of resource pool group GRUs may be screened according to the first screening condition to obtain a first resource pool group GRU set. That is, not all GRUs meet the user's resource requirements, and therefore may be screened according to the first screening condition.
[0056] The first screening condition includes a first sub-screening condition and a second sub-screening condition. The first sub-screening condition includes at least the disaster recovery level, quantity and network area of the virtual machines required for cloud computing. The second sub-screening condition is that the number of remaining Internet Protocol IP addresses of the first resource pool group GRU is greater than the required IP number of virtual machines required for cloud computing.
[0057] Specifically, multiple resource pool groups GRU are screened in sequence according to the first sub-screening condition and the second sub-screening condition to obtain a first resource pool group GRU set.
[0058] You can first filter according to the first sub-filtering condition, that is, filter the GRU according to the disaster recovery level, quantity and network area of the virtual machines required for cloud computing. Each attribute in this type of filtering condition corresponds to the specific attributes in the resource pool. No calculation is required during the judgment process. You only need to traverse each GRU in the current remaining GRU set and compare the corresponding attribute information with the requested attribute information. If it meets the requirements, keep this GRU. If it does not meet the requirements, filter out this GRU.
[0059] As an example, if the disaster recovery level is less than 4, a shared disk resource is selected, and if the disaster recovery level is greater than or equal to 4, a local disk resource is selected.
[0060] Then continue to filter according to the second sub-filtering condition, which involves some simple calculations. The number of IPs belongs to a queryable item of the available network segment attribute in a GRU. You only need to query the network segment information in the GRU to obtain the total number of remaining available IPs in the network segment by taking the intersection of the network segment in the current GRU and the network area selected by the user, and then compare it with the number of virtual machines requested (one virtual machine is assigned one IP address). If the number of available IPs in the current GRU is less than the number of virtual machines currently requested to be created, the GRU is filtered out.
[0061] S102: Determine the maximum number of virtual machines that can be allocated by each resource pool group GRU according to the remaining number of resources of each resource pool group GRU in the first resource pool group GRU set.
[0062] In an embodiment of the present application, after the first resource pool group GRU set is obtained by screening, the maximum number of virtual machines that can be allocated to each resource pool group GRU is determined according to the number of remaining resources of each resource pool group GRU in the first resource pool group GRU set. The remaining resources include a central processing unit (CPU), memory, and storage space.
[0063] Specifically, the maximum number of virtual machines that can be allocated by each minimum resource pool unit RU can be determined based on the remaining CPU quantity, remaining memory quantity and remaining storage space quantity of each minimum resource pool unit RU in each resource pool group GRU, and then the maximum number of virtual machines that can be allocated by each minimum resource pool unit RU in each resource pool group GRU can be determined.
[0064] The GRU is screened for the remaining resources of each resource pool group GRU. This type of screening condition requires slightly complex statistical calculations. This part of the calculation does not require repeated statistics of the CPU margin, memory margin, and storage margin of each host host of each RU in the GRU and the current resource application amount for comparison, and can complete basic judgment and screening within the O(nlogn) time complexity, and the screened GRU must be able to meet the requirements of all current virtual machine allocations.
[0065] In practical applications, when GRU is screened based on the remaining resources, it can be divided into the following three cases according to whether the host has affinity: no concern for affinity, host affinity, and host non-affinity.
[0066] In the first case, the CPU margin, memory margin, and storage margin of each host in the RU in the current GRU are counted and stored in a set, as shown below:
[0067] resource_set={CPU(Z1)&MEM(Z1)&STO(Z1),...CPU(Z n )&MEM(Z n )&STO(Z n )}
[0068] Among them, CPU(Z1)&MEM(Z1)&STO(Z1) represent the CPU margin, memory margin, and storage margin in a host. After obtaining the CPU margin information, memory margin information, and storage margin information set of all hosts in the RU, the maximum number of virtual machines that can be created in the current host is determined according to the following formula:
[0069] Max_VM=min{CPU(Z i) / spec(CPU),MEM(Z i ) / spec(MEM),STO(Z i ) / STO(storage)}
[0070] Among them, spec(CPU), spec(MEM), and STO(storage) respectively represent the CPU specifications, memory specifications, and storage requirements of the currently applied group of virtual machines.
[0071] At this point, the number of virtual machines that can theoretically be allocated within one RU can be calculated as follows:
[0072]
[0073] In the embodiment of the present application, when affinity is not required, it is determined whether the maximum number of virtual machines that can be allocated by each resource pool group GRU is less than the number of virtual machines required by the user for cloud computing. If it is greater, the subsequent steps are continued. If it is less, the resource pool group GRU with less than the number of virtual machines required by the user for cloud computing is deleted from the first resource pool group GRU set. This is because virtual machines are allocated to each RU in a round-robin manner. Therefore, a judgment can be made when the number of virtual machines that can be allocated in an RU and the number of virtual machines that need to be allocated in the current RU are known. If the number of virtual machines that can be allocated in the current RU is less than the number of virtual machines that the current RU actually needs to allocate, the GRU is unavailable.
[0074] In the second case, there are n virtual machines in total, and the host machines include M i CN j Y, i≥1, j≥1. The number of virtual machines that can be allocated to each host is:
[0075] min{M1 / / X,N1 / / Y}=Z1
[0076] min{M2 / / X,N2 / / Y}=Z2 ...
[0078] min{M i / / X,N i / / Y}=Z i
[0079] The maximum number of virtual machines that can be allocated to a host is
[0080] max{Z i,i=1,2,3...}
[0081] When considering host affinity, compare the maximum number of virtual machines that a host can allocate with the number of virtual machines n. If the maximum number of virtual machines that a host can allocate is greater than n, the requirement is met, otherwise it is not met.
[0082] In the third case, the number of virtual machines is less than or equal to the total number of host machines.
[0083] min{M1 / / X,N1 / / Y}=Z1
[0084] min{M2 / / X,N2 / / Y}=Z2 ...
[0086] min{M i / / X,N i / / Y}=Z i
[0087] Determine the number of virtual machines allocated to each host machine
[0088] {Z i,i=1,2,3...}
[0089] Count the number of elements q greater than or equal to 1 in the number of virtual machines allocated to each host machine. If q ≥ n, the requirement is met, otherwise it is not met.
[0090] In other words, the above three situations are specific screening situations when screening GRU based on the remaining resources.
[0091] S103, sorting the multiple resource pool groups GRU in descending order according to the maximum number of virtual machines that can be allocated.
[0092] In an embodiment of the present application, after determining the maximum number of virtual machines that can be allocated by each resource pool group GRU, multiple resource pool groups GRU may be sorted in descending order according to the maximum number of virtual machines that can be allocated.
[0093] For the first case, when affinity is not considered, after counting the number of virtual machines that can be theoretically allocated in an RU, all RUs in a GRU are counted according to the number of virtual machines they can theoretically allocate, and then all current GRUs that meet the requirements are sorted from large to small according to the total number of virtual machines that each GRU can allocate.
[0094] S104: Determine the resource pool group GRU ranked first in the ranking as the resource for the user to perform cloud computing.
[0095] In an embodiment of the present application, after multiple resource pool groups GRU are sorted in descending order according to the maximum number of virtual machines that can be allocated, the resource pool group GRU ranked first in the sorting is determined as the resource for the user to perform cloud computing, that is, the GRU with the largest number of virtual machines that can be allocated is returned.
[0096] In an embodiment of the present application, each resource pool group GRU includes multiple minimum resource pool units RU, and each minimum resource pool unit RU includes multiple hosts. After allocating the GRU with the largest number of allocable virtual machines to the user, virtual machines can be allocated based on the balance of the host and whether they have affinity.
[0097] Specifically, the actual number of virtual machines allocated to each host is less than half of the number of virtual machines required by the user for cloud computing. In other words, in the same application, the number of virtual machines allocated to the same host is guaranteed to be less than 50% of the total number of virtual machines. When allocating virtual machines, each host must update the corresponding value in real time to facilitate the selection of the next round of hosts.
[0098] Among them, the list of allocable hosts corresponds to different host sets according to affinity. After GRU is selected, the RUs in GRU are evenly allocated in turn according to the number of RUs. For each host in each RU, the maximum number of virtual machines that can be created by the host, max_num, is calculated and compared with 50% (rounded down) of (total number of virtual machines vmNum-0.5). The smaller value of the two, min(max_num,[(vmNum-0.5)×0.5]), is selected as the final maximum number of virtual machines that can be created by the host, total_max_num. The reason is that the following three special cases need to be considered:
[0099] The first case is that the number of virtual machines to be created = 1, and the second case is that the number of virtual machines to be created = 2. In both cases, the value of [(vmNum-0.5)×0.5] is 0. Therefore, the number of virtual machines to be created is first multiplied by 3 to take the maximum value, that is: vmNum=max(vmNum,3), and then min(max_num,[(vmNum-0.5)×0.5]) is used to obtain the maximum number of virtual machines that can be created for the host, total_max_num.
[0100] The third case is c. The number of virtual machines is an even number greater than 2. After rounding down, 1 must be subtracted. Therefore, for each virtual machine, 0.5 can be subtracted and then multiplied by 0.5 and rounded down.
[0101] Poll each host according to the above conditions until the virtual machine is allocated.
[0102] As an example, refer to Figure 2As shown in the figure, after obtaining the GRU with the largest number of virtual machines that can be created, the three RUs in the GRU are calculated in turn. Specifically, the hosts in the RU can be calculated in turn, that is, the formula vmNum = max(vmNum, 3) and min(max_num, [(vmNum-0.5) × 0.5]) is used to obtain the maximum number of virtual machines that can be created for each host in the RU. Save and sum to get RU (sum), and judge whether the RU (sum) is greater than the number of RUs that need to be allocated. If less than, it fails. There is an RU that does not meet the conditions and does not meet the high availability requirements of the GRU. The GRU is unavailable and an exception message is thrown. If greater than, the RU is recorded. The allocatable status of each RU is operated, and it is continued to determine whether each RU can be allocated on demand. If not, it fails. There is an RU that does not meet the conditions and does not meet the high availability requirements of GRU. The GRU is unavailable and an exception message is thrown. If it can, it enters the virtual machine allocation process and loops with the number of virtual machines to be allocated as an indicator. It traverses the ordered hosts in the RU and determines whether the number of virtual machines that can be created by the host is greater than 0. If not, it jumps out of this round of loop and selects the next round of hosts for virtual machine allocation. If so, the host is selected for virtual machine allocation. Correspondingly, the number of virtual machines that can be created corresponding to the selected Host is reduced by 1, and the next round of host allocation cycle is entered.
[0103] In an embodiment of the present application, when allocating virtual machines, multiple host machines include a first host machine and a second host machine, and the first host machine and the second host machine can allocate the same number of actual virtual machines. The actual number of virtual machines can be allocated to the first host machine and the second host machine in descending order of unused time. This is because the temperature is too high or too low, which will change the clock frequency of the crystal oscillator in the server, resulting in deviation of the technical parameters of the components, logical errors in the logic circuit, and the electronic circuit of the server working in an unstable state. Nearly 11% of data center failures are caused by overheating. When there is a "hot spot area" in the server cluster, the hot spot area usually accelerates the failure rate of the hardware and brings additional overhead. Therefore, in order to keep the server working normally and stably and reduce the loss of the server, consider saving energy without shutting down and hibernating. When calculating the maximum number of virtual machines that can be created for each host machine, for the virtual machines that can be created with the same number, judge the state and read the state value of the previous allocation time. When allocating: among the host machine sets with the same maximum number of virtual machines that can be created, select the host machine that has not been used for the longest time for allocation, and update the state value of the allocation time of the host machine.
[0104] It can be seen that the method provided in the embodiment of the present application first pools the current cloud resources of the enterprise's private cloud computing platform, including computing resources, network resources, storage resources, etc., and conducts a comprehensive analysis of the factors that restrict allocation, classifies and sorts them according to the screening range and screening efficiency, designs an intelligent screening algorithm for the resource allocation process, clarifies the key elements and screening and scheduling processes of the intelligent scheduling algorithm, and uses an intelligent resource allocation logic algorithm to dynamically allocate the current user's required resources, constrains the number of virtual machines allocated to the same host machine, supports affinity and non-affinity selection, and ensures balanced use of resources, so as to achieve cost reduction, efficiency improvement, and speed up, and carry out resource allocation work in a stable and high-availability manner.
[0105] The embodiment of the present application provides a method for scheduling cloud computing resources, the method comprising: screening multiple resource pool groups GRU according to a first screening condition to obtain a first resource pool group GRU set, determining the maximum number of virtual machines that each resource pool group GRU can allocate according to the number of remaining resources of each resource pool group GRU in the first resource pool group GRU set, sorting the multiple resource pool groups GRU in descending order according to the maximum number of virtual machines that can be allocated, and determining the resource pool group GRU that ranks first in the sorting as a resource for the user to perform cloud computing. It can be seen that the embodiment of the present application schedules the cloud computing resources that meet the screening conditions and the number of remaining resources of the GRU to the user through the screening conditions and the number of remaining resources of the GRU. Compared with scheduling cloud resources for users based on user applications only, the embodiment of the present application can achieve flexible and efficient scheduling of private clouds.
[0106] Based on the above embodiment provided a method for scheduling cloud computing resources, the embodiment of the present application further provides a device for scheduling cloud computing resources, and its working principle is described in detail below in conjunction with the accompanying drawings.
[0107] See also Figure 3 , which is a structural block diagram of a scheduling device for cloud computing resources provided in an embodiment of the present application.
[0108] The cloud computing resource scheduling device 300 provided in this embodiment includes:
[0109] A screening unit 310, configured to screen a plurality of resource pool groups GRU according to a first screening condition to obtain a first resource pool group GRU set;
[0110] A first determining unit 320, configured to determine a maximum number of virtual machines that can be allocated to each resource pool group GRU according to the number of remaining resources of each resource pool group GRU in the first resource pool group GRU set;
[0111] A sorting unit 330, configured to sort the multiple resource pool groups GRU in descending order according to the maximum number of virtual machines that can be allocated;
[0112] The second determining unit 340 is configured to determine the resource pool group GRU that is ranked first in the ranking as the resource for the user to perform cloud computing.
[0113] Optionally, the first screening condition includes a first sub-screening condition and a second sub-screening condition; the first sub-screening condition includes at least the disaster recovery level, quantity and network area of the virtual machines required for cloud computing; the second sub-screening condition is that the number of remaining Internet Protocol IP addresses of the first resource pool group GRU is greater than the required number of IP addresses of the virtual machines required for the cloud computing;
[0114] The screening unit is specifically used for:
[0115] According to the first sub-screening condition and the second sub-screening condition, multiple resource pool groups GRU are screened in sequence to obtain a first resource pool group GRU set.
[0116] Optionally, the remaining resources include a central processing unit CPU, a memory and a storage space; each resource pool group GRU includes a plurality of minimum resource pool units RU;
[0117] The first determining unit is specifically configured to:
[0118] Determine the maximum number of virtual machines that can be allocated to each minimum resource pool unit RU according to the remaining CPU quantity, remaining memory quantity and remaining storage space quantity of each minimum resource pool unit RU in each resource pool group GRU;
[0119] The maximum number of virtual machines that can be allocated by each resource pool group GRU is determined according to the maximum number of virtual machines that can be allocated by each minimum resource pool unit RU in each resource pool group GRU.
[0120] Optionally, the device further comprises:
[0121] The judgment unit is used to judge whether the maximum number of virtual machines that can be allocated by each resource pool group GRU is less than the number of virtual machines required by the user for cloud computing. If so, continue with the subsequent steps; if so, delete the resource pool group GRU with a number less than the number of virtual machines required by the user for cloud computing in the first resource pool group GRU set.
[0122] Optionally, each resource pool group GRU includes multiple minimum resource pool units RU, and each minimum resource pool unit RU includes multiple host machines host;
[0123] The device also includes:
[0124] The first allocation unit is used to allocate an actual number of virtual machines to each host host that is less than half of the number of virtual machines required by the user for cloud computing.
[0125] Optionally, the multiple host machines host include a first host machine and a second host machine, and the first host machine and the second host machine can allocate the same number of actual virtual machines;
[0126] The device also includes:
[0127] The second allocation unit is configured to allocate actual numbers of virtual machines to the first host machine and the second host machine in descending order of unused time.
[0128] When introducing elements of various embodiments of the present application, the articles "a," "an," "the," and "said" are intended to mean that there are one or more elements. The words "comprising," "including," and "having" are all inclusive and mean that there may be additional elements in addition to the listed elements.
[0129] It should be noted that a person skilled in the art can understand that all or part of the processes in the above method embodiments can be implemented by instructing related hardware through a computer program, and the program can be stored in a computer-readable storage medium, and when the program is executed, it can include the processes in the above method embodiments. The storage medium can be a disk, an optical disk, a read-only memory (ROM) or a random access memory (RAM), etc.
[0130] Each embodiment in this specification is described in a progressive manner, and the same or similar parts between the embodiments can be referred to each other, and each embodiment focuses on the differences from other embodiments. In particular, for the device embodiment, since it is basically similar to the method embodiment, the description is relatively simple, and the relevant parts can be referred to the partial description of the method embodiment. The device embodiment described above is merely schematic, and the units and modules described as separate components may or may not be physically separated. In addition, some or all of the units and modules may be selected according to actual needs to achieve the purpose of the scheme of this embodiment. A person of ordinary skill in the art can understand and implement it without paying creative work.
[0131] The above is only a specific implementation of the present application. It should be pointed out that for ordinary technicians in this technical field, several improvements and modifications can be made without departing from the principles of the present application. These improvements and modifications should also be regarded as the scope of protection of the present application.
Claims
1. A method for scheduling cloud computing resources, characterized in that: The method comprises: Filter multiple resource pool group GRUs according to the first filtering condition to obtain a first resource pool group GRU set; Determine the maximum number of virtual machines that can be allocated to each resource pool group GRU according to the remaining number of resources of each resource pool group GRU in the first resource pool group GRU set; Sort multiple resource pool groups GRU in descending order according to the maximum number of virtual machines that can be allocated; The resource pool group GRU ranked first in the ranking is determined as the resource for the user to perform cloud computing; The first screening condition includes a first sub-screening condition and a second sub-screening condition; the first sub-screening condition includes at least the disaster recovery level, quantity and network area of the virtual machines required for cloud computing; the second sub-screening condition is that the number of remaining Internet Protocol IP addresses of the first resource pool group GRU is greater than the required number of IP addresses of the virtual machines required for cloud computing; The screening of the plurality of resource pool groups GRU according to the first screening condition to obtain a first resource pool group GRU set includes: According to the first sub-screening condition and the second sub-screening condition, multiple resource pool groups GRU are screened in sequence to obtain a first resource pool group GRU set.
2. The method according to claim 1, characterized in that The remaining resources include a central processing unit (CPU), memory and storage space; each resource pool group (GRU) includes a plurality of minimum resource pool units (RU); The determining the maximum number of virtual machines that can be allocated to each resource pool group GRU according to the remaining number of resources of each resource pool group GRU in the first resource pool group GRU set includes: Determine the maximum number of virtual machines that can be allocated to each minimum resource pool unit RU according to the remaining CPU quantity, remaining memory quantity and remaining storage space quantity of each minimum resource pool unit RU in each resource pool group GRU; The maximum number of virtual machines that can be allocated to each resource pool group GRU is determined according to the maximum number of virtual machines that can be allocated to each minimum resource pool unit RU in each resource pool group GRU.
3. The method according to claim 2, characterized in that Before sorting the multiple resource pool groups GRU in descending order according to the maximum number of virtual machines that can be allocated, the method further includes: Determine whether the maximum number of virtual machines that can be allocated by each resource pool group GRU is less than the number of virtual machines required by the user for cloud computing. If so, continue with the subsequent steps. If so, delete the resource pool group GRU with a number less than the number of virtual machines required by the user for cloud computing from the first resource pool group GRU set.
4. The method according to claim 1, characterized in that: Each resource pool group GRU includes a plurality of minimum resource pool units RU, and each minimum resource pool unit RU includes a plurality of host machines host; The method further comprises: The actual number of virtual machines allocated to each host is less than half of the number of virtual machines required by the user for cloud computing.
5. The method according to claim 4, characterized in that The multiple host machines host include a first host machine and a second host machine, and the first host machine and the second host machine can allocate the same number of actual virtual machines; The method further comprises: The actual number of virtual machines is allocated to the first host machine and the second host machine in descending order of unused time.
6. A cloud computing resource scheduling device, characterized in that: The device comprises: A screening unit, configured to screen the plurality of resource pool groups GRU according to a first screening condition to obtain a first resource pool group GRU set; A first determining unit, configured to determine a maximum number of virtual machines that can be allocated to each resource pool group GRU according to the number of remaining resources of each resource pool group GRU in the first resource pool group GRU set; A sorting unit, used for sorting the multiple resource pool groups GRU in descending order according to the maximum number of virtual machines that can be allocated; A second determining unit is used to determine the resource pool group GRU that is ranked first in the sorting as a resource for the user to perform cloud computing; The first screening condition includes a first sub-screening condition and a second sub-screening condition; the first sub-screening condition includes at least the disaster recovery level, quantity and network area of the virtual machines required for cloud computing; the second sub-screening condition is that the number of remaining Internet Protocol IP addresses of the first resource pool group GRU is greater than the required number of IP addresses of the virtual machines required for cloud computing; The screening unit is specifically used for: According to the first sub-screening condition and the second sub-screening condition, multiple resource pool groups GRU are screened in sequence to obtain a first resource pool group GRU set.
7. The device according to claim 6, characterized in that The remaining resources include a central processing unit (CPU), memory and storage space; each resource pool group (GRU) includes a plurality of minimum resource pool units (RU); The first determining unit is specifically configured to: Determine the maximum number of virtual machines that can be allocated to each minimum resource pool unit RU according to the remaining CPU quantity, remaining memory quantity and remaining storage space quantity of each minimum resource pool unit RU in each resource pool group GRU; The maximum number of virtual machines that can be allocated to each resource pool group GRU is determined according to the maximum number of virtual machines that can be allocated to each minimum resource pool unit RU in each resource pool group GRU.
8. The device according to claim 7, characterized in that The device also includes: The judgment unit is used to judge whether the maximum number of virtual machines that can be allocated by each resource pool group GRU is less than the number of virtual machines required by the user for cloud computing. If so, continue with the subsequent steps; if so, delete the resource pool group GRU with a number less than the number of virtual machines required by the user for cloud computing in the first resource pool group GRU set.
