Cloud resource allocation optimization
Through the total usage ratio and priority rules of computing resources, selecting the appropriate region and subscription for resource allocation, solving the problem of inefficient use of cloud platform resources and achieving more efficient resource management.
Patent Information
- Application Number
- CN202280095841.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2022-05-27
- Publication Date
- 2024-12-17
AI Technical Summary
The existing cloud platform capacity manager randomly selects regions and subscriptions when resource allocation, resulting in inefficient use of resources and may lead to underutilization of resources in certain regions or subscriptions.
Ensure balanced use of resources by calculating resource quotas and usage for each region and subscription, calculating the total usage ratio, selecting the most suitable region and subscription for resource allocation, and prioritizing based on resource usage rules.
It improves the efficiency of resource utilization, avoids the problem of resource failure caused by other resource restrictions, and achieves more reasonable resource allocation and management.
Smart Images

Figure CN119156602A_ABST
Abstract
Description
Background Art
[0001] Most cloud platforms support multiple regions, each with its own data center, and each data center provides various resources to customers. Examples of resources include (but are not limited to) virtual central processing units (CPUs), virtual networks (vNets), virtual machines (VMs), disk encryption sets with customer-managed keys (CMKs), disks, etc.
[0002] Because resources are not infinite, they need to be managed for efficient use. Typically, each subscription has a set of quotas that can be allocated. In some cases, cloud services reserve multiple subscriptions to support their production scale. A customer located in a specific location can request resources from the cloud service. In response to receiving the request, the cloud service then allocates the requested resources to the customer.
[0003] Existing capacity managers typically randomly select regions and / or subscriptions to allocate resources to requests, which can lead to inefficient use of resources. In some cases, one resource in a subscription or region may be exhausted while another resource in the subscription or region may still be underutilized. For example, when a customer requests processors from a cloud service with a quota of 2,000 virtual processors, even if a particular subscription in a particular region has a sufficient number of virtual processors (e.g., 2,000 virtual processors), it may turn out that only 1,500 virtual processors can be allocated due to limitations of other resources, such as (but not limited to) limitations associated with VMs, vNets, or CMKs and / or disks. In this case, due to limitations of other resources, the 500 virtual processors in that subscription may never be used.
[0004] The subject matter claimed herein is not limited to embodiments that solve any disadvantages or that operate only in environments such as those described above. Rather, this background is provided merely to illustrate one exemplary technology area in which some embodiments described herein may be practiced. Summary of the Invention
[0005] This Summary is provided to introduce a selection of concepts in a simplified form that are further described below in the Detailed Description. This Summary is not intended to identify key features or essential features of the claimed subject matter, nor is it intended to be used as an aid in determining the scope of the claimed subject matter.
[0006] The principles described herein relate to a computer system for intelligent allocation of resources in a cloud environment. The computer system is configured to receive a request for allocation of resources within a cloud environment comprising a plurality of regions, and to identify a plurality of subscriptions in each of the plurality of regions. Each subscription is associated with a quota indicating the total amount of resources in the corresponding subscription and a usage indicating the amount of used resources in the corresponding subscription. For each region, the computer system further calculates a total quota indicating the sum of the quotas of the plurality of subscriptions in the corresponding region and a total available amount indicating the sum of the amounts of the plurality of subscriptions. A total usage ratio for each region can then be calculated based on the total usage and the total quota. The computer system is then configured to select a particular region from the plurality of regions to which to allocate resources based on the total usage ratio of the plurality of regions.
[0007] The computer system is further configured to select a specific subscription in the specific region based on resource usage. Selecting the specific subscription includes determining a priority for each of a plurality of subscriptions located in the specific region based on at least one rule. The at least one rule is configured to balance resource usage of a particular type. The computer system then selects a specific subscription from the plurality of subscriptions in the specific region based on the priority of the plurality of subscriptions in the specific region, and allocates the requested resources from the specific subscription based on the request.
[0008] The principles described herein also relate to a method for intelligent allocation of resources in a cloud environment, which can be implemented at a capacity manager of a cloud service. The method includes: receiving a request for allocation of resources within a cloud environment comprising a plurality of regions; and identifying a plurality of subscriptions in each of the plurality of regions. Each subscription is associated with a quota indicating the total amount of resources in the corresponding subscription and a usage indicating the amount of used resources in the corresponding subscription. The method further includes: for each region, calculating a total quota indicating the sum of the quotas of the plurality of subscriptions in the corresponding region and a total usage indicating the sum of the usages of the plurality of subscriptions. Then, for each region, calculating a total usage ratio based on a ratio between the total usage and the total quota. Then, selecting a specific region from the plurality of regions based on the total usage ratio of the plurality of regions.
[0009] The method further includes selecting a specific subscription from among the plurality of subscriptions in the specific region based on usage of resources in the plurality of subscriptions. Selecting the specific subscription includes determining a priority for each of the plurality of subscriptions in the specific region based on at least one rule. The at least one rule is configured to balance usage of at least a specific type of resource. The method further includes selecting the specific subscription from among the plurality of subscriptions in the specific region based on the priority of the plurality of subscriptions in the specific region; and allocating the requested resource from the specific subscription based on the request.
[0010] Additional features and advantages will be set forth in the following description, and in part will be apparent from the description, or may be learned by practice of the teachings herein. The features and advantages of the present invention may be realized and obtained by the instrumentalities and combinations particularly pointed out in the appended claims. The features of the present invention will become more fully apparent from the following description and the appended claims, or may be learned by practice of the invention as described below. BRIEF DESCRIPTION OF THE DRAWINGS
[0011] To illustrate the manner in which the foregoing and other advantages and features may be obtained, a more particular description of the subject matter briefly described above will be rendered by reference to specific embodiments that are illustrated in the accompanying drawings. Understanding that these drawings depict only typical embodiments and are therefore not to be considered limiting of scope, the embodiments will be described and explained with additional specificity and detail through the use of the accompanying drawings, in which:
[0012] Figure 1 shows a cloud environment in which the principles described herein may be implemented;
[0013] Figure 2 shows an example subscription with quota sets for different types of resources;
[0014] Figure 3 An exemplary process of selecting a specific region from a plurality of regions is shown;
[0015] Figure 4 An example subscription selector for selecting a particular subscription among multiple subscriptions in a particular region is shown;
[0016] Figure 5 shows an example process performed by a subscription filter for filtering multiple subscriptions in a particular region;
[0017] Figure 6 A visualization is shown presenting multiple subscriptions placed in multiple pools based on usage ratios of virtual machines;
[0018] Figure 7 A flow chart illustrating an example method for intelligently selecting a particular subscription in a particular region;
[0019] Figure 8 A flow chart illustrating an example method for selecting a particular region among a plurality of regions;
[0020] Figure 9 A flowchart illustrating an example method for determining a rule set having a higher priority;
[0021] Figure 10 A flowchart illustrating an example method for applying a set of rules associated with a virtual processor is shown;
[0022] Figure 11 A flowchart illustrating an example method for filtering multiple subscriptions based on their VM usage; and
[0023] Figure 12 An example computer system is shown in which the principles described herein may be employed. DETAILED DESCRIPTION
[0024] Most cloud platforms support multiple regions, each with its own data center, and each data center provides various physical resources, including (but not limited to) virtual processors (e.g., virtual central processing units or vCPUs), virtual networks (vNets), virtual machines (VMs), disk encryption sets with customer-managed keys (CMKs), and / or disks.
[0025] Because physical resources are not infinite, they need to be managed to use them efficiently. Typically, each subscription has a set of allocable quotas. In some cases, cloud services reserve multiple subscriptions to support their production scale. Customers located in specific locations can request resources from a cloud service. In response to receiving this request, the cloud service then allocates the requested resources to the customer.
[0026] Existing capacity managers typically randomly select regions and / or subscriptions to allocate resources to requests, which can lead to inefficient use of resources. In some cases, one resource in a subscription or region may be exhausted while another resource in the subscription or region may still be underutilized. For example, when a customer requests a virtual processor from a cloud service out of a quota of 2,000 virtual processors, even if a particular subscription in a particular region has a sufficient number of virtual processors (e.g., 2,000 virtual processors), it may turn out that only 1,500 virtual processors can be allocated due to limitations of other resources, such as (but not limited to) limitations associated with VMs, vNets, CMKs, and / or disks. In this case, 500 virtual processors in the subscription may never be used due to limitations of other resources.
[0027] The present invention solves the above problems by automatically calculating the priority of each resource desired to be allocated in response to receiving a resource allocation request.Then, based on the calculated priority, a specific subscription in a specific area is selected for allocating the requested resource.
[0028] Figure 1An example cloud environment 100 is shown in which the principles described herein can be implemented. Cloud environment 100 includes a client computer system 110 and a cloud service computer system 120. Cloud environment 100 also includes multiple regions, for example, a first region 150, a second region 160, and a third region 170. Ellipses 180 indicate that any number of regions can exist in cloud environment 100. Each of the multiple regions includes multiple subscriptions. For example, first region 150 includes subscriptions 152, 154, and 156. Ellipses 158 indicate that any number of subscriptions can exist in first region 150. Second region 160 includes subscriptions 162, 164, and 166, and third region 170 includes subscriptions 172, 174, and 176. Ellipses 168 or 178 indicate that any number of subscriptions can exist in second region 160 or third region 170.
[0029] Cloud service computer system 120 includes provisioning manager 122 and capacity manager 130. Provisioning manager 122 is configured to receive a request from client computer system 110 for allocation of resources within cloud environment 100 and pass the request to capacity manager 130. In some embodiments, the request indicates a request from a customer to allocate a plurality of VMs. Based on the request, provisioning manager 122 is configured to obtain a plan associated with the customer, identify a number of processors for each VM based on the plan associated with the customer, and pass a request including the number of VMs and the number of processors for each VM to capacity manager 130.
[0030] In response to receiving a request for resource allocation, capacity manager 130 is configured to identify multiple subscriptions in each of the multiple regions (e.g., subscriptions 152, 154, 156, etc. in region 150; subscriptions 162, 164, 166, etc. in region 160; subscriptions 172, 174, or 176, etc. in region 170; and so on). Each subscription is associated with a quota set indicating the total amount of different resources in the corresponding subscription and a usage amount indicating the amount of used resources in the corresponding subscription. In some embodiments, the quota set includes a first quota indicating the total amount of VMs, a second quota indicating the total amount of vNets, or a third quota indicating the total amount of disk encryption sets in the subscription.
[0031] For each region 150, 160, or 170, the capacity manager 130 is configured to calculate a total quota indicating the sum of the quotas of multiple subscriptions and a total usage indicating the sum of the amounts of multiple subscriptions in the corresponding region 150, 160, or 170, which can then be used to calculate a total usage ratio and / or a total available ratio.
[0032] In some embodiments, the capacity manager 130 includes a region selector 132 and a subscription selector 134. The region selector 132 is configured to select a specific region (e.g., the third region 170) from among the multiple regions based on the total quota and total usage of resources in each of the multiple regions 150, 160, or 170. The subscription selector 134 is further configured to select a specific subscription (e.g., subscription 172) in the specific region (e.g., the third region 170) to balance the use of resources.
[0033] In some embodiments, selecting a specific subscription includes determining a priority of each of a plurality of subscriptions (e.g., subscriptions 172, 174, 176) located in a specific region (e.g., third region 170) based on at least one rule. The at least one rule is configured to balance usage of at least a specific type of resource. The computer system then selects a specific subscription from the plurality of subscriptions in the specific region based on the priorities of the plurality of subscriptions in the specific region, and allocates the requested resource from the specific subscription based on the request.
[0034] As briefly discussed above, in some embodiments, each subscription has a set of quotas for multiple types of resources, and the resources requested to be allocated include one or more types of resources. Figure 2 Shown is the corresponding Figure 1 164, 166, 172, 174, and / or 176 in the example subscription 200. Subscription 200 includes a first quota 210 for VMs, a second quota 220 for vNets, and a third quota 230 for disk encryption sets. Subscription 200 also includes a set of quotas for virtual processors, including (but not limited to) a fourth quota 240 for virtual CPU (Central Processing Unit) DSv4, a fifth quota 250 for virtual CPU DSv5, and / or a sixth quota 260 for virtual CPU FSv2. Ellipses 270 indicate that subscription 200 can have any number of quotas for any number of resource types.
[0035] As shown in the figure, in subscription 200, first quota 210 for VMs is 1200, and usage of VMs is 300. Thus, the number of available VMs in subscription 200 is 900 = 1200 - 300, the usage ratio of VMs in subscription 200 is 25% = 300 / 1200, and the available ratio of VMs in subscription 200 is 75% = 900 / 1200. Similarly, second quota 220 for vNets is 1000, and usage of vNets is 100. Thus, the number of available vNets in subscription 200 is 900 = 1000 - 100, the usage ratio of vNets in subscription 200 is 10% = 100 / 1000, and the available ratio of vNets in subscription 200 is 90% = 900 / 1000.
[0036] The third quota 230 of the disk encryption set is again 1000, and the usage ratio of the disk encryption set is 50; the fourth quota 240 of the virtual CPU DSv4 is 2000, and the usage ratio of the virtual CPU DSv4 is 1920; the fifth quota 250 of the virtual CPU DSv5 is 1000, and the usage ratio of the virtual CPU DSv5 is 200; and the sixth quota 260 of the virtual CPU FSv2 is 1000, and the usage ratio of the virtual CPU FSv2 is 400. Based on the quota and usage of each type of resource, the usage ratio and / or available ratio of each type of resource can also be calculated.
[0037] Return Reference Figure 1 Each region includes multiple subscriptions. For each region, a total usage ratio for each type of resource can be calculated based on the quota and usage of resources in multiple subscriptions. In some embodiments, the region selector 132 is configured to select a specific region from the multiple regions based on the total usage ratio of different types of resources in each region.
[0038] Figure 3 FIG. 3 shows an exemplary process performed by the region selector 302 for selecting a specific region among a plurality of regions based on the total usage ratio of different types of resources in each region. Figure 3As shown, for each zone (e.g., first zone 310, second zone 34, and third zone 370), a set of usage ratios is calculated for different types of resources, such as (but not limited to) CPU usage ratios 312, 342, 372, network usage ratios 322, 352, 382, and / or disk encryption set usage ratios 332, 362, 392. In some embodiments, the CPU usage ratios 312, 342, 372 also include multiple usage ratio subsets 314, 316, 318, 344, 346, 348, 374, 376, 378 corresponding to different types of processors (e.g., (but not limited to) DSv4, DSv5, and / or FSv2). The network usage ratios 322, 352, 382 include vNet usage ratios 324, 354, 384, and the disk encryption set 332, 362, 392 includes CMK usage ratios 334, 364, 394.
[0039] For each of the first region 310, the second region 340, and the third region 370, a highest usage ratio among a plurality of usage ratios for different types of resources is identified. For example, in the first region 310, the highest usage ratio is the vNet usage ratio 324 (=77%) among the ratios 314, 316, 318, 324, and 334; in the second region 340, the highest usage ratio is the DSv5 usage ratio 346 (=60%) among the ratios 344, 346, 348, 354, and 346; and in the third region 370, the highest usage ratio is the CMK usage ratio 394 (=40%) among the ratios 374, 376, 378, 384, and 394.
[0040] These highest usage ratios 324 (=77%), 346 (=60%), and 394 (=40%) are then sorted based on usage ratio (e.g., in ascending order, lowest usage ratio to highest usage ratio). Based on this sorting, the lowest usage ratio is identified, and the corresponding region is then selected as the specific region. For example, in this article, the disk encryption set 394 (40%) of the third region 370 is the lowest among the highest usage ratios 324, 346, 394 (i.e., vNet usage ratio 324 = 77%, DSv5 usage ratio 346 = 60%, CMK usage ratio 394 = 40%). As such, the region selector 302 selects the third region 370 as the specific region 304.
[0041] In some embodiments, the cloud service is configured to regularly scan usage and automatically calculate different resource capacities used and / or left for each zone, and automatically prioritize different rule sets based on the different resource capacities.
[0042] As referenced above Figure 1 As briefly discussed, upon selecting a particular region, subscription selector 134 is then configured to select a particular subscription from the particular region. In some embodiments, relationships between different resources are used to identify a rule set. In some embodiments, a rule set can be set based on a total capacity ratio between two types of different resources. The total capacity ratio is a ratio between a first total number of available resources of a first type and a second total number of available resources of a second type.
[0043] Because some requests for resources depend on VMs, in some embodiments, a rule set can be set based on the ratio between the number of available resource types (i.e., non-VM) and the number of available VMs. For example, the total capacity ratio can be the ratio between the number of available virtual processors and the number of available VMs. When the total number of available VMs is 1200, the total number of available virtual processors is 2000, the total number of available vNets is 1000, the total number of disk encryption sets is 50,000, and the total number of disk encryption sets is 1000, the total capacity ratio between virtual processors and VMs is 2000:1200=1:0.6, the total capacity ratio between vNets and VMs is 1000:1200=1:1.2, the total capacity ratio between disk encryption sets and VMs is 50,000:1200=50:1.2, and / or the total capacity ratio between disk encryption sets and VMs is 1000:1200=1:1.2.
[0044] In some embodiments, for each type of resource (i.e., other than VMs), there is a separate set of rules for balancing that type of resource relative to the VMs. For example, a first set of virtual processor rules is configured to balance the allocation of virtual processors relative to VMs, a second set of vNet rules is configured to balance the allocation of vNets relative to VMs, a third set of CMK rules is configured to balance the allocation of CMKs relative to VMs, and / or a fourth set of disk rules is configured to balance the allocation of disks relative to VMs. In some embodiments, a request for a resource includes a service plan that indicates the number of VMs and the number of virtual processors for each VM. This information can be used to set priorities for subscriptions to prioritize the use of virtual processors.
[0045] In some embodiments, upon receiving a request for a first number of VMs, provisioning manager 122 is configured to group several other resources with the VMs and send the first number of VMs and the grouped other resources to capacity manager 130. For example, the several other resources to be grouped with the first number of VMs may include a second number of virtual processors, a third number of VNets, a fourth number of CMKs, and / or a fifth number of disks to be provisioned to the VMs. Provisioning manager 122 then sends a request for the first number of VMs, the second number of virtual processors, the third number of VNets, the fourth number of CMKs, and / or the fifth number of disks to capacity manager 130, which in turn reserves these resources accordingly. Capacity manager 130 is configured to examine each supported region and subscription therein to find the desired region and subscription for allocating resources based on the request.
[0046] The capacity manager 130 applies at least one of: a first set of virtual processor rules configured to balance allocation of virtual processors relative to VMs, a second set of vNet rules configured to balance allocation of vNets relative to VMs, a third set of CMK rules configured to balance allocation of CMKs relative to VMs, and / or a fourth set of disk rules configured to balance allocation of disks relative to VMs. Further details regarding the different rule sets and how they are applied are discussed below.
[0047] For example, a first set of virtual processor rules includes multiple different rules based on the number of processors per VM indicated in the request. In some embodiments, when the number of virtual processors for each VM is 1, subscriptions are divided into two buckets based on the total capacity ratio between the virtual processor and the VM. For example, in some embodiments, subscriptions with a total capacity ratio no greater than 1 are placed in a "bucket of less than one", while subscriptions with a total capacity ratio greater than 1 are placed in a "bucket of more than one". Subscriptions in the bucket of less than one have a higher priority than subscriptions in the bucket of more than one. The subscriptions in the bucket of more than one can then be sorted based on the total capacity ratio (e.g., in ascending order).
[0048] For example, the selected region has three subscriptions, namely, Subscription A, Subscription B, and Subscription C. Subscription A has 1000 available virtual processors and 200 available VMs, Subscription B has 1000 available virtual processors and 300 available VMs, and Subscription C has 800 available virtual processors and 1000 available VMs. Subscription A corresponds to a total capacity ratio of 1000:200 = 5:1, Subscription B corresponds to a total capacity ratio of 1000:300 = 3.3:1, and Subscription C corresponds to a total capacity ratio of 800:1000 = 0.8:1. Subscription A and Subscription B will be placed in more than one bucket, while Subscription C will be placed in less than one bucket. Therefore, Subscription C has a higher priority than Subscription A and Subscription B, and Subscription B has a higher priority than Subscription A.
[0049] In some embodiments, when the number of virtual processors per VM is N (where 1 < N < 十六), the absolute value of the difference between the total capacity ratio between virtual processors and VMs is calculated for each subscription, which can be represented by the following equation:
[0050] ABS(capacity_ratio - N), where capacity_ratio = (number of available virtual processors) / (number of available VMs), and N is the number of virtual processors per requested VM.
[0051] Then the absolute values can be sorted based on the priority of the absolute values (e.g., in descending order, from highest to lowest). The subscription with the highest priority is selected for resource allocation based on the request.
[0052] For example, when the number of virtual processors per VM is 2, the absolute value of the difference between the total capacity ratio between virtual processors and VMs is calculated for each subscription, which can be represented by the following equation:
[0053] ABS(capacity_ratio - 2), where capacity_ratio = (number of available virtual processors) / (number of available VMs).
[0054] It should be noted that in the original text, "1 < N < 十六" seems to be an incorrect expression. It should probably be "1 < N < sixteen" or "1 < N < 16". The translation is adjusted accordingly in the above content.The absolute values can then be sorted based on their priority (e.g., in descending order, from highest to lowest). The subscription with the highest priority is selected for resource allocation based on the request. For example, the selected region has two subscriptions, namely, subscription A and subscription B. Subscription A has 1000 available virtual processors and 200 available VMs, and subscription B has 1000 available virtual processors and 300 available VMs. Subscription A corresponds to a total capacity ratio of 1000:200=5:1=5 and ABS(5-2)=3. Subscription B corresponds to a total capacity ratio of 1000:300=3.3:1=3.3 and ABS(3.3-2)=1.3. In this way, subscription B will have a higher priority than subscription A.
[0055] As another example, when the number of virtual processors per VM is eight, the absolute value of the total capacity ratio between virtual processors and VMs minus eight is calculated for each subscription, which can be represented by the following equation:
[0056] ABS(capacity_ratio-8), where capacity_ratio=(number of available virtual processors) / (number of available VMs).
[0057] The absolute values can then be sorted based on their priority (e.g., in descending order, from highest to lowest). The subscription with the highest priority is selected for allocating resources based on the request. For example, the selected region has two subscriptions, namely, subscription A and subscription B. Subscription A has 2000 available virtual processors and 200 available VMs, and subscription B has 2000 available virtual processors and 400 available VMs. Subscription A corresponds to a total capacity ratio of 2000:200=10:1 and ABS(10-8)=2. Subscription B-corresponds to a total capacity ratio of 2000:400=5:1 and ABS(5-8)=ABS(-3)=3. In this way, subscription A will have a higher priority than subscription B.
[0058] Assuming that each request for resources is for 100 VMs (8 virtual processors), since subscription A has a higher priority than subscription B, these requested resources will be allocated from subscription A, resulting in subscription A having 1200 (= 2000 - 800) virtual processors and 100 (= 200 - 100) VMs. Subscription B remains unchanged.
[0059] Upon receiving the second request for resources, the capacity manager will recalculate the priority of each subscription based on its current state. Assuming the new request also indicates a number of 8 virtual processors per VM, subscription A now corresponds to a total capacity ratio of 1200:100 = 12:1, with an ABS of (12-8) = 4, while subscription B still corresponds to a total capacity ratio of 2000:400 = 5:1, with an ABS of (5-8) = 3. Thus, subscription B now has a higher priority than subscription A and will be used to allocate resources based on the second request.
[0060] In some embodiments, different rules are used to prioritize subscriptions when the number of virtual processors per VM is greater than 8. For example, in some embodiments, when the number of virtual processors per VM is 16, the total capacity ratios between virtual processors and VMs are sorted based on their priorities (e.g., in descending order).
[0061] For example, when the selected region has four subscriptions, namely, subscription A, subscription B, subscription C, and subscription D. Subscription A has 1000 available virtual processors and 200 available VMs, subscription B has 1000 available virtual processors and 300 available VMs, subscription C has 1800 available virtual processors and 200 available VMs, and subscription D has 2000 available virtual processors and 200 available VMs. Subscription A corresponds to a total capacity ratio of 1000:200=5:1, subscription B corresponds to a total capacity ratio of 1000:300=3.3:1, subscription C corresponds to a total capacity ratio of 1800:200=9:1, and subscription D corresponds to a total capacity ratio of 2000:200=10:1. The descending order of the total capacity ratio will result in subscription D (10), subscription C, (9), subscription A (5), and subscription B (3.3). Thus, subscription D has the highest priority and will be selected for allocating resources based on the request.
[0062] In some embodiments, the set of vNet rules is configured to balance the allocation of vNets relative to VMs. In some embodiments, it is generally not allowed to request more than one vNet at a time. Therefore, the request for a vNet is 0 or 1.
[0063] In some embodiments, when the number of requested vNets is 0, the priorities of different subscriptions are set based on the total capacity ratio between available vNets and available VMs. For example, when the selected region includes two subscriptions, namely, Subscription A and Subscription B. Subscription A includes 800 available VMs and 300 available vNets, and Subscription B includes 800 available VMs and 100 available vNets. Subscription A corresponds to a total capacity ratio of 300 / 800 = 0.375, and Subscription B corresponds to a total capacity ratio of 100 / 800 = 0.125. Thus, Subscription B has a higher priority than Subscription A and will be selected for resource allocation based on the request.
[0064] In some embodiments, when the number of requested vNets is 1 and the number of requested VMs is also 1, the priorities of the different subscriptions are set based on the total capacity ratio between the available vNets and the available VMs. For the same selected region as discussed above for the case where the number of requested vNets is 0, subscription A will be selected for allocating resources based on the request.
[0065] In some embodiments, when the number of requested vNets is 1 and the number of requested VMs is greater than 1, priorities of different subscriptions are set based on the total capacity ratio between available vNets and available VMs. For the same selected region as discussed above for the case where the number of requested vNets is 0, subscription B will also be selected for allocating resources based on the request.
[0066] In some embodiments, when the ratio between the requested vNet and the requested VM is equal to the ratio between the available vNets and the available VMs in the subscription and is less than 1:1.2, the consuming VM has a higher priority than the consuming vNet.
[0067] In some embodiments, the disk encryption set includes customer managed keys (CMKs). The set of CMK rules is configured to balance the distribution of CMKs relative to VMs. In some embodiments, CMK rules are similar to vNet rules, as cloud services typically limit the number of CMKs in each request to no more than 1. Thus, the number of CMKs in a request is either 0 or 1.
[0068] Also similar to vNet rules, in some embodiments, consuming a VM has higher priority than consuming a disk encryption set when the ratio between the requested disk encryption set and the requested VM is equal to the ratio between the available CMKs and available VMs in the subscription and is less than 1:1.2.
[0069] In some embodiments, the set of disk rules is configured to balance the allocation of disk sets relative to the number of VMs. In some embodiments, since the maximum limit on disk sets and snapshots is greater than 50,000 per subscription and per region, and the limit on VMs is typically around 1,200, the capacity manager can simply sort subscriptions by the ratio of total capacity between available disks and available VMs.
[0070] In some embodiments, the virtual processor rule set, vNet rule set, CMK rule set, and disk rule set also have their own priorities. These priorities can be set manually by the user or automatically by the subscription selector 134. In some embodiments, the user can manually set the priority for each rule set. For example, if the user believes that using a vNet is more important than using other resources, the vNet rule set can be manually set to have a higher priority.
[0071] Figure 4 Shown is the corresponding Figure 1 An example subscription selector 400 of the subscription selector 134 is configured to automatically select a subscription from a plurality of subscriptions in a particular region (e.g., the third region 450). Figure 4 As shown, a third region 450 (corresponding to third region 370) is selected as the specific region. The third region 450 includes multiple subscriptions 452, 454, 456. Ellipses 458 indicate that there can be any number of subscriptions in the third region 450. The subscription selector 400 (corresponding to subscription selector 134) includes a rule set prioritizer 410 configured to set priorities for one or more rule sets 420. The one or more rule sets 420 include a first set 422 of virtual processor (or vCPU) rules configured to balance usage of virtual processors, a second set 424 of vNet rules configured to balance usage of vNets, a third set 426 of CMK rules configured to balance usage of CMKs, and / or a fourth set 428 of disk rule sets configured to balance usage of disks. Note that there can be any number of rule sets configured to balance any type of resources.
[0072] In some embodiments, the rule set prioritizer 410 is configured to determine that a particular rule set among the one or more rule sets has a higher priority based on the usage ratio of each type of resource in a particular area. Figure 3For example, in the third region 370, DSv4 usage ratio 374 is 30%, DSv5 usage ratio 376 is 30%, FSv2 usage ratio 378 is 20%, vNet usage ratio 384 is 20%, and CMK usage ratio 394 is 40%. In some embodiments, rule set prioritizer 410 identifies the highest usage ratio among usage ratios 374, 376, 378, 384, and 394 for different types of resources in the third region 370 or 450. The rule set corresponding to the resource type with the highest usage ratio is assigned a higher priority. Here, the highest usage ratio is CMK usage ratio 394. Therefore, disk rule set 428 is assigned a higher priority than virtual processor rule set 422, second set of vNet rules 424, and / or third set of CMK rules 426.
[0073] In some embodiments, a rule set with a higher priority can override the results of other rule sets. For example, in some embodiments, each rule set 422, 424, 426, 428 is used to generate a priority order for multiple subscriptions 452, 454, 456 in the third region 450. When multiple priority orders conflict, the priority order set by disk rule 426 will override the other priority orders.
[0074] In some embodiments, a rule set with a higher priority is used to generate a priority order for the plurality of subscriptions 452, 454, 456 in the third region 450. When more than one subscription shares the same priority, another rule set is used to further prioritize the more than one subscription.
[0075] In some embodiments, the subscription selector 400 further includes a subscription filter 430 configured to divide the plurality of subscriptions 452, 454, 456 in the third region 450 into a plurality of pools based on certain conditions, such as, but not limited to, a usage percentage of the VM. The subscription selector 400 is configured to apply one or more rule sets based on filtering and / or priority to select a particular subscription 440 from the plurality of subscriptions 452, 454, 456 in the third region 450.
[0076] Figure 5 Shown is a list of subscription filters 510 (corresponding to Figure 44. In some embodiments, subscriptions 552, 554, 556 having a percentage of VM usage below a first threshold (e.g., 30%) are placed in an underutilized pool 540, subscriptions having a percentage of VM usage above a second threshold (e.g., 70%) are placed in an almost fully utilized pool 520, and subscriptions having a percentage of VM usage between the first and second thresholds are placed in an in-use pool 530, where the first threshold is less than the second threshold.
[0077] Each of fully utilized pool 520, in-use pool 530, and / or underutilized pool 540 includes one or more subscriptions. As shown, fully utilized pool 520 includes subscriptions 522 and 524; in-use pool 530 includes subscriptions 532 and 534; and underutilized pool 540 includes subscriptions 542 and 544. Ellipses 526, 536, and 546 indicate that any number of subscriptions can be present in fully utilized pool 520, in-use pool 530, and / or underutilized pool 540.
[0078] In some embodiments, the subscription filter 510 is configured to identify the first predetermined number (e.g., the first five, the first ten, etc.) of subscriptions in the in-use pool 530. A specific subscription is then selected from the first predetermined number of subscriptions. In some embodiments, a specific subscription is randomly selected from the first predetermined number of subscriptions to avoid a contention situation. In a contention situation, multiple requests are received in a short period of time or almost simultaneously. Without a random selection process, a specific subscription may be selected to allocate resources for all of these requests, which may result in overflow of the specific subscription. In some embodiments, each usage ratio of the virtual machine is calculated based on the assumption that the number of virtual machines requested for allocation has already been allocated to each of the multiple subscriptions.
[0079] Note that subscription filters 430, 510 can be placed before or after rule set prioritizer 410. For example, in some embodiments, partitioning and filtering of multiple subscriptions can be performed first, and then a priority for each subscription in the usage pool is identified. In some embodiments, a priority for each subscription in the region is first identified, and then the multiple subscriptions are partitioned and filtered. In some embodiments, a priority for each subscription is periodically calculated regardless of whether a resource allocation request is received. In some embodiments, a priority for each subscription is calculated in response to receiving a resource allocation request.
[0080] In some embodiments, the different subscription pools are visualized in a user interface. Figure 6 An example user interface 600 is shown presenting multiple subscriptions in specific areas divided into a fully used pool, a using pool, and an unused pool.
[0081] The following discussion now relates to various methods and method actions that can be performed. Although method actions may be discussed in a particular order or shown in a flowchart as occurring in a particular order, no particular order is required unless otherwise stated or because an action depends on another action being completed before the action is performed.
[0082] Figure 7 A flow chart of an example method for intelligently allocating resources in multiple regions, each region including multiple subscriptions, is shown. Method 700 includes receiving a request for allocation of resources within a cloud environment including multiple regions (action 710). Method 700 also includes identifying multiple subscriptions in each of the multiple regions (action 720). Each subscription is associated with a quota indicating the total amount of resources in the subscription and a usage indicating the amount of resources used in the subscription. For each region in the multiple regions, a total quota and a total usage of the resources are calculated (action 732), and a total usage ratio indicating the ratio between the total usage and the total quota is also calculated (action 734). Then, based on the total usage ratio of each region, a specific region in the multiple regions is selected to allocate resources (action 740).
[0083] Method 700 also includes selecting a specific subscription from among the plurality of subscriptions in the specific region to balance resource usage (act 750). Selecting the specific subscription (act 750) includes determining a priority of each of the plurality of subscriptions based on at least one rule (act 752), and selecting the specific subscription based on the priority (act 754). The requested resources are then allocated from the specific subscription based on the request (act 756).
[0084] Figure 8 A flowchart illustrating an example method 800 for selecting a specific region among multiple regions (corresponding to Figure 7740). Method 800 includes, for each of the plurality of regions, (1) determining a first usage ratio for the virtual machines based on the total number of available virtual machines in the corresponding region and the first total quota for the virtual machines (action 810); determining a second usage ratio for the virtual processors based on the total number of available virtual processors in the corresponding region and the second total quota for the virtual machines (action 820); determining a third usage ratio for the virtual networks based on the total number of available virtual networks in the corresponding region and the third quota for the virtual networks (action 830); determining a fourth usage ratio for the CMKs based on the total number of available CMKs in the corresponding region and the fourth total quota for the CMKs (action 840), and / or determining a fifth usage ratio for the disks based on the total number of available disks in the corresponding region and the fifth total quota for the disks (action 850). In addition, for each of the plurality of regions, identifying a highest usage ratio among the first usage ratio, the second usage ratio, the third usage ratio, the fourth usage ratio, and / or the fifth usage ratio (action 860). Method 800 also includes identifying a lowest ratio among the highest usage ratios of the plurality of regions (action 870), and selecting a specific region corresponding to the lowest ratio (action 880).
[0085] Figure 9 A flowchart illustrating an example method 900 for determining a priority for each of a plurality of subscriptions based on at least one rule (corresponding to Figure 7 Method 900 includes identifying a first usage ratio for a virtual network based on a total number of available virtual processors in a particular region and a first quota for virtual processors (act 910), identifying a second usage ratio for a virtual network based on a total number of available virtual networks in the particular region and a second quota for virtual networks (act 920), identifying a third usage ratio for a CMK in a disk encryption set based on a total number of available CMKs in the particular region and a third quota for CMKs (act 930), and / or identifying a fourth usage ratio for a disk in the disk encryption set based on a total number of available disks in the particular region and a fourth quota for disks (act 940). The method also includes identifying a highest usage ratio among one or more of the first usage ratio, the second usage ratio, the third usage ratio, and / or the fourth usage ratio (act 950), determining a rule set corresponding to a resource type having the highest usage ratio to have a higher priority (act 960), and applying one or more rule sets based on the determined priorities (act 970).
[0086] Figure 10 A flow chart illustrating an example method 1000 for applying a rule set associated with a virtual processor is shown. Figure 7Method 1000 includes calculating a ratio between a first number of available virtual processors and a second number of available virtual machines in each of a plurality of subscriptions in a region (act 1010); and identifying a number of virtual processors for each virtual machine requested to be allocated based on the request (act 1020). Furthermore, for each of the plurality of subscriptions in the region, the ratio between the first number and the second number is reduced by an absolute value of the number of virtual processors (act 1030). The absolute values can then be sorted (e.g., in ascending order) corresponding to the plurality of subscriptions in the particular region (act 1040).
[0087] Figure 11 A flowchart illustrating an example method 1100 for selecting a particular subscription based on the priority and usage ratio of VMs in each subscription (which may correspond to Figure 7 754). Method 1100 includes calculating a usage ratio of a virtual machine in each of a plurality of subscriptions in a particular region (action 1110). Method 1100 also includes dividing the plurality of subscriptions in the particular region into a plurality of pools (action 1120). In some embodiments, the plurality of pools includes at least a fully utilized pool, a used pool, and an unused pool. In some embodiments, subscriptions with a usage ratio less than a first threshold are placed in the underutilized pool, subscriptions with a usage ratio greater than a second threshold (greater than the first threshold) are placed in the fully utilized pool, and subscriptions with a usage ratio between the first threshold and the second threshold are placed in the used pool.
[0088] Method 1100 also includes identifying the first predetermined number of subscriptions in the active pool based on the priority of the subscriptions (act 1130) (which may be determined based on one or more rule sets described above). In some embodiments, method 1100 also includes selecting a specific subscription from the first predetermined number of subscriptions (act 1140). In some embodiments, selecting the specific subscription includes randomly selecting one of the first predetermined number of subscriptions (act 1142) to avoid a race condition.
[0089] The following are some further exemplary embodiments of the present invention. These are given by way of example only and are not intended to limit the scope of the present invention in any way. In addition, any exemplary embodiment can be combined with one or more exemplary embodiments.
[0090] Embodiment 1. A computer system includes one or more processors and one or more computer-readable hardware storage devices, the one or more computer-readable hardware storage devices storing computer-executable instructions, the computer-executable instructions being configured such that, when the computer-executable instructions are executed by the one or more processors, the computer system is configured to perform a plurality of actions. Specifically, the computer system is configured to receive a request for allocation of resources within a cloud environment comprising a plurality of regions. The computer system is further configured to identify a plurality of subscriptions in each of the plurality of regions. Each subscription is associated with a quota indicating the total amount of resources in the corresponding subscription and a usage indicating the amount of resources used in the corresponding subscription. For each of the plurality of regions, the computer system is further configured to calculate, in the corresponding region, a total quota indicating the sum of the quotas of the plurality of subscriptions and a total usage indicating the sum of the usages of the plurality of subscriptions, and a total usage ratio indicating the ratio between the total usage and the total quota. The computer system is then configured to select a particular region from the plurality of regions for resource allocation based on the total usage ratio of the plurality of regions, and to select a particular subscription from the plurality of subscriptions in the particular region to balance resource usage. Selecting a specific subscription includes applying one or more rule sets to determine a priority for each of a plurality of subscriptions in a specific region based on the one or more rule sets. Each of the one or more rule sets is configured to balance the use of a particular type of resource. The specific subscription is then selected based on the priority of the plurality of subscriptions in the specific region. The computer system then allocates the requested resource according to the request.
[0091] Embodiment 2. The computer system of embodiment 1, wherein the resources requested for allocation include one or more of the following: (1) a virtual machine, (2) a virtual processor, (3) a virtual network, and / or (4) a disk encryption set including a customer-managed key, and / or (5) a disk set.
[0092] Embodiment 3. The computer system of embodiment 1 or 2, wherein selecting a specific region from among the plurality of regions comprises: for each region in the plurality of regions, determining one or more of the following: (1) determining a first usage ratio of a virtual machine based on a total number of available virtual machines in the corresponding region and a first total quota of the virtual machines, (2) determining a second usage ratio of a virtual processor based on a second total number of available virtual processors in the corresponding region and a second total quota of the virtual processors, (3) determining a third usage ratio of a virtual network based on a third total number of available virtual networks in the corresponding region and a third total quota of the virtual networks, (4) determining a fourth usage ratio of a customer management key based on a fourth total number of available customer management keys and a fourth total quota of the customer management keys, or (5) determining a fifth usage ratio of a disk based on a fifth total number of available disks and a fifth total quota of the disks in the corresponding region. Next, identifying a highest usage ratio among one or more of the first usage ratio, the second usage ratio, the third usage ratio, the fourth usage ratio, and / or the fifth usage ratio. Then identifying a lowest ratio among the highest usage ratios in the plurality of subscriptions, and selecting the specific region corresponding to the lowest ratio.
[0093] Embodiment 4. The computer system of embodiment 3, wherein the determining of one or more of the first usage ratio, the second usage ratio, the third usage ratio, or the fourth usage ratio is performed periodically at a predetermined frequency.
[0094] Embodiment 5. The computer system of embodiments 2 to 4, wherein the one or more rule sets include at least one of the following: (1) a first rule set for balancing available virtual processors and available virtual machines, (2) a second rule set for balancing available virtual networks and available virtual machines, (3) a third rule set for balancing available customer-managed keys and available virtual machines, or (4) a fourth rule set for balancing available disks and available virtual machines.
[0095] Embodiment 6. The computer system of embodiment 5, wherein applying the one or more rule sets comprises: determining that a specific rule set in the one or more rule sets has a higher priority based on a total amount of each type of resource in a specific area and a total quota of each type of resource.
[0096] Embodiment 7. The computer system of embodiment 6, wherein determining that a particular rule set has a higher priority includes: identifying one or more of the following: (1) identifying a first virtual network usage ratio based on a first total amount of available virtual processors and a first total virtual processor quota in a particular region, (2) identifying a second virtual processor usage ratio based on a second total amount of available virtual networks and a second total virtual network quota in the particular region, or (3) identifying a third disk encryption set usage ratio based on a third total amount of available disk encryption sets and a third disk encryption set total quota in the particular region. Then, identifying the highest usage ratio among one or more of the first usage ratio, the second usage ratio, or the third usage ratio. The rule set corresponding to the resource type with the highest usage ratio is set to have a higher priority.
[0097] Embodiment 8. The computer system of embodiments 6 and 7, wherein the resources requested for allocation include: a plurality of virtual machines and a plurality of virtual processors for each virtual machine. The first rule set is based on the number of virtual processors for each virtual machine and a ratio between available virtual processors and available virtual machines in each of a plurality of subscriptions in a specific region.
[0098] Embodiment 9. The computer system of embodiment 8, wherein applying the first rule set includes calculating a ratio between a first number of available virtual processors in each of a plurality of subscriptions in a particular region and a second number of available virtual machines, and identifying the number of virtual processors for each virtual machine requested to be allocated based on the request. For each of the plurality of subscriptions in the particular region, the ratio between the first number and the second number is calculated minus the absolute value of the number of virtual processors. The absolute values corresponding to the plurality of subscriptions in the particular region are then sorted (e.g., in ascending order). The order corresponds to the priority of the plurality of subscriptions in the particular region.
[0099] Embodiment 10. The computer system of embodiments 6 to 9, wherein the requested allocated resources include a plurality of virtual machines and a plurality of virtual networks. The second rule set is based on a ratio between the number of virtual machines and the number of virtual networks in each of a plurality of subscriptions in a specific region.
[0100] Embodiment 11. The computer system of embodiments 6 to 10, wherein the requested allocated resources include a plurality of virtual machines and a plurality of disk encryption sets. The third rule set is based on a ratio between the number of virtual machines and the number of disk encryption sets in each of a plurality of subscriptions in a specific region.
[0101] Embodiment 12. The computer system of embodiments 6 to 11, wherein the requested resources include a plurality of virtual machines and a plurality of disks, and the fourth rule set is based on a ratio between the number of virtual machines and the number of disks in each subscription in a specific region.
[0102] Embodiment 13. The computer system of embodiments 1 to 12, wherein selecting a specific subscription in a specific area further comprises: dividing the multiple subscriptions in the specific area into a plurality of groups based on the usage ratio of the virtual machines in each of the multiple subscriptions in the specific area. The multiple groups include at least (1) an underutilized pool indicating subscriptions with a usage ratio below a first threshold, (2) a fully utilized pool including subscriptions with a usage ratio greater than a second threshold, and (3) an in-use pool including subscriptions with a usage ratio between a first threshold and a second threshold, wherein the first threshold is less than the second threshold. Then, a first predetermined number of subscriptions in the in-use pool are identified based on the priority, and the specific subscription is selected from the first predetermined number of subscriptions.
[0103] Embodiment 14. The computer system of embodiment 13, wherein each usage ratio of the virtual machines is calculated based on an assumption that the number of virtual machines requested for allocation has already been allocated to each of the plurality of subscriptions.
[0104] Embodiment 15. The computer system of embodiments 13 and 14, wherein the specific subscription is randomly selected from a previous predetermined number of subscriptions.
[0105] Finally, because the principles described herein can be performed in the context of a computer system (e.g., the customer computer system 110, the cloud service computer system 120, the provisioning manager 122, the capacity manager 130, and / or each subscription 152, 154, 156, 162, 164, 166, 172, 174, 176 are implemented at a computer system), reference will be made to Figure 12 Describes some introductory discussions of computer systems.
[0106] Computer systems now increasingly take many forms. For example, a computer system may be a handheld device, an appliance, a laptop computer, a desktop computer, a mainframe, a distributed computer system, a data center, or even a device that is not traditionally considered to be a computer system, such as a wearable object (e.g., glasses). In this specification and claims, the term "computer system" is broadly defined to include any device or system (or combination thereof) that includes at least one physical and tangible processor and a physical and tangible memory on which computer executable instructions that can be executed by the processor can be stored. The memory may take any form and may depend on the nature and form of the computer system. The computer system may be distributed over a network environment and may include multiple component computer systems.
[0107] like Figure 12As shown, in its most basic configuration, computer system 1200 typically includes at least one hardware processing unit 1202 and memory 1204. Processing unit 1202 may include a general-purpose processor and may also include a field programmable gate array (FPGA), an application-specific integrated circuit (ASIC), or any other specialized circuit. Memory 1204 may be physical system memory, which may be volatile, non-volatile, or some combination of the two. The term "memory" may also be used herein to refer to non-volatile mass storage devices, such as physical storage media. If the computer system is distributed, processing, memory, and / or storage capabilities may also be distributed.
[0108] Computer system 1200 also has a number of structures, generally referred to as "executable components," on it. For example, memory 1204 of computer system 1200 is shown as including executable component 1206. The term "executable component" is a name for a structure known to those of ordinary skill in the computing arts, which structure can be software, hardware, or a combination thereof. For example, when implemented in software, one of ordinary skill in the art will understand that the structure of the executable component can include software objects, routines, methods, etc. that can be executed on the computer system, regardless of whether such executable component is stored in the computer system's stack or whether the executable component is stored on a computer-readable storage medium.
[0109] In this case, one of ordinary skill in the art will recognize that the structure of the executable component exists on a computer-readable medium such that, when interpreted by one or more processors of a computer system (e.g., by a processor thread), the computer system is caused to perform a function. Such a structure can be directly computer-readable by the processor (as in the case where the executable component is binary). Alternatively, the structure can be constructed to be interpretable and / or compiled (whether in a single level or in multiple levels) so as to generate a binary code that can be directly interpreted by the processor. When the term "executable component" is used, this understanding of the example structure of the executable component is well within the understanding of one of ordinary skill in the computing arts.
[0110] The term "executable component" is also well understood by those of ordinary skill to include structures such as hard-coded or hard-wired logic gates that are implemented exclusively or nearly exclusively in hardware, such as within a field programmable gate array (FPGA), an application specific integrated circuit (ASIC), or any other dedicated circuit. Thus, the term "executable component" is a term used for structures well known to those of ordinary skill in the computing arts, whether implemented in software, hardware, or a combination. In this specification, the terms "component," "agent," "manager," "service," "engine," "module," "virtual machine," etc. may also be used. As used in this specification and in this context, these terms (whether expressed with or without modification) are also intended to be synonymous with the term "executable component," and therefore also have structures well known to those of ordinary skill in the computing arts.
[0111] In the above description, various embodiments are described with reference to actions performed by one or more computer systems. If such actions are implemented in software, one or more processors (of the associated computer system performing the action) in response to executing the computer-executable instructions constituting the executable component instruct the operation of the computer system. For example, such computer-executable instructions may be included in one or more computer-readable media forming a computer program product. Examples of such operations include the processing of data. If these actions are implemented exclusively or nearly exclusively in hardware, such as in an FPGA or ASIC, the computer-executable instructions may be hard-coded or hard-wired logic gates. The computer-executable instructions (and the manipulated data) may be stored in the memory 1204 of the computer system 1200. The computer system 1200 may also include a communication channel 1208 allowing the computer system 1200 to communicate with other computer systems via, for example, a network 1210.
[0112] Although not all computer systems require a user interface, in some embodiments, the computer system 1200 includes a user interface system 1212 for interacting with a user. The user interface system 1212 may include an output mechanism 1212A and an input mechanism 1212B. The principles described herein are not limited to the precise output mechanism 1212A or input mechanism 1212B, as this will depend on the nature of the device. However, the output mechanism 1212A may include, for example, a speaker, a display, a tactile output, a hologram, etc. Examples of the input mechanism 1212B may include, for example, a microphone, a touch screen, a hologram, a camera, a keyboard, a mouse or other pointer input, any type of sensor, etc.
[0113] The embodiments described herein may include or utilize a special-purpose or general-purpose computer system, including computer hardware, such as one or more processors and system memory, as discussed in more detail below. The embodiments described herein also include physical and other computer-readable media for carrying or storing computer-executable instructions and / or data structures. Such computer-readable media can be any available media that can be accessed by a general-purpose or special-purpose computer system. Computer-readable media that store computer-executable instructions are physical storage media. Computer-readable media that carry computer-executable instructions are transmission media. Thus, by way of example and not limitation, embodiments of the present invention may include at least two distinct types of computer-readable media: storage media and transmission media.
[0114] Computer-readable storage media includes RAM, ROM, EEPROM, CD-ROM, or other optical disk storage, magnetic disk storage, or other magnetic storage devices, or any other physical and tangible storage media that can be used to store desired program code means in the form of computer-executable instructions or data structures and that can be accessed by a general purpose or special purpose computer system.
[0115] A "network" is defined as one or more data links capable of transmitting electronic data between computer systems and / or modules and / or other electronic devices. When information is transmitted or provided to a computer system via a network or another communication connection (hardwired, wireless, or a combination of hardwired or wireless), the computer system properly considers the connection to be a transmission medium. Transmission media may include networks and / or data links that can be used to carry the desired program code means in the form of computer-executable instructions or data structures and that can be accessed by general-purpose or special-purpose computer systems. Combinations of the foregoing should also be included within the scope of computer-readable media.
[0116] Furthermore, upon reaching various computer system components, program code means in the form of computer-executable instructions or data structures can be automatically transferred from a transmission medium to a storage medium (or vice versa). For example, computer-executable instructions or data structures received over a network or data link can be cached in RAM within a network interface module (e.g., a "NIC") and then ultimately transferred to computer system RAM and / or a less volatile storage medium at the computer system. Thus, it should be understood that storage media can be included in computer system components that also (or even primarily) utilize transmission media.
[0117] Computer-executable instructions include, for example, instructions and data that, when executed on a processor, cause a general-purpose computer system, a special-purpose computer system, or a special-purpose processing device to perform a specific function or group of functions. Alternatively or additionally, the computer-executable instructions may configure the computer system to perform the specific function or group of functions. The computer-executable instructions may be, for example, binary code, or even instructions that undergo some kind of translation (e.g., compilation) before being directly executed by the processor, such as instructions in an intermediate format such as assembly language, or even source code.
[0118] Although the subject matter has been described in language specific to structural features and / or methodological acts, it should be understood that the subject matter defined in the appended claims is not necessarily limited to the features or acts described above. Rather, the described features and acts are disclosed as example forms of implementing the claims.
[0119] Those skilled in the art will appreciate that the present invention can be practiced in a network computing environment with many types of computer system configurations, including personal computers, desktop computers, laptop computers, message processors, handheld devices, multiprocessor systems, microprocessor-based or programmable consumer electronics, network PCs, minicomputers, mainframe computers, mobile phones, PDAs, pagers, routers, switches, data centers, wearables (such as glasses), etc. The present invention can also be implemented in a distributed system environment, where local and remote computer systems that are linked (by hardwired data links, wireless data links, or by a combination of hardwired and wireless data links) over a network all perform tasks. In a distributed system environment, program modules can be located in local and remote memory storage devices.
[0120] Those skilled in the art will also appreciate that the present invention can be implemented in a cloud computing environment. A cloud computing environment can be distributed, although this is not required. When distributed, a cloud computing environment can be distributed internationally within an organization and / or have components owned across multiple organizations. In this specification and the appended claims, "cloud computing" is defined as a model for enabling on-demand network access to a shared pool of configurable computing resources (e.g., networks, servers, storage, applications, and services). The definition of "cloud computing" is not limited to any of the numerous other advantages that can be derived from such a model when properly deployed.
[0121] The remaining figures may discuss various computer systems that may correspond to the aforementioned computer system 1200. The computer systems of the remaining figures include various components or functional blocks that can implement the various embodiments disclosed herein, as will be explained. The various components or functional blocks can be implemented on a local computer system, or can be implemented on a distributed computer system that includes elements that reside in the cloud or implement aspects of cloud computing. The various components or functional blocks can be implemented as software, hardware, or a combination of software and hardware. The computer systems of the remaining figures may include more or fewer components than shown in the figures, and some components may be combined as appropriate. Although not necessarily shown, the various components of the computer system can access and / or utilize processors and memory, such as processing unit 1202 and memory 1204, as needed to perform their various functions.
[0122] For the processes and methods disclosed herein, the operations performed in the processes and methods may be implemented in a different order. Furthermore, the operations outlined are provided as examples only, and some of these operations may be optional, combined into fewer steps and operations, supplemented with further operations, or expanded into additional operations without detracting from the essence of the disclosed embodiments.
[0123] The present invention may be embodied in other specific forms without departing from the spirit or features of the present invention. The described embodiments are to be considered in all respects as illustrative and not restrictive. The scope of the present invention is therefore indicated by the appended claims rather than by the foregoing description. All changes that come within the meaning and range of equivalents of the claims are intended to be included within their scope.
Claims
1. A computer system comprising: one or more processors; as well as One or more computer-readable hardware storage devices having computer-executable instructions stored thereon, the computer-executable instructions being structured such that when the computer-executable instructions are executed by the one or more processors, the computer system is configured to: receiving a request for allocation of resources within a cloud environment, the cloud environment comprising a plurality of zones; identifying a plurality of subscriptions in each of the plurality of regions, each subscription being associated with a quota indicating a total amount of resources in the corresponding subscription and a usage indicating an amount of used resources in the corresponding subscription; For each of the plurality of regions, calculating a total quota indicating a sum of quotas of the plurality of subscriptions and a total usage indicating a sum of used amounts of the plurality of subscriptions in the corresponding region; as well as calculating a total usage ratio indicating a ratio between the total usage amount and the total quota; selecting a specific region among the plurality of regions to allocate the resource to based on a total usage ratio of the plurality of regions; Selecting a specific subscription among the plurality of subscriptions in the specific region based on resource usage among the plurality of subscriptions includes: determining a priority for each of the plurality of subscriptions in the particular region based on at least one rule, the at least one rule configured to balance usage of at least a particular type of resources; and selecting the specific subscription among the plurality of subscriptions in the specific area based on the priorities of the plurality of subscriptions in the specific area; and The resource requested to be allocated is allocated from the particular subscription based on the request.
2. A computer system according to claim 1, wherein the resource requested to be allocated includes at least one of the following: (1) a virtual machine, (2) a virtual processor, (3) a virtual network, (4) a disk encryption set including a customer-managed key, or (5) a disk set.
3. The computer system of claim 2, wherein selecting the specific area among the plurality of areas comprises: For each of the plurality of regions, Determine at least one of the following: (1) determine a first usage ratio of virtual machines based on the total number of available virtual machines in the corresponding area and a first total quota of virtual machines, (2) determine a second usage ratio of virtual processors based on a second total number of available virtual processors in the corresponding area and a second total quota of virtual processors, (3) determine a third usage ratio of virtual networks based on a third total number of available virtual networks in the corresponding area and a third total quota of virtual networks, (4) determine a fourth usage ratio of customer management keys based on a fourth total number of available customer management keys in the corresponding area and a fourth total quota of customer management keys, or (5) determine a fifth usage ratio of disks based on a fifth total number of available disks and a fifth total quota of disks; and identifying a highest usage ratio among at least one of the first usage ratio, the second usage ratio, the third usage ratio, or the fourth usage ratio; identifying a lowest rate among the highest usage rates of the plurality of regions; and The specific area corresponding to the lowest ratio is selected. 4 . The computer system of claim 3 , wherein determining at least one of the first usage ratio, the second usage ratio, the third usage ratio, or the fourth usage ratio is periodically performed at a predetermined frequency.
5. A computer system according to claim 2, wherein the at least one rule includes at least one of the following: (1) a first rule set for balancing available virtual machine processors and available virtual machines; (2) a second rule set for balancing available virtual networks and available virtual machines; (3) a third rule set for balancing available customer managed keys and available virtual machines; or (4) a fourth rule set for balancing available disks and available virtual machines.
6. The computer system of claim 5, wherein the computer system is further configured to determine that a specific rule set in the at least one rule has a higher priority based on a total available amount of each type of resource in the specific area and a total quota of each type of resource.
7. The computer system of claim 6, wherein determining that the specific rule set has a higher priority comprises: Identifying at least one of the following: (1) identifying a first usage ratio of virtual processors based on a first total amount of available virtual processors and a first total quota of virtual processors in the specific area, (2) determining a second usage ratio of the virtual networks based on a second total amount of available virtual networks and a second total quota of virtual networks in the specific area, (3) determining a third usage ratio of customer managed keys in a disk encryption set based on a third total amount of available customer managed keys and a third total quota of customer managed keys in the specific area, or (4) determining a fourth usage ratio of disks in the disk encryption set based on a fourth total amount of available disks and a fourth total quota of disks; identifying a highest usage ratio among at least one of the first usage ratio, the second usage ratio, the third usage ratio, or the fourth usage ratio; and It is determined that the rule set corresponding to the type of resource having the highest usage ratio has the higher priority.
8. The computer system of claim 6, wherein: The computer system is a first computer system configured to provide a cloud service that allocates resources to a plurality of customers; The request for a resource is initiated by a second computer system associated with one of the plurality of customers of the cloud service; The resources requested to be allocated include a plurality of virtual machines and a plurality of virtual processors for each virtual machine; as well as The first set of rules is based on a number of virtual processors for each virtual machine and a ratio between available virtual processors and available virtual machines in each of the plurality of subscriptions in the particular region.
9. The computer system of claim 8, wherein applying the first set of rules comprises: calculating a ratio between a first number of available virtual processors and a second number of available virtual machines in each of the plurality of subscriptions in the particular region; identifying, based on the request, a number of virtual processors requested to be allocated for each virtual machine; calculating, for each of the plurality of subscriptions in the specific area, a ratio of the first number to the second number minus an absolute value of the number of virtual processors; as well as The absolute values corresponding to the plurality of subscriptions in the specific area are sorted in an order corresponding to the priorities of the plurality of subscriptions in the specific area.
10. The computer system of claim 6, wherein: The resources requested to be allocated include a plurality of virtual machines and a plurality of virtual networks; and The second set of rules is based on a ratio between a number of virtual machines and a number of virtual networks in each of the plurality of subscriptions in the particular region.
11. The computer system of claim 6, wherein: The resources requested to be allocated include a plurality of virtual machines and a plurality of customer management keys; and The third set of rules is based on a ratio between a number of virtual machines and a number of customer managed keys in each of the plurality of subscriptions in the particular region.
12. The computer system of claim 6, wherein: The requested resources include multiple virtual machines and multiple disks; and The fourth set of rules is based on a ratio between the number of virtual machines and the number of disks in each subscription in the particular region.
13. The computer system of claim 1, wherein: Selecting the specific subscription in the specific region further includes: calculating a usage ratio of a virtual machine in each of the plurality of subscriptions in the specific area; Based on a usage ratio of a virtual machine of each of the plurality of subscriptions in the particular region, the plurality of subscriptions in the particular region are divided into a plurality of groups, the plurality of groups comprising at least: (1) an underutilized pool including subscriptions having a usage ratio lower than a first threshold, (2) a fully utilized pool including subscriptions having a usage ratio greater than a second threshold, the second threshold being lower than the first threshold, and (3) an in-use pool including subscriptions having a usage ratio between the first threshold and the second threshold, wherein the first threshold is lower than the second threshold; identifying a first predetermined number of subscriptions in the in-use pool based on the priority; and The particular subscription is selected from the first predetermined number of subscriptions. 14 . The computer system of claim 13 , wherein each usage ratio of the virtual machine is calculated based on an assumption that the plurality of virtual machines requested for allocation have been allocated to each of the plurality of subscriptions.
15. The computer system of claim 13, wherein the particular subscription is randomly selected from the first predetermined number of subscriptions.
16. A method implemented at a computer system for intelligent allocation of resources in a cloud environment, the method comprising: receiving a request for allocation of resources within the cloud environment, the cloud environment comprising a plurality of zones; identifying a plurality of subscriptions in each of the plurality of regions, each subscription being associated with a quota indicating a total amount of resources in the corresponding subscription and a usage indicating an amount of used resources in the corresponding subscription; For each of the plurality of regions, calculating a total quota indicating a sum of quotas of the plurality of subscriptions and a total usage indicating a sum of used amounts of the plurality of subscriptions in the corresponding region; as well as calculating a total usage ratio indicating a ratio between the total usage amount and the total quota; selecting a specific region among the plurality of regions to allocate the resource to based on a total usage ratio of the plurality of regions; Selecting a specific subscription among the plurality of subscriptions in the specific region based on resource usage among the plurality of subscriptions includes: determining a priority for each of the plurality of subscriptions in the particular region based on at least one rule, the at least one rule configured to balance usage of at least a particular type of resources; and selecting the specific subscription among the plurality of subscriptions in the specific area based on the priorities of the plurality of subscriptions in the specific area; and The resource requested to be allocated is allocated from the particular subscription based on the request.
17. The method of claim 16, wherein the resource requested for allocation comprises at least one of: (1) a virtual machine, (2) a virtual processor, (3) a virtual network, or (4) a disk encryption set including a customer-managed key.
18. The method of claim 17, wherein selecting the specific area among the plurality of areas comprises: For each of the plurality of regions, Determine at least one of the following: (1) determine a first usage ratio of virtual machines based on the total number of available virtual machines in the corresponding area and a first total quota of virtual machines, (2) determine a second usage ratio of virtual processors based on a second total number of available virtual processors in the corresponding area and a second total quota of virtual processors, (3) determine a third usage ratio of virtual networks based on a third total number of available virtual networks in the corresponding area and a third total quota of virtual networks, (4) determine a fourth usage ratio of customer management keys based on a fourth total number of available customer management keys in the corresponding area and a fourth total quota of customer management keys, or (5) determine a fifth usage ratio of disks based on a fifth total number of available disks and a fifth total quota of disks; and identifying a highest usage ratio among at least one of the first usage ratio, the second usage ratio, the third usage ratio, or the fourth usage ratio; identifying a lowest rate among the highest usage rates of the plurality of regions; and The specific area corresponding to the lowest ratio is selected. 19 . The method of claim 18 , wherein determining at least one of the first usage ratio, the second usage ratio, the third usage ratio, or the fourth usage ratio is periodically performed at a predetermined frequency.
20. A computer program product comprising at least one hardware storage device having computer executable instructions stored thereon, the computer executable instructions being structured such that when the computer executable instructions are executed by at least one processor of a computer system, the computer executable instructions configure the computer system to perform: receiving a request for allocation of resources within a cloud environment, the cloud environment comprising a plurality of zones; identifying a plurality of subscriptions in each of the plurality of regions, each subscription being associated with a quota indicating a total amount of resources in the corresponding subscription and a usage indicating an amount of used resources in the corresponding subscription; For each of the plurality of regions, calculating a total quota indicating a sum of quotas of the plurality of subscriptions and a total usage indicating a sum of used amounts of the plurality of subscriptions in the corresponding region; as well as calculating a total usage ratio indicating a ratio between the total usage amount and the total quota; selecting a specific region among the plurality of regions to allocate the resource to based on a total usage ratio of the plurality of regions; Selecting a specific subscription among the plurality of subscriptions in the specific region based on resource usage among the plurality of subscriptions includes: determining a priority for each of the plurality of subscriptions in the particular region based on at least one rule, the at least one rule configured to balance usage of at least a particular type of resources; and selecting the specific subscription among the plurality of subscriptions in the specific area based on the priorities of the plurality of subscriptions in the specific area; and The resource requested to be allocated is allocated from the particular subscription based on the request.
