Methods, devices, and equipment for adjusting server cluster resource quotas for tenants.

By acquiring and adjusting the resource quota data of tenant groups, the problem of server cluster resource shortage was solved and service efficiency was improved by meeting the needs of new tasks and optimizing resource allocation.

CN115981852BActive Publication Date: 2026-04-17UNIV OF SCI & TECH OF CHINA
View PDF 2 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
UNIV OF SCI & TECH OF CHINA
Filing Date
2022-12-21
Publication Date
2026-04-17

AI Technical Summary

Technical Problem

When a server cluster provides services to multiple tenant groups, the sum of the current quotas of each tenant group can easily exceed the total resource limit of the server cluster, leading to resource shortages and reduced service efficiency.

Method used

By acquiring the resource quota data of each tenant group, it is determined whether the resource amount required for the new task meets the preset adjustment conditions, and resources are allocated from the tenant groups with unused quotas to ensure that the resource needs of the target tenant group are met, while ensuring that the current quota of each tenant group is not lower than the quota lower limit.

Benefits of technology

This effectively avoids the situation where the sum of the current quotas of tenant groups exceeds the total resource limit of the server cluster, thereby improving the service efficiency of the server cluster.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN115981852B_ABST
    Figure CN115981852B_ABST
Patent Text Reader

Abstract

This invention provides a method, apparatus, and device for adjusting server cluster resource quotas for tenants. The method includes: in response to a current quota adjustment instruction, acquiring resource quota data for each tenant group; the resource quota data includes the current quota, used quota, quota lower limit, and quota upper limit; if the current quota adjustment instruction includes the resource amount required for a new task of the target tenant group, determining whether the resource amount required for the new task meets preset adjustment conditions; if it does, subtracting the current quota of the target tenant group from the sum of the used quota and the resource amount required for the new task to obtain a quota difference; deducting resources equal to the quota difference from the current quotas of each tenant group with unused quotas; and allocating the resources equal to the quota difference to the target tenant group. This avoids the sum of the current quotas of each tenant group far exceeding the total resource amount of the server cluster, thereby ensuring the service efficiency of the server cluster.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of server cluster resource scheduling technology, and in particular to a method, apparatus and equipment for adjusting server cluster resource quotas for tenants. Background Technology

[0002] When multiple servers are grouped together to provide the same type of service, these servers form a server cluster. From the client's perspective, a server cluster appears as a single server, capable of providing services to multiple tenant groups simultaneously.

[0003] Currently, when a server cluster provides services to multiple tenant groups simultaneously, the actual resource usage of each tenant group must be less than or equal to the current quota of that tenant group. If the current quota of a tenant group cannot meet the resource needs of that tenant group, the target current quota of the tenant group is determined based on the information of that tenant group, and then the current quota of the tenant group is adjusted based on the target current quota.

[0004] However, in related technologies, there is a situation where the sum of the current quotas of each tenant group can far exceed the total resource quota of the server cluster. In this case, the service efficiency of the server cluster is reduced due to the shortage of server cluster resources. Summary of the Invention

[0005] To address the problem in existing technologies where the sum of current quotas for each tenant group can easily exceed the total resource limit of the server cluster, making it difficult to guarantee the service efficiency of the server cluster, this invention provides a method, apparatus, and device for adjusting server cluster resource quotas for tenants.

[0006] The technical solution of this invention is as follows:

[0007] This invention provides a method for adjusting server cluster resource quotas for tenants, including:

[0008] In response to the current quota adjustment instruction, the resource quota data of each tenant group is obtained; the resource quota data includes the current quota, the used quota, the quota lower limit, and the quota upper limit;

[0009] If the current quota adjustment instruction is an instruction that includes the resource amount required for a new task in the target tenant group, then it is determined whether the resource amount required for the new task meets the preset adjustment conditions. The preset adjustment conditions include that the unused quota of the target tenant group is less than the resource amount required for the new task, and that the sum of the unused quotas of each tenant group with unused quotas in the other tenant groups besides the target tenant group is greater than the resource amount required for the new task. The unused quota is equal to the difference between the current quota and the used quota.

[0010] If the resource amount required by the new task meets the preset adjustment conditions, then the sum of the used quota of the target tenant group and the resource amount required by the new task is subtracted from the current quota of the target tenant group to obtain the quota difference.

[0011] From the current quota of each tenant group with unused quota, deduct resources equal to the quota difference; the current quota of each tenant group with unused quota after deduction is not less than the lower limit of the quota for that tenant group;

[0012] The resources of the specified quota difference are allocated to the target tenant group.

[0013] This invention also provides a tenant-oriented server cluster resource quota adjustment device, comprising:

[0014] The resource quota data acquisition module is used to acquire resource quota data for each tenant group in response to the current quota adjustment instruction; the resource quota data includes the current quota, the used quota, the quota lower limit, and the quota upper limit;

[0015] The judgment module is used to determine whether the resource amount required by the new task meets preset adjustment conditions if the current quota adjustment instruction is an instruction that includes the resource amount required by a new task for the target tenant group. The preset adjustment conditions include that the unused quota of the target tenant group is less than the resource amount required by the new task, and that the sum of the unused quotas of each tenant group with unused quotas in the other tenant groups besides the target tenant group is greater than the resource amount required by the new task. The unused quota is equal to the difference between the current quota and the used quota.

[0016] The quota difference calculation module is used to calculate the quota difference by subtracting the current quota of the target tenant group from the sum of the used quota of the target tenant group and the resource amount required by the new task if the resource amount required by the new task meets the preset adjustment conditions.

[0017] The resource retrieval module is used to deduct resources equal to the quota difference from the current quota of each tenant group with unused quota; the current quota of each tenant group with unused quota after deduction is not less than the lower limit of the quota of that tenant group;

[0018] The resource allocation module is used to allocate resources of the quota difference to the target tenant group.

[0019] This invention also provides a tenant-oriented server cluster resource quota adjustment device, comprising:

[0020] At least one processor; and,

[0021] A memory communicatively connected to the at least one processor; wherein,

[0022] The memory stores instructions executable by the at least one processor, which, when executed by the at least one processor, enable the at least one processor to:

[0023] In response to the current quota adjustment instruction, the resource quota data of each tenant group is obtained; the resource quota data includes the current quota, the used quota, the quota lower limit, and the quota upper limit;

[0024] If the current quota adjustment instruction is an instruction that includes the resource amount required for a new task in the target tenant group, then it is determined whether the resource amount required for the new task meets the preset adjustment conditions. The preset adjustment conditions include that the unused quota of the target tenant group is less than the resource amount required for the new task, and that the sum of the unused quotas of each tenant group with unused quotas in the other tenant groups besides the target tenant group is greater than the resource amount required for the new task. The unused quota is equal to the difference between the current quota and the used quota.

[0025] If the resource amount required by the new task meets the preset adjustment conditions, then the sum of the used quota of the target tenant group and the resource amount required by the new task is subtracted from the current quota of the target tenant group to obtain the quota difference.

[0026] From the current quota of each tenant group with unused quota, deduct resources equal to the quota difference; the current quota of each tenant group with unused quota after deduction is not less than the lower limit of the quota for that tenant group;

[0027] The resources of the specified quota difference are allocated to the target tenant group.

[0028] The embodiments of the present invention employ the above technical solution and have the following beneficial effects:

[0029] In response to the current quota adjustment instruction, resource quota data for each tenant group is obtained; the resource quota data includes the current quota, used quota, quota lower limit, and quota upper limit; if the current quota adjustment instruction is an instruction containing the resource amount required for a new task in the target tenant group, it is determined whether the resource amount required for the new task meets the preset adjustment conditions; the preset adjustment conditions include that the unused quota of the target tenant group is less than the resource amount required for the new task, and that the sum of the unused quotas of all tenant groups with unused quotas in the other tenant groups besides the target tenant group is greater than the new task. The required resource amount; the unused quota is equal to the difference between the current quota and the used quota; if the resource amount required by the new task meets the preset adjustment conditions, the sum of the used quota of the target tenant group and the resource amount required by the new task is subtracted from the current quota of the target tenant group to obtain the quota difference; resources equal to the quota difference are deducted from the current quota of each tenant group with unused quota; the current quota of each tenant group with unused quota after deduction is not less than the lower limit of the quota of the tenant group; resources equal to the quota difference are allocated to the target tenant group. Based on this, since resources are allocated to the tenant group from other tenant groups with unused quota when the current quota of a tenant group cannot meet the resource needs of the tenant group, this application makes it difficult for the sum of the current quotas of each tenant group to far exceed the total resource amount of the server cluster, thereby ensuring the service efficiency of the server cluster. Attached Figure Description

[0030] To more clearly illustrate the technical solutions in the embodiments of the present invention or the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are only embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on the provided drawings without creative effort.

[0031] Figure 1 This is a schematic diagram illustrating an application scenario of a method for adjusting server cluster resource quotas for tenants, as provided in an embodiment of the present invention.

[0032] Figure 2 This is a flowchart illustrating a method for adjusting server cluster resource quotas for tenants, provided in an embodiment of the present invention.

[0033] Figure 3 This is a flowchart illustrating another method for adjusting server cluster resource quotas for tenants, as provided in the embodiments of this specification.

[0034] Figure 4 This is a schematic diagram of a tenant-oriented server cluster resource quota adjustment device provided in the embodiments of this specification;

[0035] Figure 5 This is a schematic diagram of the structure of a tenant-oriented server cluster resource quota adjustment device provided in an embodiment of the present invention. Detailed Implementation

[0036] The technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.

[0037] When multiple servers are grouped together to provide the same type of service, these servers form a server cluster. From the client's perspective, a server cluster appears as a single server, capable of providing services to multiple tenant groups simultaneously.

[0038] Currently, when a server cluster simultaneously serves multiple tenant groups, a current quota is pre-set for each tenant group. This current quota represents the server cluster resources allocated to the tenant group corresponding to that quota, and the actual resource usage by the tenant group must be less than or equal to the current quota. Subsequently, if the current quota of a tenant group cannot meet its resource needs, a target current quota is determined based on the tenant group's information, and then the tenant group's current quota is adjusted to that target current quota.

[0039] However, adjusting the current quota of a tenant group solely based on its information can easily lead to a situation where the sum of the current quotas of all tenant groups far exceeds the total resource limit of the server cluster, especially when there are a large number of tenant groups requiring quota adjustments. In this scenario, when the server cluster resources are fully utilized, some tenant groups may have actual resource usage less than their current quota. These tenant groups may continue to submit new tasks to the server cluster. Since the server cluster resources are already fully utilized, these tenant groups submitting new tasks will have to wait in a queue for the server cluster resources to be released.

[0040] Therefore, how to avoid the situation where the sum of the current quotas of each tenant group far exceeds the total resource quota of the server cluster, and how to ensure the service efficiency of the server cluster, has become an urgent technical problem to be solved.

[0041] In order to solve the technical problems existing in the prior art, the present invention provides the following embodiments:

[0042] Figure 1 This is a schematic diagram illustrating an application scenario of a method for adjusting server cluster resource quotas for tenants, as provided in an embodiment of the present invention.

[0043] like Figure 1 As shown, each tenant group has corresponding resource quota data; the resource quota data includes the current quota, the used quota, the quota lower limit, and the quota upper limit. The current quota represents the amount of server cluster resources that the tenant group can use, which can be adjusted. The adjusted current quota must not be greater than the quota upper limit and not less than the quota lower limit. The used quota represents the amount of server cluster resources that the tenant group has used.

[0044] In actual use, when a target tenant group needs to execute a new task, and the unused quota of the target tenant group (i.e., the difference between the current quota of the target tenant group and the used quota of the target tenant group) is less than the resource amount required for the new task, the target tenant group sends a new resource request to the server cluster 12 through the device 11 on the target tenant group side. The new resource request contains new task data, which may include the resource amount required for the new task.

[0045] When server cluster 12 receives the new resource request, it responds by obtaining the resource quota data of each tenant group; it determines whether the resource amount required by the new task meets the preset adjustment conditions; if the resource amount required by the new task meets the preset adjustment conditions, it can allocate resources from the unused quotas of other tenant groups to the target tenant group to meet the resource requirements of the new task of the target tenant group.

[0046] In addition, server cluster 12 can also be configured with timed adjustment instructions, which can be used to periodically adjust the current quota of each tenant group.

[0047] Next, a method for adjusting server cluster resource quotas for tenants, as provided in the embodiments of the specification, will be described in detail with reference to the accompanying drawings:

[0048] Figure 2 This is a flowchart illustrating a method for adjusting server cluster resource quotas for tenants, provided in an embodiment of the present invention. Figure 2 As shown, this process includes:

[0049] Step 201: In response to the current quota adjustment instruction, obtain the resource quota data of each tenant group; the resource quota data includes the current quota, the used quota, the quota lower limit and the quota upper limit.

[0050] In the embodiments of this specification, each tenant group has corresponding resource quota data; the resource quota data includes the current quota, the used quota, the quota lower limit, and the quota upper limit, wherein the current quota represents the amount of server cluster resources that the tenant group can use, which can be adjusted, and the adjusted current quota needs to meet the requirement of not being greater than the quota upper limit and not being less than the quota lower limit; the used quota represents the amount of server cluster resources that the tenant group has used.

[0051] Step 202: If the current quota adjustment instruction is an instruction that includes the resource amount required for a new task in the target tenant group, then determine whether the resource amount required for the new task meets the preset adjustment conditions; the preset adjustment conditions include that the unused quota of the target tenant group is less than the resource amount required for the new task, and that the sum of the unused quotas of each tenant group with unused quotas in the other tenant groups besides the target tenant group is greater than the resource amount required for the new task; the unused quota is equal to the difference between the current quota and the used quota.

[0052] In the embodiments of this specification, when a target tenant group needs to execute a new task, and the unused quota of the target tenant group (i.e., the difference between the current quota of the target tenant group and the used quota of the target tenant group) is less than the resource amount required for the new task, the target tenant group can send a new resource request (i.e., a current quota adjustment instruction) to the server cluster. The current quota adjustment instruction includes the resource amount required for the new task.

[0053] After receiving the current quota adjustment instruction, the server cluster obtains the resource amount required for the new task from the instruction. It then determines whether the resource amount required for the new task is greater than the unused quota of the target tenant group and less than the sum of the unused quotas of all tenant groups (excluding the target tenant group). If so, step 203 is executed. Among the tenant groups (excluding the target tenant group), some may have fully utilized their current quota (i.e., their current quota equals their used quota), while others may not have fully utilized their quota. These tenant groups that have not fully utilized their quota are called tenant groups with unused quotas. "The sum of the unused quotas of all tenant groups with unused quotas is greater than the resource amount required for the new task" means that the idle resources corresponding to the tenant groups with unused quotas can meet the resource amount required for the new task of the target tenant group.

[0054] In addition, the preset adjustment condition "the sum of the unused quotas of each tenant group with unused quotas is greater than the resource amount required by the new task" can also be replaced with "the sum of the unused quotas of each tenant group with unused quotas and the target tenant group is greater than the resource amount required by the new task". Those skilled in the art can set it according to actual needs.

[0055] Step 203: If the resource amount required by the new task meets the preset adjustment conditions, then the sum of the used quota of the target tenant group and the resource amount required by the new task is subtracted from the current quota of the target tenant group to obtain the quota difference.

[0056] Step 204: Deduct resources equal to the quota difference from the current quota of each tenant group with unused quota; the current quota of each tenant group with unused quota after deduction shall not be less than the lower limit of the quota of that tenant group.

[0057] In this embodiment, a first target tenant group with unused quotas can be selected from each tenant group with unused quotas. The unused quota of this first target tenant group with unused quotas is greater than the resource amount required for the new task. Then, resources equal to the quota difference are deducted from the current quota of this first target tenant group with unused quotas. Alternatively, multiple second target tenant groups with unused quotas can be selected from each tenant group with unused quotas. Then, resources equal to a preset value are deducted from the current quota of each second target tenant group with unused quotas. The product of the preset value and the second target tenant group with unused quotas equals the quota difference.

[0058] It should be noted that, regardless of the deduction method used, the current quota of each tenant group with unused quota after deduction must not be less than the quota lower limit of that tenant group.

[0059] Step 205: Allocate the resources of the quota difference to the target tenant group.

[0060] In the embodiments described in this specification, the current quota of the target tenant group is adjusted according to the quota difference, such that the adjusted current quota of the target tenant group is equal to the sum of the original current quota of the target tenant group and the quota difference.

[0061] This specification's embodiments employ the above technical solution, responding to a current quota adjustment instruction to obtain resource quota data for each tenant group; the resource quota data includes the current quota, used quota, quota lower limit, and quota upper limit; if the current quota adjustment instruction is an instruction containing the resource amount required for a new task in the target tenant group, then it is determined whether the resource amount required for the new task meets preset adjustment conditions; the preset adjustment conditions include that the unused quota of the target tenant group is less than the resource amount required for the new task, and that among the tenant groups other than the target tenant group, the unused quota of each tenant group with unused quota is... The sum of the unused quotas is greater than the resource amount required by the new task; the unused quota is equal to the difference between the current quota and the used quota; if the resource amount required by the new task meets the preset adjustment conditions, the sum of the used quota of the target tenant group and the resource amount required by the new task is subtracted from the current quota of the target tenant group to obtain the quota difference; resources equal to the quota difference are deducted from the current quota of each tenant group with unused quotas; the current quota of each tenant group with unused quotas after deduction is not less than the lower limit of the quota of the tenant group; resources equal to the quota difference are allocated to the target tenant group. Based on this, since resources are allocated to the tenant group from other tenant groups with unused quotas when the current quota of a tenant group cannot meet the resource needs of the tenant group, this application makes it difficult for the sum of the current quotas of each tenant group to far exceed the total resource amount of the server cluster, thereby ensuring the service efficiency of the server cluster.

[0062] Preferably, step 204: deducting the resources equal to the quota difference from the current quota of each tenant group with unused quotas, may specifically include:

[0063] Calculate the resource consumption rate of each tenant group with unused quotas; the resource consumption rate of each tenant group with unused quotas is the ratio of the used quota to the current quota.

[0064] The tenant groups with unused quotas are sorted according to the rule of resource consumption rate from small to large.

[0065] Based on the sorting results, the current quota of each tenant group with unused quota is deducted sequentially until the sum of the deducted current quotas equals the quota difference.

[0066] In this embodiment, it is assumed that the tenant groups with unused quotas are tenant group 1, tenant group 2, and tenant group 3. Tenant group 1 has a used quota of 10 and a current quota of 100, so its resource consumption rate is 10 / 100. Similarly, the resource consumption rates of tenant groups 2 and 3 can be calculated. The smaller the resource consumption rate of a tenant group with unused quotas, the greater the difference between its used quota and current quota. Based on the rule of increasing resource consumption rate, the tenant groups with unused quotas are sorted. According to the sorting result, the current quota of each tenant group with unused quotas is deducted sequentially. This helps avoid tenant groups with a large difference between their used and current quotas, thus ensuring the resource needs of each tenant group while avoiding excessive "idle resources."

[0067] Preferably, the step is as follows: Based on the sorting result, the current quota of each tenant group with unused quota is deducted sequentially until the sum of the deducted current quotas equals the quota difference. Specifically, this may include:

[0068] Based on the sorting results and the preset deduction rules, the current quota of each tenant group with unused quota is deducted sequentially until the sum of the deducted current quotas equals the quota difference.

[0069] The preset deduction rule is as follows: Repeat the following steps: deduct resources equal to the second adjustment value from the current quota of the tenant group with unused quota until the difference between the current quota of the tenant group with unused quota and the second adjustment value is less than the quota lower limit of the tenant group with unused quota, and then start deducting the current quota of the next tenant group with unused quota from the tenant group with unused quota.

[0070] To illustrate the above method more clearly, the following example is provided:

[0071] Following the example above, assume that the resource consumption rates of tenant group 1, tenant group 2, and tenant group 3 are 0.1, 0.4, and 0.8, respectively, the second adjustment value is 1, and the quota difference is 3. The specific deduction process is as follows: First, determine whether the difference between the current quota of tenant group 1 and the second adjustment value is less than the quota lower limit of tenant group 1. If the result is no, then deduct resources of the second adjustment value from the current quota of tenant group 1. Then, determine whether the sum of the deducted current quotas (i.e., 1) is equal to the quota difference (i.e., 3). If the result is no, then determine whether the difference between the current quota of tenant group 1 after deduction and the second adjustment value is less than the quota lower limit of tenant group 1. If the result is no, then deduct resources of the second adjustment value from the current quota of tenant group 1 again. Next, it is determined whether the sum of the deducted current quotas (i.e., 2) is equal to the quota difference (i.e., 3). If the result is no, then it is determined whether the difference between the current quota of tenant group 1 after deduction and the second adjustment value is less than the quota lower limit of tenant group 1. If the result is yes, then the deduction process for tenant group 1 ends, and the deduction of the current quota of the next tenant group of tenant group 1 begins. Specifically, it is determined whether the difference between the current quota of tenant group 2 and the second adjustment value is less than the quota lower limit of tenant group 2. If the result is no, then resources of the second adjustment value are deducted from the current quota of tenant group 2. It is then determined whether the sum of the deducted current quotas (i.e., 3) is equal to the quota difference (i.e., 3). If the result is yes, then the above process ends.

[0072] Preferably, the preset adjustment conditions also include that the current quota of the target tenant group is less than the quota limit of the tenant group.

[0073] Preferably, in the embodiments of this specification, in addition to adjusting the current quota of each tenant group according to the new resource requests of the target tenant group, the current quota of each tenant group can also be adjusted periodically. Figure 3 This is a flowchart illustrating another method for adjusting server cluster resource quotas for tenants, provided in the embodiments of this specification. Figure 3 As shown, this process includes:

[0074] Step 301: In response to the current quota adjustment instruction, obtain the resource quota data of each tenant group; the resource quota data includes the current quota, the used quota, the quota lower limit and the quota upper limit.

[0075] Step 302: If the current quota adjustment instruction is a timed adjustment instruction, then determine that among the tenant groups, the tenant group whose current quota is greater than the used quota is the tenant group to be adjusted.

[0076] Step 303: Determine multiple adjustment method combinations for the tenant group to be adjusted; each adjustment method combination includes a predetermined adjustment method for each tenant group to be adjusted, and in each adjustment method combination, at least one predetermined adjustment method for the tenant group to be adjusted is different from the predetermined adjustment methods for the tenant group to be adjusted in other adjustment method combinations; the predetermined adjustment method for the tenant group to be adjusted includes: allocating resources of a first adjustment value to the tenant group to be adjusted, or deducting resources of the first adjustment value from the current quota of the tenant group to be adjusted; the first adjustment value is a value that satisfies a preset condition, the preset condition being: the adjusted current quota of each tenant group to be adjusted is not less than the lower limit of the quota of the tenant group to be adjusted, and is not greater than the upper limit of the quota of the tenant group to be adjusted.

[0077] To illustrate step 303 more clearly, the following example is provided:

[0078] Assuming there are tenant groups 4 and 5 to be adjusted, the corresponding adjustment method combinations can include (A41, A51), (A41, A52), (A42, A51), and (A42, A52). Here, A41 indicates that the predetermined adjustment method for tenant group 4 is to allocate resources of a first adjustment value to tenant group 4, and A42 indicates that the predetermined adjustment method for tenant group 4 is to deduct resources of the first adjustment value from the current quota of tenant group 4. A51 and A52 are similarly handled.

[0079] Step 304: Obtain the resource consumption rate variance corresponding to each of the adjustment method combinations; for any one of the adjustment method combinations, the resource consumption rate variance is obtained based on the resource consumption rate of each tenant group to be adjusted, and the resource consumption rate of each tenant group to be adjusted is: the ratio of the used quota to the current quota obtained after adjustment according to the predetermined adjustment method in any one of the adjustment method combinations.

[0080] In the embodiments of this specification, the specific process for obtaining the resource consumption rate variance corresponding to any one of the adjustment method combinations may be as follows: For each tenant group to be adjusted under any one of the adjustment method combinations, firstly, determine the current quota obtained by the tenant group to be adjusted after adjusting according to the predetermined adjustment method corresponding to the tenant group to be adjusted in the adjustment method combination; then, calculate the ratio of the used quota of the tenant group to be adjusted to the current quota obtained after adjustment, and obtain the resource consumption rate of the tenant group to be adjusted. After obtaining the resource consumption rate of each tenant group to be adjusted under any one of the adjustment method combinations, substitute the resource consumption rate of each tenant group to be adjusted into the variance calculation formula of the prior art to obtain the resource consumption rate variance corresponding to any one of the adjustment method combinations.

[0081] Step 305: Determine the adjustment combination corresponding to the minimum resource consumption rate variance as the target adjustment combination.

[0082] In the embodiments of this specification, the smaller the variance of the resource consumption rate, the more similar the resource consumption rates of each tenant group to be adjusted. This means that some tenant groups will not have a large amount of idle resources while others will have a small amount. Therefore, determining the adjustment method combination corresponding to the smallest resource consumption rate variance is the target adjustment method combination. Adjusting the current quota of each tenant group to be adjusted according to the predetermined adjustment method in the target adjustment method combination helps improve the rationality of resource allocation in this application.

[0083] Step 306: Adjust the current quota of each tenant group to be adjusted according to the predetermined adjustment method of each tenant group to be adjusted in the target adjustment method combination.

[0084] In this embodiment of the specification, following the example above, assuming that (A41, A51) is a target adjustment method combination, then "adjusting the current quota of each tenant group to be adjusted according to the predetermined adjustment method of each tenant group to be adjusted in the target adjustment method combination" specifically includes: allocating resources of the first adjustment value to tenant group 4, and allocating resources of the first adjustment value to tenant group 5.

[0085] Preferably, the sum of the current quotas of each tenant group is equal to the total resources of the server cluster.

[0086] In this embodiment, a full allocation method can be used to distribute the server cluster's resources to each tenant group. Full allocation means that 100% of the server cluster's resources are allocated to each tenant group; that is, the sum of the current quotas of each tenant group equals the total resources of the server cluster. The full allocation method has the advantage of exclusive resource use, preventing preemption and thus ensuring the service efficiency of the server cluster.

[0087] Preferably, the sum of the current quotas of each tenant group is equal to the product of the total resources of the server cluster and a preset coefficient.

[0088] In this embodiment, an over-allocation method can be used to allocate server cluster resources to each tenant group. Over-allocation refers to multiplying the server cluster resources by a preset coefficient to obtain the expected resource amount to be allocated to each tenant group. Then, based on this expected resource amount, the current quota of each tenant group is set so that the sum of the current quotas of each tenant group is equal to the product of the total resources of the server cluster and the preset coefficient. The over-allocation method has the advantage of improving the resource utilization of the server cluster.

[0089] Preferably, the first adjustment value can be obtained based on the user's settings, so that the user can adjust the size of the first adjustment value according to the actual situation.

[0090] Based on a general inventive concept, embodiments of this specification also provide a device for adjusting server cluster resource quotas for tenants. Figure 4 This is a schematic diagram of a tenant-oriented server cluster resource quota adjustment device provided in the embodiments of this specification. Figure 4 As shown, this device includes:

[0091] The resource quota data acquisition module 41 is used to acquire the resource quota data of each tenant group in response to the current quota adjustment instruction; the resource quota data includes the current quota, the used quota, the quota lower limit and the quota upper limit.

[0092] The judgment module 42 is used to determine whether the resource amount required by the new task meets the preset adjustment conditions if the current quota adjustment instruction is an instruction that includes the resource amount required by the new task of the target tenant group; the preset adjustment conditions include that the unused quota of the target tenant group is less than the resource amount required by the new task, and that the sum of the unused quotas of each tenant group with unused quotas in the other tenant groups besides the target tenant group is greater than the resource amount required by the new task; the unused quota is equal to the difference between the current quota and the used quota.

[0093] The quota difference calculation module 43 is used to calculate the quota difference by subtracting the current quota of the target tenant group from the sum of the used quota of the target tenant group and the resource amount required by the new task if the resource amount required by the new task meets the preset adjustment conditions.

[0094] The resource retrieval module 44 is used to deduct resources equal to the quota difference from the current quota of each tenant group with unused quota; the current quota of each tenant group with unused quota after deduction is not less than the lower limit of the quota of that tenant group.

[0095] Resource allocation module 45 is used to allocate resources of the quota difference to the target tenant group.

[0096] Preferably, the resource retrieval module 44 may specifically include:

[0097] The calculation submodule is used to calculate the resource consumption rate of each tenant group with unused quotas; the resource consumption rate of each tenant group with unused quotas is the ratio of the used quota to the current quota.

[0098] The sorting submodule is used to sort the tenant groups with unused quotas according to the rule of resource consumption rate from small to large.

[0099] The resource retrieval submodule is used to deduct the current quota of each tenant group with unused quota in turn according to the sorting result, until the sum of the deducted current quotas equals the quota difference.

[0100] The preferred resource retrieval submodule can be used for:

[0101] Based on the sorting results and the preset deduction rules, the current quota of each tenant group with unused quota is deducted sequentially until the sum of the deducted current quotas equals the quota difference.

[0102] The preset deduction rule is as follows: Repeat the following steps: deduct resources equal to the second adjustment value from the current quota of the tenant group with unused quota until the difference between the current quota of the tenant group with unused quota and the second adjustment value is less than the quota lower limit of the tenant group with unused quota, and then start deducting the current quota of the next tenant group with unused quota from the tenant group with unused quota.

[0103] Preferably, the preset adjustment conditions also include that the current quota of the target tenant group is less than the quota limit of the tenant group.

[0104] Preferably, the apparatus in the embodiments of this specification may further include: a timing adjustment module, used for:

[0105] If the current quota adjustment instruction is a timed adjustment instruction, then among the tenant groups, the tenant group whose current quota is greater than the used quota is determined to be the tenant group to be adjusted.

[0106] Multiple adjustment method combinations are determined for the tenant groups to be adjusted; each adjustment method combination includes a predetermined adjustment method for each tenant group to be adjusted, and in each adjustment method combination, at least one predetermined adjustment method for the tenant group to be adjusted is different from the predetermined adjustment methods for the tenant group to be adjusted in other adjustment method combinations; the predetermined adjustment method for the tenant group to be adjusted includes: allocating resources of a first adjustment value to the tenant group to be adjusted, or deducting resources of the first adjustment value from the current quota of the tenant group to be adjusted; the first adjustment value is a value that satisfies a preset condition, the preset condition being: the adjusted current quota of each tenant group to be adjusted is not less than the lower limit of the quota of the tenant group to be adjusted, and is not greater than the upper limit of the quota of the tenant group to be adjusted.

[0107] Obtain the resource consumption rate variance corresponding to each of the adjustment method combinations; for any one of the adjustment method combinations, the resource consumption rate variance is obtained based on the resource consumption rate of each tenant group to be adjusted, and the resource consumption rate of each tenant group to be adjusted is: the ratio of the used quota to the current quota obtained after adjustment according to the predetermined adjustment method in any one of the adjustment method combinations.

[0108] The combination of adjustment methods corresponding to the minimum variance in resource consumption rate is determined as the target combination of adjustment methods.

[0109] Adjust the current quota of each tenant group to be adjusted according to the predetermined adjustment method of each tenant group to be adjusted in the target adjustment method combination.

[0110] Preferably, the sum of the current quotas of each tenant group is equal to the total resources of the server cluster.

[0111] Preferably, the sum of the current quotas of each tenant group is equal to the product of the total resources of the server cluster and a preset coefficient.

[0112] Preferably, the first adjustment value is obtained based on the user's settings.

[0113] Based on a general inventive concept, embodiments of the present invention also provide a device for adjusting server cluster resource quotas for tenants. Figure 5 This is a schematic diagram of a tenant-oriented server cluster resource quota adjustment device provided in an embodiment of the present invention. Figure 5 As shown, device 500 may include:

[0114] At least one processor 510; and,

[0115] Memory 530 communicatively connected to the at least one processor; wherein,

[0116] The memory 530 stores instructions 520 that can be executed by the at least one processor 510, the instructions being executed by the at least one processor 510 to enable the at least one processor 510 to:

[0117] In response to the current quota adjustment instruction, the resource quota data of each tenant group is obtained; the resource quota data includes the current quota, the used quota, the quota lower limit, and the quota upper limit;

[0118] If the current quota adjustment instruction is an instruction that includes the resource amount required for a new task in the target tenant group, then it is determined whether the resource amount required for the new task meets the preset adjustment conditions. The preset adjustment conditions include that the unused quota of the target tenant group is less than the resource amount required for the new task, and that the sum of the unused quotas of each tenant group with unused quotas in the other tenant groups besides the target tenant group is greater than the resource amount required for the new task. The unused quota is equal to the difference between the current quota and the used quota.

[0119] If the resource amount required by the new task meets the preset adjustment conditions, then the sum of the used quota of the target tenant group and the resource amount required by the new task is subtracted from the current quota of the target tenant group to obtain the quota difference.

[0120] From the current quota of each tenant group with unused quota, deduct resources equal to the quota difference; the current quota of each tenant group with unused quota after deduction is not less than the lower limit of the quota for that tenant group;

[0121] The resources of the specified quota difference are allocated to the target tenant group.

[0122] For the foregoing method embodiments, in order to simplify the description, they are all described as a series of actions. However, those skilled in the art should understand that the present invention is not limited to the described order of actions, because according to the present invention, some steps can be performed in other orders or simultaneously. Furthermore, those skilled in the art should also understand that the embodiments described in the specification are preferred embodiments, and the actions and modules involved are not necessarily essential to the present invention.

[0123] It should be noted that the various embodiments in this specification are described in a progressive manner, with each embodiment focusing on the differences from other embodiments. Similar or identical parts between embodiments can be referred to interchangeably. For apparatus embodiments, since they are basically similar to method embodiments, the description is relatively simple; relevant parts can be referred to the descriptions in the method embodiments.

[0124] The steps in the methods of the various embodiments of the present invention can be adjusted, merged, or deleted in order according to actual needs, and the technical features described in the various embodiments can be replaced or combined.

[0125] The modules and sub-modules in the various embodiments of the present invention can be merged, divided, and deleted according to actual needs.

[0126] In the embodiments provided by this invention, it should be understood that the disclosed terminals, devices, and methods can be implemented in other ways. For example, the terminal embodiments described above are merely illustrative. For instance, the division of modules or sub-modules is only a logical functional division, and in actual implementation, there may be other division methods. For example, multiple sub-modules or modules may be combined or integrated into another module, or some features may be ignored or not executed. Furthermore, the coupling or direct coupling or communication connection shown or discussed may be an indirect coupling or communication connection through some interfaces, devices, or modules, and may be electrical, mechanical, or other forms.

[0127] The modules or submodules described as separate components may or may not be physically separate. The components that constitute a module or submodule may or may not be physical modules or submodules; that is, they may be located in one place or distributed across multiple network modules or submodules. Some or all of the modules or submodules can be selected to achieve the purpose of this embodiment's solution, depending on actual needs.

[0128] Furthermore, the functional modules or sub-modules in the various embodiments of the present invention can be integrated into one processing module, or each module or sub-module can exist physically separately, or two or more modules or sub-modules can be integrated into one module. The integrated modules or sub-modules described above can be implemented in hardware or in the form of software functional modules or sub-modules.

[0129] Those skilled in the art will further recognize that the units and algorithm steps of the various examples described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, computer software, or a combination of both. To clearly illustrate the interchangeability of hardware and software, the components and steps of the various examples have been generally described in terms of functionality in the foregoing description. Whether these functions are implemented in hardware or software depends on the specific application and design constraints of the technical solution. Those skilled in the art can use different methods to implement the described functions for each specific application, but such implementations should not be considered beyond the scope of this invention.

[0130] The steps of the methods or algorithms described in conjunction with the embodiments disclosed herein can be implemented directly by hardware, a software unit executed by a processor, or a combination of both. The software unit can be located in random access memory (RAM), main memory, read-only memory (ROM), electrically programmable ROM, electrically erasable programmable ROM, registers, hard disk, removable disk, CD-ROM, or any other form of storage medium known in the art.

[0131] Finally, it should be noted that in this document, relational terms such as "first" and "second" are used only to distinguish one entity or operation from another, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Furthermore, the terms "comprising," "including," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such a process, method, article, or apparatus. Without further limitations, an element defined by the phrase "comprising one..." does not exclude the presence of other identical elements in the process, method, article, or apparatus that includes said element.

[0132] The above description of the disclosed embodiments enables those skilled in the art to make or use the invention. Various modifications to these embodiments will be readily apparent to those skilled in the art, and the general principles defined herein may be implemented in other embodiments without departing from the spirit or scope of the invention. Therefore, the invention is not to be limited to the embodiments shown herein, but is to be accorded the widest scope consistent with the principles and novel features disclosed herein.

Claims

1. A method for adjusting a resource quota of a tenant-oriented server cluster, characterized in that, include: In response to the current quota adjustment instruction, obtain the resource quota data for each tenant group; The resource quota data includes the current quota, the used quota, the quota lower limit, and the quota upper limit; If the current quota adjustment instruction is an instruction that includes the resource amount required for a new task in the target tenant group, then it is determined whether the resource amount required for the new task meets the preset adjustment conditions. The preset adjustment conditions include that the unused quota of the target tenant group is less than the resource amount required for the new task, and that the sum of the unused quotas of each tenant group with unused quotas in the other tenant groups besides the target tenant group is greater than the resource amount required for the new task. The unused quota is equal to the difference between the current quota and the used quota. If the resource amount required by the new task meets the preset adjustment conditions, then the sum of the used quota of the target tenant group and the resource amount required by the new task is subtracted from the current quota of the target tenant group to obtain the quota difference. From the current quota of each tenant group with unused quota, deduct resources equal to the quota difference; the current quota of each tenant group with unused quota after deduction is not less than the lower limit of the quota for that tenant group; The resources of the specified quota difference are allocated to the target tenant group.

2. The method of claim 1, wherein, The step of deducting the resources equal to the quota difference from the current quota of each tenant group with unused quotas specifically includes: Calculate the resource consumption rate of each tenant group with unused quotas; the resource consumption rate of each tenant group with unused quotas is the ratio of the used quota to the current quota. The tenant groups with unused quotas are sorted according to the rule of resource consumption rate from small to large. Based on the sorting results, the current quota of each tenant group with unused quota is deducted sequentially until the sum of the deducted current quotas equals the quota difference.

3. The method of claim 2, wherein, The step of deducting the current quota of each tenant group with unused quota according to the sorting result until the sum of the deducted current quotas equals the quota difference specifically includes: According to the sorting results and the preset deduction rules, the current quota of each tenant group with unused quota is deducted in turn until the sum of the deducted current quotas equals the quota difference. The preset deduction rule is as follows: Repeat the following steps: deduct resources equal to the second adjustment value from the current quota of the tenant group with unused quota until the difference between the current quota of the tenant group with unused quota and the second adjustment value is less than the quota lower limit of the tenant group with unused quota, and then start deducting the current quota of the next tenant group with unused quota from the tenant group with unused quota.

4. The method of claim 1, wherein, The preset adjustment conditions also include that the current quota of the target tenant group is less than the quota limit of the tenant group.

5. The method of claim 1, wherein, Also includes: If the current quota adjustment instruction is a timed adjustment instruction, then among the tenant groups, the tenant group whose current quota is greater than the used quota is determined to be the tenant group to be adjusted; Determine multiple adjustment method combinations for the tenant group to be adjusted; each adjustment method combination includes a predetermined adjustment method for each tenant group to be adjusted, and in each adjustment method combination, at least one predetermined adjustment method for the tenant group to be adjusted is different from the predetermined adjustment method for the tenant group to be adjusted in other adjustment method combinations; The predetermined adjustment method for the tenant group to be adjusted includes: allocating resources of a first adjustment value to the tenant group to be adjusted, or deducting resources of the first adjustment value from the current quota of the tenant group to be adjusted; the first adjustment value is a value that meets a preset condition, the preset condition being: the adjusted current quota of each tenant group to be adjusted is not less than the lower limit of the quota of the tenant group to be adjusted, and is not greater than the upper limit of the quota of the tenant group to be adjusted. Obtain the resource consumption rate variance corresponding to each of the adjustment method combinations; for any one of the adjustment method combinations, the resource consumption rate variance is obtained based on the resource consumption rate of each tenant group to be adjusted, and the resource consumption rate of each tenant group to be adjusted is: the ratio of the used quota to the current quota obtained after adjustment according to the predetermined adjustment method in any one of the adjustment method combinations; The combination of adjustment methods corresponding to the minimum variance in resource consumption rate is determined as the target combination of adjustment methods; Adjust the current quota of each tenant group to be adjusted according to the predetermined adjustment method of each tenant group to be adjusted in the target adjustment method combination.

6. The method of claim 1, wherein, The sum of the current quotas of each tenant group equals the total resources of the server cluster.

7. The method of claim 1, wherein, The sum of the current quotas of each tenant group is equal to the product of the total resources of the server cluster and the preset coefficient.

8. The method of claim 5, wherein, The first adjustment value is obtained based on the user's settings.

9. An apparatus for adjusting a resource quota of a tenant-oriented server cluster, characterized in that, include: The resource quota data acquisition module is used to acquire the resource quota data of each tenant group in response to the current quota adjustment command; The resource quota data includes the current quota, the used quota, the quota lower limit, and the quota upper limit; The judgment module is used to determine whether the resource amount required by the new task meets preset adjustment conditions if the current quota adjustment instruction is an instruction that includes the resource amount required by a new task for the target tenant group. The preset adjustment conditions include that the unused quota of the target tenant group is less than the resource amount required by the new task, and that the sum of the unused quotas of each tenant group with unused quotas in the other tenant groups besides the target tenant group is greater than the resource amount required by the new task. The unused quota is equal to the difference between the current quota and the used quota. The quota difference calculation module is used to calculate the quota difference by subtracting the current quota of the target tenant group from the sum of the used quota of the target tenant group and the resource amount required by the new task if the resource amount required by the new task meets the preset adjustment conditions. The resource retrieval module is used to deduct resources equal to the quota difference from the current quota of each tenant group with unused quota; the current quota of each tenant group with unused quota after deduction is not less than the lower limit of the quota of that tenant group; The resource allocation module is used to allocate resources of the quota difference to the target tenant group.

10. A device for adjusting server cluster resource quotas for tenants, characterized in that, include: At least one processor; as well as, A memory communicatively connected to the at least one processor; wherein, The memory stores instructions executable by the at least one processor, which, when executed by the at least one processor, enable the at least one processor to: In response to the current quota adjustment instruction, the resource quota data of each tenant group is obtained; the resource quota data includes the current quota, the used quota, the quota lower limit, and the quota upper limit; If the current quota adjustment instruction is an instruction that includes the resource amount required for a new task in the target tenant group, then it is determined whether the resource amount required for the new task meets the preset adjustment conditions. The preset adjustment conditions include that the unused quota of the target tenant group is less than the resource amount required for the new task, and that the sum of the unused quotas of each tenant group with unused quotas in the other tenant groups besides the target tenant group is greater than the resource amount required for the new task. The unused quota is equal to the difference between the current quota and the used quota. If the resource amount required by the new task meets the preset adjustment conditions, then the sum of the used quota of the target tenant group and the resource amount required by the new task is subtracted from the current quota of the target tenant group to obtain the quota difference. From the current quota of each tenant group with unused quota, deduct resources equal to the quota difference; the current quota of each tenant group with unused quota after deduction is not less than the lower limit of the quota for that tenant group; The resources of the specified quota difference are allocated to the target tenant group.

Citation Information

Patent Citations

  • Method and system for guaranteeing cloud computing server cluster network

    CN103747059A

  • Extensible framework for resource provider service and quota management

    US20150269511A1