Resource management scheduling method, system and device capable of improving utilization rate of various computing resources and medium
By labeling and creating partitions for the computing nodes of the HPC system, and using the resource utilization efficiency scoring function, it solves the problem of difficulty in managing multiple computing resources by traditional schedulers, achieves balanced allocation of resources and reduces computing overhead, and adapts to large-scale Demand for scale HPC systems.
Patent Information
- Application Number
- CN202410760130.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-06-13
- Publication Date
- 2024-09-20
AI Technical Summary
The scheduler of traditional HPC systems is difficult to effectively manage multiple computing resources, resulting in resource waste and increased computing overhead, especially when different computing tasks have greatly different hardware configuration requirements.
By labeling computing nodes and creating partitions, combined with the scoring function of resource utilization efficiency, resource allocation is optimized, the scheduler computing overhead is reduced, and node partitioning is flexibly adjusted to adapt to resource changes.
It achieves balanced allocation of multiple resources, reduces resource waste and scheduler calculation overhead, and adapts to the resource management needs of large-scale HPC systems.
Smart Images

Figure CN118672776A
Abstract
Description
Technical Field
[0001] The present invention relates to the field of high performance computing technology, and in particular to a resource management and scheduling method, system, device and medium capable of improving the utilization rate of multiple types of computing resources. Background Art
[0002] High Performance Computing (HPC), also known as supercomputer, supercomputing, etc., refers to connecting multiple computing nodes through a network to work together to form a more powerful computer with extremely strong computing speed, storage capacity, and communication bandwidth. HPC is widely used in basic scientific research, biopharmaceuticals, meteorology, industrial simulation and other scenarios, and is a key tool for promoting scientific development. The ability of high-performance computing has become an important indicator of a country's core competitiveness in science and technology and its comprehensive national strength.
[0003] On the one hand, different HPC computing tasks have very different requirements for CPU, memory, GPU, and network bandwidth between nodes. For example, computing tasks such as computer simulation and optimization problem solving require more CPU cores to perform large-scale numerical simulations, optimization solutions, and other complex computing tasks. Genomic data analysis tasks require large-capacity memory to cache and quickly access data, as well as to store intermediate results of calculations. Large-scale data processing involves the movement of data between computing and storage nodes, which has high requirements for bandwidth between nodes. Deep learning computing tasks involve the training of deep neural networks, which usually rely on the GPU's large-scale matrix operations and tensor computing units to accelerate, thereby significantly shortening the model training time. In general, different computing tasks usually require different hardware configurations.
[0004] On the other hand, HPC systems are also constantly undergoing hardware upgrades and expansions, resulting in the inclusion of computing nodes with different hardware configurations in the same HPC system. For example, some computing nodes have more CPU cores, some have more GPU cards, and some have more memory.
[0005] Traditional schedulers, such as Kubernetes and Slurm, do not consider the balanced allocation of many types of resources at the same time. As the number of computing tasks increases, it may cause computing node resources to be idle but unable to be allocated. For example, the CPU of a computing node may have been allocated, but a large amount of memory is idle. However, since there are no idle CPUs at this time, these idle memories cannot be used for other computing tasks. At the same time, as the scale of HPC systems gradually increases, the number of computing nodes gradually increases. Real-time tracking of resource utilization of all computing nodes and filtering operations on each computing node to determine whether the computing node is suitable for a computing task will bring a lot of computing overhead to the scheduler.
[0006] Existing technologies such as patent application CN108334409A disclose a fine-grained high-performance cloud resource management scheduling method, which makes resource scheduling more efficient by scheduling CPU cores and memory in the same proportion and limiting the CPU cores used by each GPU. However, in this solution, CPU cores and memory are scheduled in the same proportion, and the scheduling method is not flexible enough, which may still lead to waste of a single resource. Summary of the invention
[0007] The purpose of the present invention is to propose a resource management scheduling method that can improve the utilization rate of multiple types of computing resources, taking into account the balanced allocation of multiple resources and significantly reducing the computing overhead of the scheduler itself.
[0008] The present invention is achieved through the following technical solutions:
[0009] In one aspect, the present invention provides a resource management and scheduling method for improving the utilization of multiple types of computing resources, comprising the following steps:
[0010] According to the hardware configuration of the computing node, the computing node is labeled with a first label, and a partition is created according to the first label, and the computing nodes with the same first label are added to the corresponding partition;
[0011] Define a scoring function for computing node resource utilization efficiency to evaluate the resource fragmentation of computing nodes;
[0012] When the scheduler receives a computing task, it adds a second label to the computing task, matches the second label of the computing task with the first label corresponding to the partition, and allocates resources to the computing task in the partition corresponding to the first label that is the same as the second label of the computing task; if there are multiple computing nodes in the partition, the computing nodes are allocated according to the result of the scoring function.
[0013] In order to optimize the above technical solutions, the specific measures / limitations taken also include:
[0014] Further, when a computing node has multiple first labels, the computing node is simultaneously in multiple corresponding partitions.
[0015] Furthermore, the scoring function for computing node resource utilization efficiency considers the resource conditions of the CPU, GPU, and memory at the same time.
[0016] The scoring function score for computing node resource utilization efficiency is as follows:
[0017]
[0018] Among them, R cpu Indicates the number of CPU cores that have been applied for, R mem Indicates the amount of memory that has been applied for, R gpu Indicates the number of GPU cards that have been applied for, A cpu Indicates the number of currently idle CPU cores, A mem Indicates the current amount of free memory, A gpu Indicates the number of currently idle GPU cards.
[0019] Furthermore, as resources on the computing node are continuously allocated, the first label of the computing node and the partition to which it belongs are adjusted according to the amount of remaining resources of the computing node.
[0020] Preferably, a threshold is set for the amount of resources on the computing node, and when the amount of resource change exceeds the threshold, the scheduler adjusts the partition where the computing node is located.
[0021] Furthermore, the scheduler preferentially selects the computing node with the lowest score and whose idle resources meet the needs of the computing task to undertake the computing task.
[0022] In a second aspect, the present invention provides a resource management and scheduling system capable of improving the utilization of multiple types of computing resources, comprising:
[0023] A computing node partitioning module is used to label the computing node with a first label according to the hardware configuration of the computing node, create a partition according to the first label, and add computing nodes with the same first label to the corresponding partition;
[0024] Resource fragmentation evaluation module, which is used to define the scoring function of computing node resource utilization efficiency and to evaluate the resource fragmentation of computing nodes;
[0025] The computing node allocation module is used to add a second label to the computing task after the scheduler receives the computing task. The scheduler matches the second label of the computing task with the first label corresponding to the partition, and allocates resources to the computing task in the partition corresponding to the first label that is the same as the second label of the computing task; if there are multiple computing nodes in the partition, the computing nodes are allocated in order from low to high according to the results of the scoring function.
[0026] In a third aspect, the present invention provides an electronic device comprising: a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein when the processor executes the computer program, the resource management and scheduling method as described above is implemented to improve the utilization of multiple types of computing resources.
[0027] In a fourth aspect, the present invention provides a computer-readable storage medium storing a computer program, wherein the computer program enables a computer to execute the resource management scheduling method as described above that can improve the utilization rate of multiple types of computing resources.
[0028] Compared with the prior art, the present invention has the following beneficial effects:
[0029] The present invention divides computing nodes into multiple partitions and adopts a scoring function for resource utilization efficiency, taking into account the balanced allocation of multiple resources and being expandable to support more resource types. When the HPC system is large in scale, the scheduler does not need to traverse all computing nodes to select appropriate nodes to allocate resources, thereby reducing the computational overhead of the scheduler itself.
[0030] In order to reduce the frequent changes of the partition where the node is located, the present invention sets thresholds for the number of CPU cores and the amount of memory respectively. Only when the change exceeds the threshold, the scheduler will adjust the partition where the node is located.
[0031] The present invention can not only take into account the balanced allocation of multiple resources and reduce resource fragmentation, but also significantly reduce the computational overhead of the scheduler itself. BRIEF DESCRIPTION OF THE DRAWINGS
[0032] Figure 1 : The resource management process of the scheduler in the resource management and scheduling method of the present invention can improve the utilization rate of multiple types of computing resources.
[0033] Figure 2 : The resource scheduling process of the scheduler in the resource management scheduling method of the present invention can improve the utilization rate of multiple types of computing resources. DETAILED DESCRIPTION
[0034] The above contents of the present invention are further described in detail below in the form of embodiments, but this should not be understood as the scope of the above subject matter of the present invention being limited to the following embodiments, and all technologies realized based on the above contents of the present invention belong to the scope of the present invention.
[0035] The present invention provides a resource management and scheduling method that can improve the utilization rate of multiple types of computing resources, such as Figure 1 As shown, first, according to the hardware configuration of the computing node, the computing node is given a first label, such as "large memory", "computation-intensive", "GPU acceleration", etc., and multiple corresponding partitions are created, and the computing nodes with the same first label are added to the same partition. When a computing node has a high hardware configuration, it may have multiple first labels and be in multiple partitions at the same time. For example, if the computing node has a large amount of memory and is configured with a large number of CPUs, the computing node can be in both the "large memory" and "computation-intensive" partitions.
[0036] Secondly, a scoring function for computing node resource utilization efficiency is defined. This scoring function can consider multiple types of resources such as CPU, GPU, memory, etc. at the same time, and can evaluate the resource fragmentation of computing nodes.
[0037] like Figure 2 As shown in the figure, when the scheduler receives a computing task, it adds a second label to the computing task. The scheduler matches the second label of the computing task with the first label of the partition, and allocates resources to the computing task in the partition with the same label. If there are multiple computing nodes in the partition, the computing nodes are allocated in order from low to high according to the result of the scoring function. When the HPC system is large in scale, the scheduler does not need to traverse all computing nodes to select the appropriate computing node to allocate resources.
[0038] Finally, due to the continuous allocation of resources on the computing node, the label of the computing node and the partition it belongs to need to be adjusted according to the number of remaining resources on the computing node. For example, if the computing node initially has 64 CPU cores and 32GB of memory, then the computing node should initially belong to the "computation-intensive" partition, but if 32 CPU cores have been allocated, then the computing node needs to be dynamically adjusted from the "computation-intensive" partition to the "general" partition.
[0039] This application not only takes into account the balanced allocation of multiple resources and reduces resource fragmentation, but also does not need to traverse all computing nodes in the system, which can greatly reduce the computing overhead of the scheduler itself.
[0040] The present invention also provides a resource management and scheduling system capable of improving the utilization of multiple types of computing resources, comprising:
[0041] A computing node partitioning module is used to label the computing node with a first label according to the hardware configuration of the computing node, create a partition according to the first label, and add computing nodes with the same first label to the corresponding partition;
[0042] Resource fragmentation evaluation module, which is used to define the scoring function of computing node resource utilization efficiency and to evaluate the resource fragmentation of computing nodes;
[0043] The computing node allocation module is used to add a second label to the computing task after the scheduler receives the computing task. The scheduler matches the second label of the computing task with the first label corresponding to the partition, and allocates resources to the computing task in the partition corresponding to the first label that is the same as the second label of the computing task; if there are multiple computing nodes in the partition, the computing nodes are allocated in order from low to high according to the results of the scoring function.
[0044] The present invention also provides an electronic device, comprising: a memory, a processor, and a computer program stored in the memory and executable on the processor. When the processor executes the computer program, the resource management and scheduling method as described above is implemented to improve the utilization of multiple types of computing resources.
[0045] The present invention also provides a computer-readable storage medium storing a computer program, wherein the computer program enables a computer to execute the resource management and scheduling method as described above that can improve the utilization rate of multiple types of computing resources.
[0046] The present invention is further described in detail below in conjunction with specific embodiments:
[0047] Scheduler resource management:
[0048] Step 1: Define the types of tags based on the actual deployment characteristics of the HPC system. For example, you can define tags such as "large memory", "computation-intensive", "GPU acceleration", and "general purpose".
[0049] Step 2: In the initial state, the scheduler calculates the first label of the computing node according to the hardware configuration of the computing node, and manages the node in the partition with the same first label. If the computing node has GPU card resources, the node is added to the "GPU acceleration" partition; if the node memory is greater than 64GM, the node is added to the "large memory" partition; if the node CPU core number is greater than 64, the node is added to the "computation intensive" partition; if none of the above conditions are met, the node is added to the "general" partition.
[0050] Step 3: After the scheduler starts receiving computing task schedules, the scheduler adjusts the partition where the node is located in real time based on the remaining free resources of the node. For example, if the GPU cards of a computing node have all been allocated to computing tasks, the computing node needs to be moved out of the "GPU" partition and into other suitable partitions. For another example, if the node initially has 64 CPU cores and 32GB of memory, the node should initially belong to the "computation-intensive" partition, but if 32 CPU cores have been allocated, the node needs to be dynamically adjusted from the "computation-intensive" partition to the "general" partition. In order to reduce the frequent changes in the partition where the node is located, thresholds are set for the number of CPU cores and the amount of memory respectively. Only when the change exceeds the threshold will the scheduler adjust the partition where the node is located.
[0051] Resource scheduling of the scheduler:
[0052] Step 1: After the HPC system runs normally, the user submits a computing task to the scheduler. The computing task specifies the type and quantity of resources to be applied for, for example, 16 CPU cores, 32 GB of memory, etc.
[0053] Step 2: According to the type and quantity of resources requested by the computing task, calculate the type of the main resource requested and give the computing task a second label. The method for determining the type of the main resource of the computing task is as follows: if the computing task requests a GPU, the main resource is the GPU; if the HPC system is configured with n CPU cores and m GB of memory, and the resources requested by the computing task are x CPU cores and y GB of memory, then compare and If the value of Greater than And the difference is greater than the threshold, then the primary resource is the CPU. Less than And the difference is greater than the threshold, then the primary resource is memory. If and If the difference is less than the threshold, the primary resource is universal.
[0054] Step 3: Allocate computing nodes to the corresponding partitions according to the main resource type. If the main resource is GPU, the scheduler allocates resources from the nodes in the "GPU acceleration" partition; if the main resource is CPU, the scheduler allocates resources from the nodes in the "compute intensive" partition; if the main resource is memory, the scheduler allocates resources from the nodes in the "large memory" partition; if the main resource is general, the scheduler allocates resources from the nodes in the "general" partition. If there are no free resources in a partition, resources are allocated from other partitions in the order of priority of "general", "compute intensive", "large memory", and "GPU acceleration".
[0055] Step 4: Calculate the resource utilization efficiency score of each node in the partition and select the node with the lowest score to undertake the computing task. The resource utilization efficiency score is calculated as follows:
[0056]
[0057] Among them, R cpu Indicates the number of CPU cores that have been applied for, R mem Indicates the amount of memory that has been applied for, R gpu Indicates the number of GPU cards that have been applied for, A cpu Indicates the number of currently idle CPU cores, A mem Indicates the current amount of free memory, A gpu Indicates the number of currently idle GPU cards.
[0058] The higher the score, the more balanced the resource allocation on the node. Therefore, the scheduler gives priority to nodes with the lowest score and free resources that meet the needs of computing tasks to undertake computing tasks.
[0059] This solution does not require setting a rigid ratio relationship, and can be flexibly allocated based on the usage of existing resources to avoid wasting resources.
[0060] In the description of the present invention, terms such as "first, second" are used for descriptive purposes only and should not be understood as indicating or implying relative importance.
[0061] The above description is only a preferred embodiment of the present invention and does not limit the present invention in any form. Any technician familiar with the profession, without departing from the scope of the technical solution of the present invention, according to the technical essence of the present invention, any simple modification, equivalent replacement and improvement made to the above embodiment still falls within the protection scope of the technical solution of the present invention.
Claims
1. A resource management and scheduling method capable of improving the utilization of multiple types of computing resources, characterized in that: The following steps are involved: According to the hardware configuration of the computing node, the computing node is labeled with a first label, and a partition is created according to the first label, and the computing nodes with the same first label are added to the corresponding partition; Define a scoring function for computing node resource utilization efficiency to evaluate the resource fragmentation of computing nodes; When the scheduler receives the computing task, it adds a second tag to the computing task, matches the second tag of the computing task with the first tag corresponding to the partition, and allocates resources to the computing task in the partition corresponding to the first tag that is the same as the second tag of the computing task; If there are multiple computing nodes in the partition, the computing nodes are allocated according to the result of the scoring function.
2. The resource management and scheduling method for improving the utilization of multiple types of computing resources according to claim 1, characterized in that: When a computing node has multiple first labels, the computing node is simultaneously in multiple corresponding partitions.
3. The resource management and scheduling method for improving the utilization of multiple types of computing resources according to claim 1, characterized in that: The scoring function for computing node resource utilization efficiency takes into account the resource conditions of the CPU, GPU, and memory.
4. The resource management and scheduling method for improving the utilization of multiple types of computing resources according to claim 1, characterized in that: The scoring function score for computing node resource utilization efficiency is as follows: Among them, R cpu Indicates the number of CPU cores that have been applied for, R mem Indicates the amount of memory that has been applied for, R gpu Indicates the number of GPU cards that have been applied for, A cpu Indicates the number of currently idle CPU cores, A mem Indicates the current amount of free memory, A gpu Indicates the number of currently idle GPU cards.
5. The resource management and scheduling method for improving the utilization of multiple types of computing resources according to claim 1, characterized in that: As resources on the computing node are continuously allocated, the first label of the computing node and the partition to which it belongs are adjusted according to the amount of remaining resources on the computing node.
6. The resource management and scheduling method for improving the utilization of multiple types of computing resources according to claim 5, characterized in that: A threshold is set for the amount of resources on the computing node. When the resource change exceeds the threshold, the scheduler adjusts the partition where the computing node is located.
7. The resource management and scheduling method for improving the utilization of multiple types of computing resources according to claim 1, characterized in that: The scheduler preferentially selects the computing node with the lowest score and whose idle resources meet the needs of the computing task to undertake the computing task.
8. A resource management and scheduling system capable of improving the utilization of multiple types of computing resources, characterized in that: include: A computing node partitioning module is used to label the computing node with a first label according to the hardware configuration of the computing node, create a partition according to the first label, and add computing nodes with the same first label to the corresponding partition; Resource fragmentation evaluation module, which is used to define the scoring function of computing node resource utilization efficiency and to evaluate the resource fragmentation of computing nodes; A computing node allocation module, used for, when the scheduler receives a computing task, adding a second label to the computing task, the scheduler matches the second label of the computing task with the first label corresponding to the partition, and allocates resources to the computing task in the partition corresponding to the first label that is the same as the second label of the computing task; If there are multiple computing nodes in the partition, the computing nodes are allocated in order from low to high according to the results of the scoring function.
9. An electronic device, characterized in that: include: A memory, a processor, and a computer program stored in the memory and executable on the processor. When the processor executes the computer program, the resource management and scheduling method for improving the utilization of multiple types of computing resources as described in any one of claims 1 to 7 is implemented.
10. A computer-readable storage medium storing a computer program, wherein the computer program enables a computer to execute the resource management and scheduling method for improving the utilization of multiple types of computing resources as described in any one of claims 1 to 7.
