Resource allocation method, device, computer equipment and storage medium
By calculating the over-resolution ratio and the actual size of the resource pool, resource allocation is optimized, the problem of resource waste is solved, and higher resource utilization and user accommodation capacity are achieved.
Patent Information
- Application Number
- CN202210936772.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-08-05
- Publication Date
- 2025-10-03
- Estimated Expiration
- 2042-08-05
AI Technical Summary
In the existing technology, in order to ensure that the upper limit of tenant resource usage is available, the platform needs to provide resources that are greater than the sum of the upper limits of all tenants, resulting in serious waste of resources, especially when the number of users increases.
By calculating the over-allocation ratio and the actual size of the resource pool, the upper limit of the allocatable amount of the resource pool is determined, making it larger than the actual size of the resource pool, thereby optimizing resource allocation and avoiding resource waste.
It improves resource utilization of the resource pool, reduces resource waste, and can support the business needs of more users without increasing physical resources.
Smart Images

Figure CN116126513B_ABST
Abstract
Description
Technical Field
[0001] The present disclosure relates to the field of electronic technology, and more particularly, to a resource allocation method, apparatus, computer equipment, and storage medium. Background Art
[0002] When the platform manages the resource usage quota of tenants (users), it needs to ensure that the upper limit of the tenant's resource usage quota is available. In related technologies, 100% resource guarantee is provided to tenants according to the upper limit of the tenant's resource usage quota. This requires that the infrastructure has sufficient resources for tenants to use within their quota, but this usually results in a waste of platform resources. Summary of the Invention
[0003] An exemplary embodiment of the present disclosure provides a resource allocation method, apparatus, computer device, and storage medium, which can determine the allocatable quota limit of a resource pool according to the over-allocation ratio, so that the allocatable quota limit of the resource pool is greater than the actual size of the resource pool.
[0004] According to a first aspect of an embodiment of the present disclosure, a resource allocation method is provided, comprising: determining an over-allocation ratio of a resource pool based on an upper limit on resource usage quota and a size of allocated resources of each user of the resource pool; determining an upper limit on an allocatable quota of the resource pool based on the over-allocation ratio of the resource pool and an actual size of the resource pool; and providing users with resources in the resource pool based on the upper limit on an allocatable quota of the resource pool; wherein the upper limit on an allocatable quota of the resource pool is greater than the actual size of the resource pool, and the resources in the resource pool are used to support the execution of users' services.
[0005] According to a second aspect of an embodiment of the present disclosure, a resource allocation device is provided, comprising: an over-allocation ratio determination unit, configured to determine the over-allocation ratio of the resource pool based on the upper limit of resource usage quota and the size of allocated resources of each user of the resource pool; a quota determination unit, configured to determine the upper limit of allocatable quota of the resource pool based on the over-allocation ratio of the resource pool and the actual size of the resource pool; a resource provision unit, configured to provide users with resources in the resource pool based on the upper limit of allocatable quota of the resource pool; wherein the upper limit of allocatable quota of the resource pool is greater than the actual size of the resource pool, and the resources in the resource pool are used to support the execution of user services.
[0006] According to a third aspect of an embodiment of the present disclosure, a computer device is provided, comprising: at least one processor; and at least one memory storing computer-executable instructions, wherein the computer-executable instructions, when executed by the at least one processor, prompt the at least one processor to execute the resource allocation method as described above.
[0007] According to a fourth aspect of an embodiment of the present disclosure, a computer-readable storage medium is provided. When instructions in the computer-readable storage medium are executed by at least one processor, the at least one processor is prompted to execute the resource allocation method as described above.
[0008] According to a fifth aspect of an embodiment of the present disclosure, there is provided computer software comprising computer instructions, which implement the resource allocation method as described above when executed by at least one processor.
[0009] According to the resource allocation method, apparatus, computer device, and storage medium of the exemplary embodiments of the present disclosure, the resource pool's allocatable quota limit can be determined based on the over-allocation ratio derived from the resource usage quota caps of each user in the resource pool and the size of the allocated resources. This allows the allocatable quota limit of the resource pool to be greater than the actual size of the resource pool. In other words, the resource pool does not need to provide actual physical resources equal to the sum of the resource usage quota caps of all users. This improves resource utilization in the resource pool and avoids resource waste.
[0010] It is to be understood that the foregoing general description and the following detailed description are exemplary and explanatory only and are not restrictive of the disclosure. BRIEF DESCRIPTION OF THE DRAWINGS
[0011] The accompanying drawings herein are incorporated into and constitute a part of the specification, illustrate embodiments consistent with the present disclosure, and together with the description are used to explain the principles of the present disclosure, and do not constitute an improper limitation of the present disclosure.
[0012] Figure 1 Examples of application scenarios illustrating exemplary embodiments of the present disclosure;
[0013] Figure 2 A flowchart illustrating a resource allocation method according to an exemplary embodiment of the present disclosure is shown;
[0014] Figure 3 A structural block diagram of a resource allocation device according to an exemplary embodiment of the present disclosure is shown;
[0015] Figure 4 A structural block diagram of a computer device according to an exemplary embodiment of the present disclosure is shown. DETAILED DESCRIPTION
[0016] In order to enable ordinary persons in the art to better understand the technical solutions of the present disclosure, the technical solutions in the embodiments of the present disclosure will be clearly and completely described below with reference to the accompanying drawings.
[0017] It should be noted that the terms "first," "second," and the like in the specification and claims of the present disclosure and the above-mentioned drawings are used to distinguish similar objects and are not necessarily used to describe a specific order or precedence. It should be understood that the numbers used in this manner are interchangeable where appropriate so that the embodiments of the present disclosure described herein can be implemented in an order other than those illustrated or described herein. The embodiments described in the following exemplary embodiments do not represent all embodiments consistent with the present disclosure. Instead, they are merely examples of apparatus and methods consistent with certain aspects of the present disclosure as detailed in the appended claims.
[0018] It should be noted that the phrase "at least one of the items" in this disclosure includes three types of parallel situations: "any one of the items", "a combination of any multiple items of the items", and "all of the items". For example, "including at least one of A and B" includes the following three parallel situations: (1) including A; (2) including B; (3) including A and B. For another example, "performing at least one of step 1 and step 2" includes the following three parallel situations: (1) performing step 1; (2) performing step 2; and (3) performing steps 1 and 2.
[0019] In the existing technology, to ensure that tenants' resource usage limits are available and that the infrastructure has sufficient resources for tenants to use within their limits, the sum of all users' limits cannot exceed the size of the platform's resource pool. In other words, the maximum allocatable limit of the resource pool is the actual size of the resource pool. For various reasons, most tenants request a limit that is a certain percentage larger than their actual allocation needs. In theory, the platform infrastructure needs to provide a resource pool that is larger than the sum of all tenants' limits to ensure that all tenants have resources available when needed. However, in reality, users do not allocate 100% of their limit. This means that the platform must also provide resource guarantees for the portion of the limit that users have requested but not actually allocated. Consequently, this presents a problem: as the number of platform users increases, the value of this portion of the limit will increase, and the waste of resource guarantees provided for this portion will also become increasingly serious.
[0020] In view of the above problems existing in the prior art, the present disclosure determines the allocatable quota limit of the resource pool according to the over-resolution ratio and the actual size of the resource pool, so that the allocatable quota limit of the resource pool is greater than the actual size of the resource pool. In other words, in the present disclosure, there is no need to provide the actual physical resources of the sum of the quota limits of all users. This can improve the resource utilization of the resource pool and avoid resource waste. Figures 1 to 4 to describe exemplary embodiments according to the present disclosure.
[0021] Figure 1An example of an application scenario of an exemplary embodiment of the present disclosure is shown. Figure 1 , the row corresponding to each user represents the upper limit of the user's resource usage quota, the shaded area represents the size of the resources allocated to the user, and the entire box diagram represents the upper limit of the resource pool's allocatable quota. For various reasons, most users will apply for a quota upper limit that is a certain percentage larger than their actual allocation requirements. According to an exemplary embodiment of the present disclosure, the allocatable quota limit of the resource pool is determined according to the over-allocation ratio and the actual size of the resource pool, so that the allocatable quota limit of the resource pool is greater than the actual size of the resource pool.
[0022] It should be understood that the above application scenarios are only examples, and exemplary embodiments according to the present disclosure are not limited to the above application scenarios.
[0023] As an example, the resource allocation method according to the exemplary embodiment of the present disclosure can be automatically executed by a management system of a resource pool, for example, by a management system of a platform to which the resource pool belongs. As an example, the management system can be deployed on a computer device, for example, the computer device can be a server.
[0024] Figure 2 A flow chart of a resource allocation method according to an exemplary embodiment of the present disclosure is shown.
[0025] Reference Figure 2 In step S101, the over-allocation ratio of the resource pool is determined based on the resource usage quota upper limit and the allocated resource size of each user in the resource pool.
[0026] As an example, the resource pool can be a pool of available platform resources. For example, the platform type can include, but is not limited to, public cloud and / or private cloud. The resources in the resource pool can be used by users to deploy their own services. That is, the resources in the resource pool are used to support the execution of the user's services.
[0027] Each user refers to an existing user of the resource pool. For example, each user can be an individual, enterprise, or other user entity that has applied for resources from the resource pool from the platform to deploy their own business. For example, a user has applied for resources from the resource pool from the platform to allocate to their own servers and / or applications.
[0028] As an example, the type of resource pool may include but is not limited to at least one of the following: CPU resource pool, memory resource pool, external storage resource pool. It should be understood that other types of resource pools may also be used, and this disclosure does not limit this.
[0029] The upper limit of a user's resource usage quota is the upper limit of the size of the resources that the user can apply for in the resource pool, that is, the maximum size of the resources that the user can use in the resource pool.
[0030] The user's allocated resource size refers to the size of the resources in the resource pool that the user has deployed for his own business, for example, the size that has been allocated for use by his own business.
[0031] As an example, the over-allocation ratio of a resource pool can be determined by the ratio of the total user resource usage quota to the total user allocated resources. The total user resource usage quota is the sum of the resource usage quota limits of each user; the total user allocated resources is the sum of the allocated resource sizes of each user.
[0032] In step S102, based on the over-allocation ratio of the resource pool and the actual size of the resource pool, the upper limit of the allocatable amount of the resource pool is determined.
[0033] The upper limit of the allocatable amount of a resource pool is the upper limit of the size of resources that the resource pool can allocate to users. In this disclosure, the upper limit of the allocatable amount of a resource pool is greater than the actual size of the resource pool. The actual size of the resource pool is the total size of resources that the resource pool can actually provide.
[0034] As an example, the product of the actual size of the resource pool and the over-allocation ratio of the resource pool can be determined as the upper limit of the allocable amount of the resource pool. In the prior art, the actual size of the resource pool is directly used as the upper limit of the allocable amount of the resource pool, while in the present disclosure, the upper limit of the allocable amount of the resource pool is determined as: the product of the actual size of the resource pool and the over-allocation ratio of the resource pool. Since in reality, users will not allocate 100% of their own resource usage quota upper limit, in other words, the size of the user's allocated resources is usually less than the upper limit of their own resource usage quota. This situation makes the over-allocation ratio of the resource pool less than 1. Therefore, the upper limit of the allocable amount of the resource pool determined by the present disclosure is greater than the actual size of the resource pool. By reasonably setting the upper limit of the allocable amount, the present disclosure can not only ensure that the resources required by users are provided, but also avoid waste of resources as much as possible and improve resource utilization.
[0035] It is worth noting that as the total amount of user resource usage and / or the total amount of user allocated resources changes, the over-allocation ratio of the resource pool changes dynamically. Correspondingly, the upper limit of the allocatable quota of the resource pool determined based on the over-allocation ratio of the resource pool also changes dynamically. Therefore, steps S101 and S102 can be actively executed and / or automatically executed periodically through event triggering to timely update the over-allocation ratio and the upper limit of the allocatable quota of the resource pool.
[0036] As an example, step S101 and step S102 may be performed periodically to periodically update the over-allocation ratio and the upper limit of the allocatable quota of the resource pool.
[0037] As an example, steps S101 and S102 may be executed to update the resource pool's over-allocation ratio and allocatable quota limit when a new user is added, a user's resource usage quota limit is changed, or a user is deleted. It should be understood that adding a new user or increasing a user's resource usage quota limit upon user request will result in an increase in the user's total resource usage quota; deleting a user or decreasing a user's resource usage quota limit upon user request will result in a decrease in the user's total resource usage quota. Changes in a user's total resource usage quota will affect the resource pool's over-allocation ratio and allocatable quota limit. Therefore, steps S101 and S102 may be executed to update the resource pool's over-allocation ratio and allocatable quota limit when these events occur. As an example, steps S101 and S102 may also be triggered when other events that cause a change in a user's total resource usage quota occur. Furthermore, as an example, steps S101 and S102 may also be triggered when an event that causes a change in a user's total allocated resources occurs.
[0038] In step S103, resources in the resource pool are provided to the user based on the upper limit of the allocatable quota of the resource pool.
[0039] For example, based on the resource pool's allocatable quota limit, a user's resource usage quota limit for the resource pool can be managed. This allows users to use resources from the resource pool based on management conditions. These resources are used to support the execution of the user's business. For example, whether existing users are allowed to adjust their resource usage quota limits or whether new users are allowed can be managed.
[0040] For example, the remaining allocation amount of a resource pool can be determined based on the upper limit of the resource pool's allocatable amount. Then, based on the remaining allocation amount of the resource pool, resources in the resource pool can be provided to users. The remaining allocation amount of the resource pool is the remaining available allocation amount of the resource pool.
[0041] As an example, the difference between the upper limit of the allocable quota of the resource pool and the total quota of user resource usage can be determined as the remaining quota to be allocated of the resource pool.
[0042] As an example, a user's request to adjust the resource usage quota limit can be processed based on the remaining quota to be allocated in the resource pool. For example, a user's request to adjust the resource usage quota limit may include but is not limited to: a request to increase the resource usage quota of an existing user or a request to add a new resource usage quota to a new user.
[0043] As an example, step S103 may be executed when a request for increasing a resource usage quota from a user or a request for adding a resource usage quota from a new user is received.
[0044] As an example, upon receiving a request from a user to increase resource usage quota, it is possible to determine whether the remaining amount to be allocated in the resource pool is greater than the resource usage quota increase requested by the user; if the remaining amount to be allocated in the resource pool is greater than the resource usage quota increase requested by the user, the resource usage quota upper limit for the user is updated in response to the resource usage quota increase request. Specifically, in a scenario where a user has requested an increase in the resource usage quota upper limit, it is possible to determine whether the remaining amount to be allocated in the resource pool is greater than the resource usage quota increase requested by the user (i.e., the amount of increase in resource usage quota); if so, the resource usage quota upper limit for the user is updated in response to the resource usage quota increase request, i.e., the resource usage quota upper limit for the user is increased by the amount of increase requested by the user.
[0045] For example, upon receiving a request for a new resource usage quota from a new user, a determination may be made as to whether the remaining unallocated quota in the resource pool is greater than the newly requested resource usage quota from the new user. If the remaining unallocated quota in the resource pool is greater than the newly requested resource usage quota from the new user, a resource usage quota cap for the new user may be set in response to the request for the new resource usage quota. The resource usage quota cap for the new user is the newly requested resource usage quota from the new user.
[0046] When a user requests an increase in quota or adds a new user, the difference between the resource pool's allocatable quota limit and the user's total resource usage quota needs to be recalculated to determine the resource pool's latest remaining quota to be allocated. This is used to determine whether the user's quota increase or addition needs are met. If so, the user's resource usage quota limit can be set. After the setting is completed, the platform resource pool's over-allocation ratio and allocatable quota limit can be recalculated and refreshed. If the requirements are not met, the allocation will be rejected. In addition, when a user requests a quota reduction or deletes a user, the platform resource pool's over-allocation ratio and allocatable quota limit can be recalculated and refreshed.
[0047] According to an exemplary embodiment of the present disclosure, since the platform's real physical resources are over-allocated according to the calculated ratio, the platform user quota allocation requirements can be met without providing real physical resources equal to the sum of all user quota limits.
[0048] Furthermore, as an example, the resource allocation method according to an exemplary embodiment of the present disclosure may further include: determining the difference between the actual size of the resource pool and the total amount of resources allocated to users as the actual remaining resource size of the resource pool; and, if the actual remaining resource size of the resource pool is less than a preset threshold, prompting the user to expand the resource pool. According to exemplary embodiments of the present disclosure, timely expansion of the resource pool is facilitated.
[0049] In one embodiment, it is assumed that the platform has the following background conditions: Condition 1: the platform's resource pool has 20,000 CPU cores; Condition 2: the upper limit of each user's resource usage is 1,000 cores; Condition 3: each user is actually allocated 600 cores, that is, the allocated resource size of each user is 600 cores.
[0050] Based on the above conditions, if the platform resources are not over-allocated, according to existing technology: the upper limit of the allocatable quota of the resource pool is: 20,000 cores; the number of tenants that the platform can accommodate is: 20,000 / 1,000 = 20.
[0051] If super-resolution is performed according to the exemplary embodiments of the present disclosure, the pseudo code may be as follows:
[0052] #Cluster initial status
[0053] cluster_cpu=20000
[0054] #When the first user enters, the values of quota_limit, the total resource usage quota of all platform users, and quota_used_total, the total allocated resources of all platform users:
[0055] quota_limit=1000
[0056] quota_used_total=600
[0057] #Excess allocation ratio quota_alloc_per
[0058] quota_alloc_per=quota_limit / quota_used_total
[0059] #The upper limit of the CPU allocation quota of the platform resource pool (virtual upper limit) cluster_resource_alloc
[0060] cluster_resource_alloc=cluster_cpu*quota_alloc_per
[0061] #The remaining CPU quota to be allocated in the platform resource pool is quota_avilable
[0062] quota_avilable=cluster_resource_alloc-quota_limit
[0063] #The platform has begun to provide services to more users:
[0064] while true:
[0065] #Reject allocation when the platform CPU remaining allocation quota is insufficient (customizable judgment logic)
[0066] if quota_avilable<0:
[0067] break
[0068] #When adding a new user, the values of quota_limit, the total resource usage quota of all platform users, and quota_used_total, the total allocated resources of all platform users. Here, it is assumed that the quota limit for the new user is 1000, and 600 will be allocated to the user in the future:
[0069] quota_limit=quota_limit+1000
[0070] quota_used_total=quota_used_total+600
[0071] # Recalculate the super-resolution ratio
[0072] quota_alloc_per=quota_limit / quota_used_total
[0073] #Recalculate the upper limit of CPU allocation:
[0074] cluster_resource_alloc=cluster_cpu*quota_alloc_per
[0075] #Recalculate the remaining CPU allocation quota:
[0076] quota_avilable=cluster_resource_alloc-quota_limit
[0077] Each time a user's credit limit increase request is processed, the quota_avilable value in the algorithm is used to determine whether the request is met. If not, the allocation is rejected. If it is met, the over-allocation ratio and the upper limit of the allocable credit limit are recalculated and refreshed after the increase operation is completed, so that the quota_avilable value can be updated next time when needed.
[0078] According to this algorithm, the platform can accommodate 33 users. After the 33rd user joins, the following results are obtained: the total actual allocated resources (i.e., the total amount of resources allocated to users): 19,800; the upper limit of the resource pool's allocatable quota: 33,333; the total amount of user resource usage: 33,000; the remaining quota in the resource pool to be allocated: 333; and the actual remaining resource size in the resource pool: 200. A data comparison shows that, according to exemplary embodiments of the present disclosure, the platform significantly increases the number of users and allocatable quotas.
[0079] Figure 3 A structural block diagram of a resource allocation device according to an exemplary embodiment of the present disclosure is shown.
[0080] like Figure 3 As shown, the resource allocation device 10 according to the exemplary embodiment of the present disclosure includes: an over-resolution ratio determining unit 101 , a quota determining unit 102 , and a resource providing unit 103 .
[0081] Specifically, the over-allocation ratio determining unit 101 is configured to determine the over-allocation ratio of the resource pool based on the resource usage quota upper limit and the allocated resource size of each user in the resource pool.
[0082] The quota determination unit 102 is configured to determine an upper limit of the allocatable quota of the resource pool based on the over-allocation ratio of the resource pool and the actual size of the resource pool. The upper limit of the allocatable quota of the resource pool is greater than the actual size of the resource pool.
[0083] The resource providing unit 103 is configured to provide the user with resources in the resource pool based on the upper limit of the allocatable quota of the resource pool. The resources in the resource pool are used to support the execution of the user's services.
[0084] As an example, the over-allocation ratio determination unit 101 can be configured to: determine the ratio between the total user resource usage quota and the total user allocated resources as the over-allocation ratio of the resource pool, wherein the total user resource usage quota is the sum of the resource usage quota upper limits of each user; and the total user allocated resources is the sum of the allocated resource sizes of each user.
[0085] As an example, the quota determining unit 102 may be configured to: determine the product of the actual size of the resource pool and the over-allocation ratio of the resource pool as the upper limit of the allocatable quota of the resource pool.
[0086] As an example, the resource providing unit 103 may be configured to: determine the remaining amount to be allocated of the resource pool based on the upper limit of the allocatable amount of the resource pool; and provide resources in the resource pool to the user based on the remaining amount to be allocated of the resource pool.
[0087] As an example, the resource providing unit 103 can be configured to: determine the difference between the upper limit of the allocatable quota of the resource pool and the total user resource usage quota as the remaining quota to be allocated of the resource pool, wherein the total user resource usage quota is the sum of the upper limits of the resource usage quotas of the respective users.
[0088] As an example, the resource provision unit 103 may be configured to process a user's request for adjusting an upper limit on a resource usage quota based on the remaining quota to be allocated in the resource pool.
[0089] As an example, the resource provision unit 103 can be configured to: upon receiving a request from a user to increase the resource usage quota, determine whether the remaining amount to be allocated in the resource pool is greater than the resource usage quota requested to be increased by the user; if the remaining amount to be allocated in the resource pool is greater than the resource usage quota requested to be increased by the user, update the resource usage quota upper limit of the user in response to the request to increase the resource usage quota.
[0090] As an example, the resource provision unit 103 can be configured to: upon receiving a request for an additional resource usage quota from a new user, determine whether the remaining amount to be allocated in the resource pool is greater than the additional resource usage quota requested by the new user; and if the remaining amount to be allocated in the resource pool is greater than the additional resource usage quota requested by the new user, set an upper limit on the resource usage quota for the new user in response to the request for an additional resource usage quota.
[0091] As an example, the over-allocation ratio determination unit 101 can be configured to periodically determine the over-allocation ratio of the resource pool, and the quota determination unit 102 can be configured to periodically determine the upper limit of the allocatable quota of the resource pool, so as to periodically update the over-allocation ratio and the upper limit of the allocatable quota of the resource pool.
[0092] As an example, when a new user is added, or the upper limit of a user's resource usage quota changes, or a user is deleted, the over-allocation ratio determination unit 101 determines the over-allocation ratio of the resource pool, and the quota determination unit 102 determines the upper limit of the allocatable quota of the resource pool, so as to update the over-allocation ratio and the upper limit of the allocatable quota of the resource pool.
[0093] As an example, the resource allocation device 10 according to an exemplary embodiment of the present disclosure may further include: an actual remaining resource determination unit (not shown) and an expansion prompt unit (not shown). The actual remaining resource determination unit is configured to determine the difference between the actual size of the resource pool and the sum of the resources allocated to the users as the actual remaining resource size of the resource pool; the expansion prompt unit is configured to prompt the resource pool to expand if the actual remaining resource size of the resource pool is less than a preset threshold, wherein the sum of the resources allocated to the users is the sum of the resource sizes allocated to the respective users.
[0094] Regarding the resource allocation device 10 in the above embodiment, the specific manner in which each unit performs operations has been described in detail in the embodiment of the relevant method and will not be elaborated here.
[0095] In addition, it should be understood that the various units in the resource allocation device 10 according to the exemplary embodiments of the present disclosure can be implemented as hardware components and / or software components. Those skilled in the art can implement the various units using, for example, a field programmable gate array (FPGA) or an application-specific integrated circuit (ASIC), depending on the processing performed by the defined various units.
[0096] Figure 4 FIG. 1 shows a structural block diagram of a computer device according to an exemplary embodiment of the present disclosure. Figure 4 The computer device 20 includes: at least one memory 201 and at least one processor 202, wherein the at least one memory 201 stores a set of computer-executable instructions. When the computer-executable instruction set is executed by the at least one processor 202, the resource allocation method described in the above exemplary embodiment is executed.
[0097] As an example, the computer device 20 can be a PC, a tablet device, a personal digital assistant, a smart phone, or other device capable of executing the above-mentioned instruction set. Here, the computer device 20 is not necessarily a single computer device, but can also be any collection of devices or circuits that can execute the above-mentioned instructions (or instruction sets) individually or in combination. The computer device 20 can also be part of an integrated control system or system manager, or can be configured as a portable computer device that is interconnected with a local or remote (e.g., via wireless transmission) interface.
[0098] In the computer device 20, the processor 202 may include a central processing unit (CPU), a graphics processing unit (GPU), a programmable logic device, a dedicated processor system, a microcontroller, or a microprocessor. By way of example and not limitation, the processor 202 may also include an analog processor, a digital processor, a microprocessor, a multi-core processor, a processor array, a network processor, etc.
[0099] The processor 202 can execute instructions or codes stored in the memory 201, wherein the memory 201 can also store data. Instructions and data can also be sent and received over a network via a network interface device, wherein the network interface device can use any known transmission protocol.
[0100] The memory 201 may be integrated with the processor 202, for example, by placing RAM or flash memory within an integrated circuit microprocessor or the like. Furthermore, the memory 201 may comprise a separate device, such as an external disk drive, a storage array, or any other storage device usable by a database system. The memory 201 and the processor 202 may be operatively coupled or may communicate with each other, for example, via an I / O port, a network connection, or the like, such that the processor 202 can access files stored in the memory.
[0101] In addition, the computer device 20 may also include a video display (such as a liquid crystal display) and a user interaction interface (such as a keyboard, a mouse, a touch input device, etc.) All components of the computer device 20 may be connected to each other via a bus and / or a network.
[0102] According to an exemplary embodiment of the present disclosure, a computer-readable storage medium storing instructions may also be provided, wherein when the instructions are executed by at least one processor, the at least one processor is prompted to perform the resource allocation method as described in the above exemplary embodiment. Examples of computer-readable storage media include: read-only memory (ROM), random access programmable read-only memory (PROM), electrically erasable programmable read-only memory (EEPROM), random access memory (RAM), dynamic random access memory (DRAM), static random access memory (SRAM), flash memory, non-volatile memory, CD-ROM, CD-R, CD+R, CD-RW, CD+RW, DVD-ROM, DVD-R, DVD+R, DVD-RW, DVD+RW, DVD-RAM, BD-ROM, BD-R, BD-R LTH, BD-RE, Blu-ray or optical disk storage, hard disk drive (HDD), solid state drive (SSD), card storage (such as, multimedia card, secure digital (SD) card or ultra-fast digital (XD) card), magnetic tape, floppy disk, magneto-optical data storage device, optical data storage device, hard disk, solid state disk and any other device, any other device configured to store the computer program and any associated data, data files and data structures in a non-transitory manner and provide the computer program and any associated data, data files and data structures to a processor or computer so that the processor or computer can execute the computer program. The computer program in the above-mentioned computer-readable storage medium can be run in an environment deployed in a computer device such as a client, a host, an agent device, a server, etc. In addition, in one example, the computer program and any associated data, data files and data structures are distributed on a networked computer system so that the computer program and any associated data, data files and data structures are stored, accessed and executed in a distributed manner by one or more processors or computers.
[0103] According to an exemplary embodiment of the present disclosure, a computer software may be provided. Instructions in the computer software may be executed by at least one processor to implement the resource allocation method as described in the above exemplary embodiment.
[0104] Other embodiments of the present disclosure will readily occur to those skilled in the art after considering the specification and practicing the invention disclosed herein. This application is intended to cover any variations, uses, or adaptations of the present disclosure that follow the general principles of the present disclosure and include common knowledge or customary techniques in the art not disclosed herein. The description and examples are to be considered as exemplary only, with the true scope and spirit of the present disclosure being indicated by the following claims.
[0105] It should be understood that the present disclosure is not limited to the exact structures that have been described above and shown in the drawings, and that various modifications and changes can be made without departing from the scope thereof. The scope of the present disclosure is limited only by the appended claims.
Claims
1. A resource allocation method, characterized in that: include: Determining an over-allocation ratio of the resource pool based on the resource usage quota upper limit and the allocated resource size of each user of the resource pool; Determine the product of the over-allocation ratio of the resource pool and the actual size of the resource pool as the upper limit of the allocatable amount of the resource pool; Based on the upper limit of the allocatable quota of the resource pool, resources in the resource pool are provided to the user; wherein the upper limit of the allocatable quota of the resource pool is greater than the actual size of the resource pool, and the resources in the resource pool are used to support the execution of the user's business; the step of determining the over-allocation ratio of the resource pool based on the upper limit of the resource usage quota and the allocated resource size of each user in the resource pool includes: The ratio between the total amount of user resource usage and the total amount of resources allocated to the user is determined as the over-allocation ratio of the resource pool; The total user resource usage quota is the sum of the resource usage quota upper limits of each user; and the total user allocated resources is the sum of the allocated resource sizes of each user.
2. The resource allocation method according to claim 1, characterized in that: The step of providing resources in the resource pool to the user based on the upper limit of the allocatable amount of the resource pool includes: Determining the remaining amount to be allocated of the resource pool based on the upper limit of the allocable amount of the resource pool; Based on the remaining to-be-allocated quota of the resource pool, resources in the resource pool are provided to the user.
3. The resource allocation method according to claim 2, characterized in that: The step of determining the remaining to-be-allocated amount of the resource pool based on the allocatable amount of the resource pool includes: The difference between the upper limit of the allocable quota of the resource pool and the total quota of user resources used is determined as the remaining quota to be allocated of the resource pool; The total user resource usage quota is the sum of the resource usage quota upper limits of each user.
4. The resource allocation method according to claim 2, characterized in that: The step of providing resources in the resource pool to the user based on the remaining quota to be allocated in the resource pool includes: Based on the remaining quota to be allocated in the resource pool, a user's request to adjust the upper limit of the resource usage quota is processed.
5. The resource allocation method according to claim 4, characterized in that: The step of processing a user's request to adjust the upper limit of resource usage quota based on the remaining quota to be allocated in the resource pool includes: Upon receiving a request from a user to increase a resource usage quota, determining whether the remaining quota to be allocated in the resource pool is greater than the increased resource usage quota requested by the user; In a case where the remaining to-be-allocated quota of the resource pool is greater than the resource usage quota increased requested by the user, in response to the resource usage quota increase request, the resource usage quota upper limit of the user is updated.
6. The resource allocation method according to claim 4, characterized in that: The step of processing a user's request to adjust the upper limit of resource usage quota based on the remaining quota to be allocated in the resource pool includes: Upon receiving a request for an additional resource usage quota from a new user, determining whether the remaining quota to be allocated in the resource pool is greater than the additional resource usage quota requested by the new user; In a case where the remaining to-be-allocated quota of the resource pool is greater than the newly added resource usage quota requested by the new user, an upper limit of the resource usage quota of the new user is set in response to the resource usage quota addition request.
7. A resource allocation device, characterized in that: include: an over-allocation ratio determining unit configured to determine a ratio between a sum of upper limits of resource usage quotas of respective users of a resource pool and a sum of allocated resource sizes of the respective users as an over-allocation ratio of the resource pool; a quota determination unit configured to determine the product of the over-allocation ratio of the resource pool and the actual size of the resource pool as the upper limit of the allocatable quota of the resource pool; a resource providing unit, configured to provide resources in the resource pool to a user based on an upper limit of an allocatable amount of the resource pool; The upper limit of the allocatable amount of the resource pool is greater than the actual size of the resource pool, and the resources in the resource pool are used to support the execution of user services.
8. A computer device, characterized in that: include: at least one processor; at least one memory storing computer-executable instructions, When the computer-executable instructions are executed by the at least one processor, the computer-executable instructions prompt the at least one processor to execute the resource allocation method according to any one of claims 1 to 6.
9. A computer-readable storage medium, characterized in that When the instructions in the computer-readable storage medium are executed by at least one processor, the at least one processor is prompted to perform the resource allocation method according to any one of claims 1 to 6.
Citation Information
Patent Citations
Method and system for quotas management of virtual computing resource
CN105094947A
Resource super-division processing method and device, equipment and storage medium
CN114416381A