CN112506650A - Resource allocation method, system, computer device and storage medium - Google Patents

Resource allocation method, system, computer device and storage medium Download PDF

Info

Publication number
CN112506650A
CN112506650A CN202011357538.XA CN202011357538A CN112506650A CN 112506650 A CN112506650 A CN 112506650A CN 202011357538 A CN202011357538 A CN 202011357538A CN 112506650 A CN112506650 A CN 112506650A
Authority
CN
China
Prior art keywords
user
resource
storage
resource allocation
resources
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202011357538.XA
Other languages
Chinese (zh)
Inventor
周鹏
葛思江
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
China Construction Bank Corp
Original Assignee
China Construction Bank Corp
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by China Construction Bank Corp filed Critical China Construction Bank Corp
Priority to CN202011357538.XA priority Critical patent/CN112506650A/en
Publication of CN112506650A publication Critical patent/CN112506650A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/46Multiprogramming arrangements
    • G06F9/50Allocation of resources, e.g. of the central processing unit [CPU]
    • G06F9/5005Allocation of resources, e.g. of the central processing unit [CPU] to service a request
    • G06F9/5027Allocation of resources, e.g. of the central processing unit [CPU] to service a request the resource being a machine, e.g. CPUs, Servers, Terminals

Landscapes

  • Engineering & Computer Science (AREA)
  • Software Systems (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Data Exchanges In Wide-Area Networks (AREA)

Abstract

The present disclosure provides a resource allocation method, system, computer device and storage medium. The resource allocation method comprises the following steps: acquiring a physical node meeting a user request based on resource request information of the user; acquiring a list of physical nodes according to the resource characteristics of the physical nodes; and selecting a list of physical nodes and the physical nodes for allocating resources for the user based on the resource allocation type of the user. The resource allocation method provided by the disclosure is based on the resource allocation type of the user and the sequence list of the physical nodes meeting the resource request of the user, and then the corresponding nodes on the sequence list are selected according to the resource allocation type of the user to allocate resources for the user, so that the resource allocation can be realized based on the resource characteristics of the user request and the physical nodes, the resource use of each physical node is dynamically balanced, and more reasonable resource allocation is realized.

Description

Resource allocation method, system, computer device and storage medium
Technical Field
The present invention relates to the field of computer application technologies, and in particular, to a resource allocation method, a resource allocation system, a computer device, and a storage medium.
Background
With the continuous development of cloud computing, database services also increasingly provide resources for users in a cloud service form, and provide a series of capabilities such as cloud application, flexible deployment, elastic capacity expansion, cloud management and control. Therefore, implementing intelligent allocation of user resources through database resource pool management faces increasing challenges.
At present, the traditional resource pool has little attention to the characteristics of database resources, and most of the traditional resource pool adopts corresponding strategies to distribute the database resources according to the use conditions of physical resources such as a CPU (central processing unit), a memory or a storage and the like, so that reasonable distribution of user resources cannot be realized.
Disclosure of Invention
In order to solve the above problems or some of the problems in the prior art, embodiments of the present invention provide a resource allocation method, system, computer device, and storage medium, which implement more reasonable resource allocation by combining resource requests of users and resource characteristics of each physical node.
According to a first aspect of the present invention, an embodiment of the present invention provides a resource allocation method, including: acquiring resource request information of a user; acquiring a physical node meeting a user request according to the resource request information; traversing the physical nodes, and obtaining a CPU sequence list of the physical nodes according to the sequence of the CPU residual resource amount of the physical nodes from large to small; traversing the physical nodes, and obtaining a storage sequence table of the physical nodes according to the sequence of the storage resource surplus of the physical nodes from large to small; determining the user to be a calculation priority type or a storage priority type according to the resource request information; when the user is of a calculation priority type, allocating resources for the user on a physical node ranked at the first position in the CPU sequence list; and when the user is of a storage priority type, allocating resources for the user on a physical node ranked at the first position in the storage sequence list.
In the above embodiment of the present invention, the resource allocation type of the user and the sequence table of the physical node that satisfies the resource request of the user are determined based on the resource request information of the user, and then the node on the corresponding sequence table is selected according to the resource allocation type of the user to allocate the resource to the user, so that resource allocation can be implemented based on the resource characteristics of the user request and the physical node, and the resource usage of each physical node is dynamically balanced.
In some embodiments of the invention, the resource request information comprises: the amount of CPU resources and the amount of storage resources required by the user.
In some embodiments of the invention, determining that the user is a compute-priority or a storage-priority based on the resource request information comprises: when the ratio of the CPU resource amount required by the user to the storage resource amount is smaller than a preset threshold value, the user is in a storage priority type, otherwise, the user is in a calculation priority type.
In some embodiments of the present invention, the resource allocation method further comprises: allocating identification information to the user based on the identity information of the user; and allocating the user to a resource group corresponding to the identification information, wherein the resource group comprises a plurality of physical nodes for allocating resources to the user.
The above embodiment of the present invention allocates the identification information to the user based on the user identity information, and further allocates the resource to the user in the resource group corresponding to the identification information, so that the user applying for the resource can be directionally allocated to a specific resource group, and flexible and controllable resource allocation is realized.
In some embodiments of the invention, the set of resources comprises: at least one of a standard resource pool, an I/O non-standard resource pool, a network non-standard resource pool, and a dedicated resource pool.
According to a second aspect of the present invention, an embodiment of the present invention provides a resource allocation method, including: acquiring resource request information of a user; acquiring a physical node meeting a user request according to the resource request information; calculating the ratio of the CPU resource surplus and the storage resource surplus of the physical node aiming at the physical node meeting the user request; determining the user to be a calculation priority type or a storage priority type according to the resource request information; when the user is of a calculation priority type, obtaining a first sequence list of the physical nodes according to the descending sequence of the ratio of the CPU resource residual quantity to the storage resource residual quantity of the physical nodes, and allocating resources to the user on the physical node ranked first in the first sequence list; and when the user is of a storage priority type, acquiring a second sequence list of the physical nodes according to the sequence of the ratio of the CPU resource residual quantity to the storage resource residual quantity of the physical nodes from small to large, and allocating resources to the user on the physical node ranked at the first position in the second sequence list.
In the above embodiment of the present invention, the resource allocation type of the user and the physical node that satisfies the resource request of the user are determined based on the resource request information of the user, and then the corresponding physical node sequence table is obtained according to the resource allocation type of the user to determine the physical node to which the resource is allocated, so that the resource can be allocated based on the resource characteristics of the user request and the physical node, and the dynamic balance of the resource usage of the physical node is realized.
In some embodiments of the invention, the resource request information comprises: the amount of CPU resources and the amount of storage resources required by the user.
In some embodiments of the invention, determining that the user is a compute-priority or a storage-priority based on the resource request information comprises: when the ratio of the CPU resource amount required by the user to the storage resource amount is smaller than a preset threshold value, the user is in a storage priority type, otherwise, the user is in a calculation priority type.
In some embodiments of the present invention, the resource allocation method further comprises: allocating identification information to the user based on the identity information of the user; and allocating the user to a resource group corresponding to the identification information, wherein the resource group comprises a plurality of physical nodes for allocating resources to the user.
The embodiment of the invention allocates the identification information to the user based on the user identity information, further allocates the resources to the user in the resource group with the identification information being treble, can directionally allocate the user applying for the resources to the specific resource group, and realizes flexible and controllable resource allocation.
In some embodiments of the invention, the set of resources comprises: at least one of a standard resource pool, an I/O non-standard resource pool, a network non-standard resource pool, and a dedicated resource pool.
According to a third aspect of the present invention, an embodiment of the present invention provides a resource allocation system, including: the request acquisition module is used for acquiring resource request information of a user; a physical node obtaining module, configured to obtain a physical node that meets a user request according to the resource request information; the CPU sequence table acquisition module is used for traversing the physical nodes and acquiring the CPU sequence table of the physical nodes according to the descending order of the residual CPU resource amount of the physical nodes; the storage sequence table acquisition module is used for traversing the physical nodes and acquiring the storage sequence table of the physical nodes according to the sequence of the storage resource surplus of the physical nodes from large to small; a resource allocation type determining module, configured to determine, according to the resource request information, that the user is a compute priority type or a storage priority type; a first resource allocation module, configured to allocate a resource to the user on a first-order physical node in the CPU sequence list when the resource allocation type determination module determines that the user is of the compute priority type; and the second resource allocation module is used for allocating resources for the user on the physical node ranked at the first position in the storage sequence list when the resource allocation type determination module determines that the user is the storage priority type.
In the above embodiment of the present invention, the resource allocation type of the user and the sequence table of the physical node that satisfies the resource request of the user are determined based on the resource request information of the user, and then the node on the corresponding sequence table is selected according to the resource allocation type of the user to allocate the resource to the user, so that resource allocation can be implemented based on the resource characteristics of the user request and the physical node, and the resource usage of each physical node is dynamically balanced.
In some embodiments of the invention, the resource request information comprises: the amount of CPU resources and the amount of storage resources required by the user.
In some embodiments of the invention, determining that the user is a compute-priority or a storage-priority based on the resource request information comprises: when the ratio of the CPU resource amount required by the user to the storage resource amount is smaller than a preset threshold value, the user is in a storage priority type, otherwise, the user is in a calculation priority type.
In some embodiments of the invention, the resource allocation system further comprises an identification processing module for performing the following operations: allocating identification information to the user based on the identity information of the user; and allocating the user to a resource group corresponding to the identification information, wherein the resource group comprises a plurality of physical nodes for allocating resources to the user.
The embodiment of the invention allocates the identification information to the user based on the user identity information, further allocates the resources to the user in the resource group with the identification information being treble, can directionally allocate the user applying for the resources to the specific resource group, and realizes flexible and controllable resource allocation.
In some embodiments of the invention, the set of resources comprises: at least one of a standard resource pool, an I/O non-standard resource pool, a network non-standard resource pool, and a dedicated resource pool.
According to a fourth aspect of the present invention, an embodiment of the present invention provides a resource allocation system, including: the request acquisition module is used for acquiring resource request information of a user; a physical node obtaining module, configured to obtain a physical node that meets a user request according to the resource request information; the residual resource calculation module is used for calculating the ratio of the residual quantity of the CPU resource of the physical node to the residual quantity of the storage resource aiming at the physical node meeting the user request; a resource allocation type determining module, configured to determine, according to the resource request information, that the user is a compute priority type or a storage priority type; a third resource allocation module, configured to, when the user is of a calculation priority type, obtain a first sequence table of the physical nodes according to a descending order of a ratio between a remaining amount of CPU resources and a remaining amount of storage resources of the physical nodes, and allocate resources to the user on a first-order physical node in the first sequence table; and the fourth resource allocation module is used for obtaining a second sequence list of the physical nodes according to the sequence of the ratio of the CPU resource residual quantity to the storage resource residual quantity of the physical nodes from small to large when the user is in the storage priority type, and allocating resources to the user on the physical node ranked at the first position in the second sequence list.
In the above embodiment of the present invention, the resource allocation type of the user and the physical node that satisfies the resource request of the user are determined based on the resource request information of the user, and then the corresponding physical node sequence table is obtained according to the resource allocation type of the user to determine the physical node to which the resource is allocated, so that the resource can be allocated based on the resource characteristics of the user request and the physical node, and the dynamic balance of the resource usage of the physical node is realized.
In some embodiments of the invention, the resource request information comprises: the amount of CPU resources and the amount of storage resources required by the user.
In some embodiments of the invention, determining that the user is a compute-priority or a storage-priority based on the resource request information comprises: when the ratio of the CPU resource amount required by the user to the storage resource amount is smaller than a preset threshold value, the user is in a storage priority type, otherwise, the user is in a calculation priority type.
In some embodiments of the invention, the resource allocation system further comprises an identification processing module for performing the following operations: allocating identification information to the user based on the identity information of the user; and allocating the user to a resource group corresponding to the identification information, wherein the resource group comprises a plurality of physical nodes for allocating resources to the user.
The above embodiment of the present invention allocates the identification information to the user based on the user identity information, and further allocates the resource to the user in the resource group corresponding to the identification information, so that the user applying for the resource can be directionally allocated to a specific resource group, and flexible and controllable resource allocation is realized.
In some embodiments of the invention, the set of resources comprises: at least one of a standard resource pool, an I/O non-standard resource pool, a network non-standard resource pool, and a dedicated resource pool.
According to a fifth aspect of the present invention, the present invention provides a computer storage medium having computer readable instructions stored thereon, which when executed by a processor, cause a computer to perform the following operations: the operations include the steps included in the resource allocation method according to any one of the above embodiments.
According to a sixth aspect of the present invention, the present invention provides a computer device comprising a memory and a processor, wherein the memory is used for storing one or more computer instructions, and the one or more computer instructions, when executed by the processor, can implement the resource allocation method according to any one of the above embodiments.
It can be seen from the foregoing that, according to the resource allocation method, system, storage medium, and computer device provided in the embodiments of the present invention, based on the resource allocation type of the user and the sequence table of the physical nodes that satisfy the resource request of the user, the physical node that allocates resources to the user is determined, and resource allocation can be implemented in combination with the user demand and the resource characteristics of each physical node, so that resource usage of each physical node is dynamically balanced, and more reasonable resource allocation is implemented.
Drawings
FIG. 1 is a flow diagram of a resource allocation method according to an embodiment of the invention;
FIG. 2 is a flow chart illustrating a resource allocation method according to another embodiment of the present invention;
FIG. 3 is a system architecture diagram of a resource allocation system according to one embodiment of the invention;
FIG. 4 is a system architecture diagram of a resource allocation system according to another embodiment of the present invention;
fig. 5 is an architecture diagram of a resource allocation system including multiple resource allocation schemes according to an embodiment of the present invention.
Detailed Description
Various aspects of the invention are described in detail below with reference to the figures and the detailed description. Well-known modules, units and their interconnections, links, communications or operations with each other are not shown or described in detail. Furthermore, the described features, architectures, or functions can be combined in any manner in one or more implementations. It will be understood by those skilled in the art that the various embodiments described below are illustrative only and are not intended to limit the scope of the present invention. It will also be readily understood that the modules or units or processes of the embodiments described herein and illustrated in the figures can be combined and designed in a wide variety of different configurations.
The terms used herein are briefly described below.
A CPU: the system comprises a central processing unit, an operation and control core of a computer system, and a final execution unit for information processing and program operation.
Fig. 1 is a flowchart illustrating a resource allocation method according to an embodiment of the present invention.
As shown in fig. 1, in one embodiment of the present invention, the method may include: steps S11, S12, S13, S14, S15, S16, and step S17, which will be described in detail below.
In step S11, the resource request information of the user is acquired. In an alternative embodiment, the resource request information of the user includes, but is not limited to: the amount of CPU resources and the amount of storage resources required by the user. For example, a user may need a database with a resource amount of 4c (cpu)16G (memory) 1T (storage space).
In step S12, a physical node satisfying the user request is obtained according to the resource request information. In an optional implementation manner, the acquired remaining amount of the CPU resource and the remaining amount of the storage resource of the physical node are not less than the amount of the CPU resource and the amount of the storage resource required by the user.
In step S13, the physical node is traversed, and the CPU sequence table of the physical node is obtained according to the decreasing order of the CPU remaining resource amount of the physical node.
In step S14, the physical nodes are traversed, and the storage sequence table of the physical nodes is obtained according to the descending order of the storage resource remaining amount of the physical nodes.
In step S15, the user is determined to be calculation-priority or storage-priority according to the resource request information, and when the user is calculation-priority, step S16 is performed, and when the user is storage-priority, step S17 is performed. In an alternative embodiment, the resource allocation type of the user is determined based on a magnitude relation between a ratio between the amount of CPU resources and the amount of storage resources required by the user and a predetermined threshold: the method comprises the steps of judging that a user is in a storage priority type when the ratio of the amount of CPU resources required by the user to the amount of storage resources is smaller than a preset threshold, and judging that the user is in a calculation priority type when the ratio is not larger than the preset threshold. Alternatively, the predetermined threshold for determining the resource allocation type of the user may be set manually, for example, the predetermined threshold is 8.
In step S16, the user is allocated resources on the physical node ranked first in the CPU sequence list.
In step S17, the user is allocated resources on the first physical node in the stored sequence list.
By adopting the method of the embodiment of the invention, the resource allocation type of the user and the sequence table of the physical nodes meeting the resource request of the user are determined based on the resource request information of the user, and then the nodes on the corresponding sequence table are selected according to the resource allocation type of the user to allocate resources for the user, so that the resource allocation can be realized based on the resource characteristics of the user request and the physical nodes, the resource use of each physical node is dynamically balanced, and more reasonable resource allocation is realized.
In an optional embodiment, for a user with a specific requirement, allocating resources, firstly allocating identification information to the user based on the identity information of the user; secondly, the user is distributed to a resource group corresponding to the identification information, and the resource group comprises a plurality of physical nodes for distributing resources for the user. Optionally, the resource groups include, but are not limited to: at least one of a standard resource pool, an I/O non-standard resource pool, a network non-standard resource pool, and a dedicated resource pool.
Based on the user identity information, allocating identification information to the user, and further allocating resources to the user in the resource group corresponding to the identification information, the user applying for the resources can be allocated to a specific resource group in a directional manner, and then specific physical nodes for resource allocation are determined according to the steps S11-S17, so that flexible and controllable resource allocation is realized.
Fig. 2 is a flowchart illustrating a resource allocation method according to another embodiment of the present invention.
As shown in fig. 2, in one embodiment of the present invention, the method may include: step S21, step S22, step S23, step S24, step S25, and step S26, which are specifically described below.
In step S21, the resource request information of the user is acquired. In an alternative embodiment, the resource request information of the user includes, but is not limited to: the amount of CPU resources and the amount of storage resources required by the user.
In step S22, a physical node satisfying the user request is obtained according to the resource request information. In an optional implementation manner, the acquired remaining amount of the CPU resource and the remaining amount of the storage resource of the physical node are not less than the amount of the CPU resource and the amount of the storage resource required by the user.
In step S23, for the physical node that satisfies the user request, a ratio between the remaining amount of CPU resources and the remaining amount of storage resources of the physical node is calculated.
In step S24, the user is determined to be calculation-priority or storage-priority according to the resource request information, and when the user is calculation-priority, step S25 is performed, and when the user is storage-priority, step S26 is performed. In an alternative embodiment, the resource allocation type of the user is determined based on a magnitude relation between a ratio between the amount of CPU resources and the amount of storage resources required by the user and a predetermined threshold: the method comprises the steps of judging that a user is in a storage priority type when the ratio of the amount of CPU resources required by the user to the amount of storage resources is smaller than a preset threshold, and judging that the user is in a calculation priority type when the ratio is not larger than the preset threshold. Alternatively, the predetermined threshold for determining the resource allocation type of the user may be set manually, for example, the predetermined threshold is 8.
In step S25, a first sequence table of the physical nodes is obtained according to the descending order of the ratio between the remaining amount of CPU resources and the remaining amount of storage resources of the physical nodes, and resources are allocated to the user on the physical node ranked first in the first sequence table.
In step S26, a second sequence table of the physical nodes is obtained according to the ascending ratio between the remaining amount of the CPU resource and the remaining amount of the storage resource of the physical nodes, and the resource is allocated to the user on the physical node ranked first in the second sequence table.
By adopting the method of the embodiment of the invention, the resource allocation type of the user and the physical node meeting the resource request of the user are determined based on the resource request information of the user, and then the corresponding physical node sequence list is obtained according to the resource allocation type of the user so as to determine the physical node for allocating the resource, so that the resource can be allocated based on the resource characteristics of the user request and the physical node, and the dynamic balance of the resource use of the physical node is realized.
In an optional embodiment, for a user with a specific requirement, allocating resources, firstly allocating identification information to the user based on the identity information of the user; secondly, the user is distributed to a resource group corresponding to the identification information, and the resource group comprises a plurality of physical nodes for distributing resources for the user. Optionally, the resource groups include, but are not limited to: at least one of a standard resource pool, an I/O non-standard resource pool, a network non-standard resource pool, and a dedicated resource pool.
Based on the user identity information, allocating identification information to the user, and further allocating resources to the user in the resource group corresponding to the identification information, the user applying for the resources can be allocated to a specific resource group in a directional manner, and then specific physical nodes for resource allocation are determined according to the steps S21-S26, so that flexible and controllable resource allocation is realized.
Optionally, in the present invention, for resource allocation of a user with a specific requirement, the user group configuration manager associates a user ID (Identity document) with a group, so as to allocate a resource for the user in the specific group. The method can be applied to, but is not limited to, the following specific scenarios:
(1) when the user database has high IO (Input/Output) requirement, a user is given a label of an IO non-standard resource group through the user grouping configuration manager, so that the user can be allocated to a resource pool with high IO performance. Specifically, the user initiates a resource allocation request, locks the IO nonstandard resource group according to the identification information, and then locks the specific physical node to which the resource is allocated according to the foregoing steps S11 to S17 or steps S21 to S26.
(2) When a user needs to be allocated to a determined physical node, a label corresponding to the determined physical node is given to the user through a user grouping configuration manager, so that flexible resource allocation is realized. In the scene, different versions of the user database, different disaster tolerance type classifications and the like can be flexibly grouped, and meanwhile, when the resource pool is unbalanced and needs to be fine-tuned, the problem can be solved through directional grouping in the scene.
(3) When a user has a plurality of databases, in order to centralize operation and maintenance and isolate other users, one or more physical nodes with free resources can be appointed as a specific resource group by the user grouping configuration manager for the user to use. In this scenario, if a machine in the resource group fails in the future, processing the machine can avoid communication with other tenants (users), so that operation and maintenance management is very convenient.
(4) The user can associate a plurality of resource groups, when the physical node meeting the user requirement is obtained, the union of all the resource groups is selected, and dynamic adjustment is supported in a grouping mode, so that the selectivity of the user is increased.
Fig. 3 is a system architecture diagram of a resource allocation system according to one embodiment of the invention.
As shown in fig. 3, the resource allocation system includes:
an identification processing module 110 configured to perform the following operations: allocating identification information to the user based on the identity information of the user; and allocating the user to a resource group corresponding to the identification information, wherein the resource group comprises a plurality of physical nodes for allocating resources to the user. In alternative embodiments, the resource groups may include, but are not limited to: at least one of a standard resource pool, an I/O non-standard resource pool, a network non-standard resource pool, and a dedicated resource pool.
The request obtaining module 120 is configured to obtain resource request information of a user. In an alternative embodiment, the resource request information of the user includes, but is not limited to: the amount of CPU resources and the amount of storage resources required by the user.
A physical node obtaining module 130, configured to obtain a physical node that meets the user request according to the resource request information. In an optional implementation manner, the acquired remaining amount of the CPU resource and the remaining amount of the storage resource of the physical node are not less than the amount of the CPU resource and the amount of the storage resource required by the user.
And a CPU sequence table obtaining module 310, configured to traverse the physical nodes, and obtain the CPU sequence table of the physical nodes according to the descending order of the CPU residual resource amount of the physical nodes.
And a storage sequence table obtaining module 320, configured to traverse the physical nodes, and obtain a storage sequence table of the physical nodes according to a descending order of the storage resource remaining amounts of the physical nodes.
A resource allocation type determining module 140, configured to determine that the user is a computing priority type or a storage priority type according to the resource request information. In an alternative embodiment, the resource allocation type of the user is determined based on a magnitude relation between a ratio between the amount of CPU resources and the amount of storage resources required by the user and a predetermined threshold: the method comprises the steps of judging that a user is in a storage priority type when the ratio of the amount of CPU resources required by the user to the amount of storage resources is smaller than a preset threshold, and judging that the user is in a calculation priority type when the ratio is not larger than the preset threshold. Alternatively, the predetermined threshold for determining the resource allocation type of the user may be set manually, for example, the predetermined threshold is 8.
A first resource allocation module 330, configured to allocate a resource for the user on a physical node ranked first in the CPU sequence table when the resource allocation type determination module 140 determines that the user is of the compute priority type.
A second resource allocation module 340, configured to allocate resources for the user on the physical node ranked first in the storage sequence table when the resource allocation type determination module 140 determines that the user is of the storage priority type.
By adopting the resource allocation system of the embodiment of the invention, the corresponding resource group is selected based on the identification information determined by the user identity, and the physical node meeting the user resource request is selected from the resource group, so as to obtain the sequence list of the physical nodes, and then the corresponding node on the sequence list is selected according to the resource allocation type of the user to allocate the resource to the user, so that the resource allocation can be realized based on the identity information of the user, the resource request information and the resource characteristics of the physical nodes, the resource use of each physical node is dynamically balanced while the requirements of the user in all aspects are met, and more reasonable and flexible resource allocation is realized.
Fig. 4 is a system architecture diagram of a resource allocation system according to another embodiment of the present invention.
As shown in fig. 4, the resource allocation system includes:
an identification processing module 110 configured to perform the following operations: allocating identification information to the user based on the identity information of the user; and allocating the user to a resource group corresponding to the identification information, wherein the resource group comprises a plurality of physical nodes for allocating resources to the user. In alternative embodiments, the resource groups may include, but are not limited to: at least one of a standard resource pool, an I/O non-standard resource pool, a network non-standard resource pool, and a dedicated resource pool.
The request obtaining module 120 is configured to obtain resource request information of a user. In an alternative embodiment, the resource request information of the user includes, but is not limited to: the amount of CPU resources and the amount of storage resources required by the user.
A physical node obtaining module 130, configured to obtain a physical node that meets the user request according to the resource request information. In an optional implementation manner, the acquired remaining amount of the CPU resource and the remaining amount of the storage resource of the physical node are not less than the amount of the CPU resource and the amount of the storage resource required by the user.
And a remaining resource calculating module 410, configured to calculate, for the physical node that meets the user request, a ratio between the remaining amount of the CPU resource and the remaining amount of the storage resource of the physical node.
A resource allocation type determining module 140, configured to determine that the user is a computing priority type or a storage priority type according to the resource request information. In an alternative embodiment, the resource allocation type of the user is determined based on a magnitude relation between a ratio between the amount of CPU resources and the amount of storage resources required by the user and a predetermined threshold: the method comprises the steps of judging that a user is in a storage priority type when the ratio of the amount of CPU resources required by the user to the amount of storage resources is smaller than a preset threshold, and judging that the user is in a calculation priority type when the ratio is not larger than the preset threshold. Alternatively, the predetermined threshold for determining the resource allocation type of the user may be set manually, for example, the predetermined threshold is 8.
A third resource allocation module 420, configured to, when the user is of a calculation priority type, obtain a first sequence table of the physical nodes according to a descending order of a ratio between remaining amounts of CPU resources and remaining amounts of storage resources of the physical nodes, and allocate resources to the user on a first-order physical node in the first sequence table;
a fourth resource allocation module 430, configured to, when the user is of a storage priority type, obtain a second sequence table of the physical nodes according to a descending order of a ratio between the remaining amount of the CPU resource and the remaining amount of the storage resource of the physical nodes, and allocate resources to the user on the physical node ranked first in the second sequence table.
By adopting the resource allocation system of the embodiment of the invention, the corresponding resource group is selected based on the identification information determined by the user identity, the physical node meeting the user resource request is selected from the resource group, and the corresponding physical node sequence list is obtained according to the resource allocation type of the user so as to determine the physical node for allocating the resource.
Fig. 5 is an architecture diagram of a resource allocation system including multiple resource allocation schemes according to an embodiment of the present invention.
As shown in fig. 5, the resource allocation system includes the same modules as those in the resource allocation systems shown in fig. 3 and 4, and therefore, the description thereof is omitted.
By adopting the system of the embodiment of the invention, firstly, the resource allocation type of the user and the physical node meeting the resource request of the user are determined based on the resource request information of the user, and secondly, the corresponding resource allocation module can be selected according to manual setting to realize dynamic balance and flexible allocation of the resource use of the physical node.
Through the above description of the embodiments, those skilled in the art will clearly understand that the present invention can be implemented by combining software and a hardware platform. With this understanding in mind, all or part of the technical solutions of the present invention that contribute to the background can be embodied in the form of a software product, which can be stored in a storage medium, such as a ROM/RAM, a magnetic disk, an optical disk, etc., and includes instructions for causing a computer device (which can be a personal computer, a server, or a network device, etc.) to execute the methods according to the embodiments or some parts of the embodiments.
Correspondingly, the embodiment of the invention also provides a computer readable storage medium, on which computer readable instructions or a program are stored, and when the computer readable instructions or the program are executed by a processor, the computer is enabled to execute the following operations: the operation includes the steps included in the resource allocation method according to any of the above embodiments, and details are not repeated here. Wherein the storage medium may include: such as optical disks, hard disks, floppy disks, flash memory, magnetic tape, etc.
In addition, the present invention also provides a computer device including a memory and a processor, where the memory is used for storing one or more computer instructions or programs, and when the one or more computer instructions or programs are executed by the processor, the resource allocation method according to any one of the above embodiments can be implemented. The computer device may be, for example, a server, a desktop computer, a notebook computer, or the like.
Finally, it should be noted that: the above embodiments are only for illustrating the technical solutions of the present invention, and not for limiting the same; although the present invention has been described in detail with reference to the foregoing embodiments, it will be understood by those skilled in the art that: the technical solutions described in the foregoing embodiments may be modified or some technical features may be equivalently replaced; and such modifications or substitutions do not depart from the spirit and scope of the corresponding technical solutions of the embodiments of the present invention. Therefore, the protection scope of the present invention should be subject to the claims.

Claims (22)

1. A resource allocation method, characterized in that the resource allocation method comprises:
acquiring resource request information of a user;
acquiring a physical node meeting a user request according to the resource request information;
traversing the physical nodes, and obtaining a CPU sequence list of the physical nodes according to the sequence of the CPU residual resource amount of the physical nodes from large to small;
traversing the physical nodes, and obtaining a storage sequence table of the physical nodes according to the sequence of the storage resource surplus of the physical nodes from large to small;
determining the user to be a calculation priority type or a storage priority type according to the resource request information;
when the user is of a calculation priority type, allocating resources for the user on a physical node ranked at the first position in the CPU sequence list;
and when the user is of a storage priority type, allocating resources for the user on a physical node ranked at the first position in the storage sequence list.
2. The resource allocation method of claim 1, wherein the resource request information comprises: the amount of CPU resources and the amount of storage resources required by the user.
3. The method of claim 2, wherein determining the user as either compute-priority or storage-priority based on the resource request information comprises:
when the ratio of the CPU resource amount required by the user to the storage resource amount is smaller than a preset threshold value, the user is in a storage priority type, otherwise, the user is in a calculation priority type.
4. The resource allocation method of claim 3, wherein the resource allocation method further comprises:
allocating identification information to the user based on the identity information of the user;
and allocating the user to a resource group corresponding to the identification information, wherein the resource group comprises a plurality of physical nodes for allocating resources to the user.
5. The method of resource allocation of claim 4, wherein the set of resources comprises: at least one of a standard resource pool, an I/O non-standard resource pool, a network non-standard resource pool, and a dedicated resource pool.
6. A resource allocation method, characterized in that the resource allocation method comprises:
acquiring resource request information of a user;
acquiring a physical node meeting a user request according to the resource request information;
calculating the ratio of the CPU resource surplus and the storage resource surplus of the physical node aiming at the physical node meeting the user request;
determining the user to be a calculation priority type or a storage priority type according to the resource request information;
when the user is of a calculation priority type, obtaining a first sequence list of the physical nodes according to the descending sequence of the ratio of the CPU resource residual quantity to the storage resource residual quantity of the physical nodes, and allocating resources to the user on the physical node ranked first in the first sequence list;
and when the user is of a storage priority type, acquiring a second sequence list of the physical nodes according to the sequence of the ratio of the CPU resource residual quantity to the storage resource residual quantity of the physical nodes from small to large, and allocating resources to the user on the physical node ranked at the first position in the second sequence list.
7. The resource allocation method of claim 6, wherein the resource request information comprises: the amount of CPU resources and the amount of storage resources required by the user.
8. The method of claim 7, wherein determining the user as either compute-priority or storage-priority based on the resource request information comprises:
when the ratio of the CPU resource amount required by the user to the storage resource amount is smaller than a preset threshold value, the user is in a storage priority type, otherwise, the user is in a calculation priority type.
9. The resource allocation method of claim 8, wherein the resource allocation method further comprises:
allocating identification information to the user based on the identity information of the user;
and allocating the user to a resource group corresponding to the identification information, wherein the resource group comprises a plurality of physical nodes for allocating resources to the user.
10. The method of resource allocation of claim 9, wherein the set of resources comprises: at least one of a standard resource pool, an I/O non-standard resource pool, a network non-standard resource pool, and a dedicated resource pool.
11. A resource allocation system, characterized in that the resource allocation system comprises:
the request acquisition module is used for acquiring resource request information of a user;
a physical node obtaining module, configured to obtain a physical node that meets a user request according to the resource request information;
the CPU sequence table acquisition module is used for traversing the physical nodes and acquiring the CPU sequence table of the physical nodes according to the descending order of the residual CPU resource amount of the physical nodes;
the storage sequence table acquisition module is used for traversing the physical nodes and acquiring the storage sequence table of the physical nodes according to the sequence of the storage resource surplus of the physical nodes from large to small;
a resource allocation type determining module, configured to determine, according to the resource request information, that the user is a compute priority type or a storage priority type;
a first resource allocation module, configured to allocate a resource to the user on a first-order physical node in the CPU sequence list when the resource allocation type determination module determines that the user is of the compute priority type;
and the second resource allocation module is used for allocating resources for the user on the physical node ranked at the first position in the storage sequence list when the resource allocation type determination module determines that the user is the storage priority type.
12. The resource allocation system of claim 11, wherein said resource request information comprises: the amount of CPU resources and the amount of storage resources required by the user.
13. The resource allocation system of claim 12, wherein determining the user as either compute-prioritized or storage-prioritized based on the resource request information comprises:
when the ratio of the CPU resource amount required by the user to the storage resource amount is smaller than a preset threshold value, the user is in a storage priority type, otherwise, the user is in a calculation priority type.
14. The resource allocation system of claim 13, wherein said resource allocation system further comprises an identification processing module for:
allocating identification information to the user based on the identity information of the user;
and allocating the user to a resource group corresponding to the identification information, wherein the resource group comprises a plurality of physical nodes for allocating resources to the user.
15. The resource allocation system of claim 14, wherein the set of resources comprises: at least one of a standard resource pool, an I/O non-standard resource pool, a network non-standard resource pool, and a dedicated resource pool.
16. A resource allocation system, characterized in that the resource allocation system further comprises:
the request acquisition module is used for acquiring resource request information of a user;
a physical node obtaining module, configured to obtain a physical node that meets a user request according to the resource request information;
the residual resource calculation module is used for calculating the ratio of the residual quantity of the CPU resource of the physical node to the residual quantity of the storage resource aiming at the physical node meeting the user request;
a resource allocation type determining module, configured to determine, according to the resource request information, that the user is a compute priority type or a storage priority type;
a third resource allocation module, configured to, when the resource allocation type determination module determines that the user is of the calculation priority type, obtain a first sequence table of the physical nodes according to a descending order of a ratio between a remaining amount of CPU resources and a remaining amount of storage resources of the physical nodes, and allocate resources to the user on a physical node ranked first in the first sequence table;
and the fourth resource allocation module is used for obtaining a second sequence list of the physical nodes according to the sequence of the ratio of the CPU resource residual amount to the storage resource residual amount of the physical nodes from small to large when the resource allocation type determination module determines that the user is the storage priority type, and allocating resources to the user on the physical node ranked at the first position in the second sequence list.
17. The resource allocation system of claim 16 wherein said resource request information comprises: the amount of CPU resources and the amount of storage resources required by the user.
18. The resource allocation system of claim 17, wherein determining the user as either compute-prioritized or storage-prioritized based on the resource request information comprises:
when the ratio of the CPU resource amount required by the user to the storage resource amount is smaller than a preset threshold value, the user is in a storage priority type, otherwise, the user is in a calculation priority type.
19. The resource allocation system of claim 18, wherein said resource allocation system further comprises an identification processing module for:
allocating identification information to the user based on the identity information of the user;
and allocating the user to a resource group corresponding to the identification information, wherein the resource group comprises a plurality of physical nodes for allocating resources to the user.
20. The resource allocation system of claim 19, wherein the set of resources comprises: at least one of a standard resource pool, an I/O non-standard resource pool, a network non-standard resource pool, and a dedicated resource pool.
21. A computer storage medium storing computer software instructions for execution by a processor to implement the resource allocation method of any one of claims 1-5 or the resource allocation method of any one of claims 6-10.
22. A computer device comprising a memory and a processor;
wherein the memory is configured to store one or more computer instructions that are executed by the processor to implement the resource allocation method of any one of claims 1-5 or the resource allocation method of any one of claims 6-10.
CN202011357538.XA 2020-11-27 2020-11-27 Resource allocation method, system, computer device and storage medium Pending CN112506650A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202011357538.XA CN112506650A (en) 2020-11-27 2020-11-27 Resource allocation method, system, computer device and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202011357538.XA CN112506650A (en) 2020-11-27 2020-11-27 Resource allocation method, system, computer device and storage medium

Publications (1)

Publication Number Publication Date
CN112506650A true CN112506650A (en) 2021-03-16

Family

ID=74966829

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202011357538.XA Pending CN112506650A (en) 2020-11-27 2020-11-27 Resource allocation method, system, computer device and storage medium

Country Status (1)

Country Link
CN (1) CN112506650A (en)

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113419671A (en) * 2021-05-20 2021-09-21 佛山市禅城区政务服务数据管理局 Personal data space access control method and system
CN113709241A (en) * 2021-08-26 2021-11-26 上海德拓信息技术股份有限公司 Scheduling distribution combination method and system of physical resources in cloud scene
CN114168292A (en) * 2021-12-09 2022-03-11 中国建设银行股份有限公司 Resource scheduling method, device, equipment and medium
CN114785794A (en) * 2022-03-29 2022-07-22 北京字节跳动网络技术有限公司 Resource allocation method, device, equipment, medium, program product and system

Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2015180648A1 (en) * 2014-05-30 2015-12-03 华为技术有限公司 Resource allocation method and device
CN105808341A (en) * 2014-12-29 2016-07-27 中国移动通信集团公司 Method, apparatus and system for scheduling resources
CN110149360A (en) * 2019-03-29 2019-08-20 新智云数据服务有限公司 Dispatching method, scheduling system, storage medium and computer equipment
CN110688214A (en) * 2018-07-06 2020-01-14 武汉烽火众智数字技术有限责任公司 Management method and system of heterogeneous resource pool
CN110858161A (en) * 2018-08-24 2020-03-03 阿里巴巴集团控股有限公司 Resource allocation method, device, system, equipment and medium
CN111045795A (en) * 2018-10-11 2020-04-21 浙江宇视科技有限公司 Resource scheduling method and device
CN111338745A (en) * 2019-04-25 2020-06-26 中国移动通信集团湖南有限公司 Deployment method and device of virtual machine and intelligent equipment

Patent Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2015180648A1 (en) * 2014-05-30 2015-12-03 华为技术有限公司 Resource allocation method and device
CN105808341A (en) * 2014-12-29 2016-07-27 中国移动通信集团公司 Method, apparatus and system for scheduling resources
CN110688214A (en) * 2018-07-06 2020-01-14 武汉烽火众智数字技术有限责任公司 Management method and system of heterogeneous resource pool
CN110858161A (en) * 2018-08-24 2020-03-03 阿里巴巴集团控股有限公司 Resource allocation method, device, system, equipment and medium
CN111045795A (en) * 2018-10-11 2020-04-21 浙江宇视科技有限公司 Resource scheduling method and device
CN110149360A (en) * 2019-03-29 2019-08-20 新智云数据服务有限公司 Dispatching method, scheduling system, storage medium and computer equipment
CN111338745A (en) * 2019-04-25 2020-06-26 中国移动通信集团湖南有限公司 Deployment method and device of virtual machine and intelligent equipment

Cited By (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113419671A (en) * 2021-05-20 2021-09-21 佛山市禅城区政务服务数据管理局 Personal data space access control method and system
CN113419671B (en) * 2021-05-20 2022-02-18 佛山市禅城区政务服务数据管理局 Personal data space access control method
CN113709241A (en) * 2021-08-26 2021-11-26 上海德拓信息技术股份有限公司 Scheduling distribution combination method and system of physical resources in cloud scene
CN113709241B (en) * 2021-08-26 2024-01-23 上海德拓信息技术股份有限公司 Scheduling and distributing combination method and system for physical resources in cloud scene
CN114168292A (en) * 2021-12-09 2022-03-11 中国建设银行股份有限公司 Resource scheduling method, device, equipment and medium
CN114785794A (en) * 2022-03-29 2022-07-22 北京字节跳动网络技术有限公司 Resource allocation method, device, equipment, medium, program product and system

Similar Documents

Publication Publication Date Title
CN112506650A (en) Resource allocation method, system, computer device and storage medium
CN109218355B (en) Load balancing engine, client, distributed computing system and load balancing method
Piao et al. A network-aware virtual machine placement and migration approach in cloud computing
US7877755B2 (en) Dynamic application placement with allocation restrictions and even load distribution
US20050038829A1 (en) Service placement for enforcing performance and availability levels in a multi-node system
US11321118B2 (en) System and method for controlled sharing of consumable resources in a computer cluster
CN113348651B (en) Dynamic inter-cloud placement of sliced virtual network functions
US20160323880A1 (en) Application Driven and Adaptive Unified Resource Management For Data Centers with Multi-Resource Schedulable Unit (MRSU)
JP6886964B2 (en) Load balancing method and equipment
US10616134B1 (en) Prioritizing resource hosts for resource placement
CN104937584A (en) Providing optimized quality of service to prioritized virtual machines and applications based on quality of shared resources
KR101471749B1 (en) Virtual machine allcoation of cloud service for fuzzy logic driven virtual machine resource evaluation apparatus and method
CN110221920B (en) Deployment method, device, storage medium and system
CN110347515B (en) Resource optimization allocation method suitable for edge computing environment
US20170339069A1 (en) Allocating Cloud Computing Resources In A Cloud Computing Environment
JP2012118669A (en) Load distribution processing system and load distribution processing method
KR20100081341A (en) Method, system and computer program for distributing a plurality of jobs to a plurality of computers
US7437459B2 (en) Calculation of service performance grades in a multi-node environment that hosts the services
US20060031242A1 (en) Method, system, and program for distributing application transactions among work servers
US10990519B2 (en) Multi-tenant cloud elastic garbage collector
CN114116173A (en) Method, device and system for dynamically adjusting task allocation
CN107491352B (en) Resource scheduling method and device
CN109491794A (en) Method for managing resource, device and electronic equipment
US10230664B1 (en) Strategic resource allocation in a web-based computing system
US11080092B1 (en) Correlated volume placement in a distributed block storage service

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination