System and method for sharing cluster resources by high-performance computing application and cloud native application
By deploying device management modules and resource reporting modules on server nodes of high-performance computing clusters, resource sharing between high-performance computing applications and cloud-native applications is realized, and the problem of low comprehensive resource utilization in the existing technology is solved and the maximum utilization of resources is achieved.
Patent Information
- Application Number
- CN202411764964.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-12-03
- Publication Date
- 2025-05-02
AI Technical Summary
There are differences in interfaces, task definition, scheduling and task management of high-performance computing clusters and cloud-native applications, resulting in incompatibility and the inability to maximize the comprehensive utilization rate of resources.
By deploying the device management module on the server node, generating device identifiers, and reporting device and resource information to the high-performance computing application node and cloud-native application node through the resource reporting module, unified allocation and scheduling of resources is achieved.
On the same cluster, high-performance computing applications and cloud-native applications can share resources, and each server in the server node can run high-performance computing applications and cloud-native applications at the same time, maximizing the comprehensive utilization of server resources.
Smart Images

Figure CN119917256A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of computing power network technology, and in particular to a system and method for sharing cluster resources between high-performance computing applications and cloud native applications. Background Art
[0002] Today's high-performance computing clusters are usually equipped with multiple high-specification servers, each of which has multiple central processing units (CPUs) and multiple graphics processing units (GPUs). They have powerful general computing power and accelerated computing power, and can run high-performance computing (HPC) applications as well as cloud-native applications such as artificial intelligence (AI) training. However, the interfaces, task definitions, scheduling, and task management of the HPC management system and the cloud-native base are very different and incompatible. High-performance computing clusters either only deploy HPC management systems such as cluster management and job scheduling systems (Simple Linux Utility for Resource Management, Slurm) and can only run HPC applications; or only deploy cloud-native bases such as Kubernetes and can only run cloud-native applications such as AI training. Each server cannot run HPC applications and cloud-native applications such as AI training at the same time, resulting in the inability to maximize the comprehensive utilization of resources. Summary of the invention
[0003] In view of this, the present invention provides a system and method for high-performance computing applications and cloud-native applications to share cluster resources, so as to solve the problem that the comprehensive utilization rate of server resources cannot be maximized.
[0004] In a first aspect, the present invention provides a system for high-performance computing applications and cloud-native applications to share cluster resources, the system comprising: a server node, a management node, a high-performance computing application node, and a cloud-native application node, wherein:
[0005] A server node, a first output end of which is connected to an input end of a high-performance computing application node, and a second output end of which is connected to an input end of a cloud-native application node, for generating a device identifier for each device in the server node, and transmitting device and resource information to the high-performance computing application node and the cloud-native application node according to the device identifier;
[0006] A high-performance computing application node, whose output terminal is connected to the first input terminal of the management node, is used to allocate resources for high-performance computing tasks, and upload each device and resource information and high-performance computing task allocation request to the management node according to the device identifier;
[0007] A cloud native application node, whose output end is connected to the second input end of the management node, is used to allocate resources for cloud native tasks, and upload each device and resource information and cloud native task allocation request to the management node according to the device identifier;
[0008] The management node is used to store and manage the information of each device and resource, high-performance computing task allocation request, and cloud-native task allocation request, and manage the high-performance computing task allocation request and cloud-native task allocation request with optimistic concurrency lock.
[0009] The present invention provides a system for high-performance computing applications and cloud-native applications to share cluster resources. On the same cluster, high-performance computing applications and cloud-native applications receive and schedule tasks with their own interfaces. Two application nodes share cluster resources. Each server in the server node can run high-performance computing applications and cloud-native applications at the same time, thereby maximizing the comprehensive utilization of server resources.
[0010] In an optional implementation, the server node includes: a device management module, a first resource reporting module, and a second resource reporting module, wherein:
[0011] A device management module, which is used to generate a unique device identifier for each device in the server node;
[0012] A first resource reporting module, whose input end is connected to the first output end of the device management module, whose output end is connected to the input end of the high-performance computing application node, is used to obtain device and resource information according to the device identifier, and upload the device and resource information to the high-performance computing application node;
[0013] The second resource reporting module has an input end connected to the second output end of the device management module, and an output end connected to the input end of the cloud native application node, and is used to obtain device and resource information according to the device identifier, and upload the device and resource information to the cloud native application node.
[0014] The system for sharing cluster resources between high-performance computing applications and cloud-native applications provided by the present invention deploys a device management module on each server, generates a unique device identifier for each device in the server, and reports device and resource information to high-performance computing application nodes and cloud-native application nodes through two resource reporting modules, thereby ensuring the consistency of device and resource information and improving the level of resource management.
[0015] In an optional implementation, a high performance computing application node includes: a high performance computing task allocation module, a high performance computing task management module, and a first node data scheduling module, wherein:
[0016] A high-performance computing task allocation module, whose output end is connected to the input end of the first node data scheduling module, and which jointly allocates resources for high-performance computing tasks with the high-performance computing task management module, and uploads the high-performance computing task allocation result to the first node data scheduling module;
[0017] The first node data scheduling module is used to receive the information of each device and resource, and the high-performance computing task allocation result, and upload the information of each device and resource, and the high-performance computing task allocation request to the management node according to the device identifier.
[0018] The system for sharing cluster resources between high-performance computing applications and cloud-native applications provided by the present invention adds a first node data scheduling module in the high-performance computing application node to realize the scheduling of equipment and resource information and high-performance computing task allocation, effectively allocate and manage high-performance computing tasks, and improve resource utilization.
[0019] In an optional implementation, a cloud native application node includes: a cloud native task allocation module and a second node data scheduling module, wherein:
[0020] A cloud-native task allocation module is used to allocate resources to cloud-native tasks and obtain cloud-native task allocation results;
[0021] The second node data scheduling module is used to receive the information of each device and resource, and the cloud native task allocation result, and upload the information of each device and resource, and the cloud native task allocation request to the management node according to the device identifier.
[0022] The system for sharing cluster resources between high-performance computing applications and cloud-native applications provided by the present invention adds a second node data scheduling module in the cloud-native application node to realize the scheduling of equipment and resource information and cloud-native task allocation, effectively allocates and manages cloud-native tasks, and improves resource utilization.
[0023] In an optional implementation, the management node includes: a node data management module and a database module, wherein:
[0024] The node data management module is used to manage the information of each device and resource according to the information of each device and resource, high-performance computing task allocation request, and cloud-native task allocation request, and manage the high-performance computing task allocation request and cloud-native task allocation request with optimistic concurrency lock. The node data management module supports setting the task preference of resources;
[0025] The database module is used to perform statistical storage and management on the data in the node data management module.
[0026] The system for sharing cluster resources between high-performance computing applications and cloud-native applications provided by the present invention realizes unified scheduling of resources by managing node management equipment and resource information, high-performance computing tasks and cloud-native tasks, so that high-performance computing tasks and cloud-native tasks share cluster resources and improve resource utilization. At the same time, it supports resource preference settings, ensures reasonable allocation of resources, and avoids resource fragmentation.
[0027] In a second aspect, the present invention provides a method for high-performance computing applications and cloud-native applications to share cluster resources, the method being applied to any system of the first aspect, the method comprising:
[0028] Obtain high-performance computing tasks and cloud-native tasks, and allocate resources to the high-performance computing tasks and cloud-native tasks respectively, and obtain high-performance computing task allocation results and cloud-native task allocation results;
[0029] Obtain the available resources of the target cluster, and match the high-performance task allocation results and the cloud-native task allocation results with the available resources of the target cluster to obtain the resource matching results;
[0030] Execute high-performance tasks and / or cloud-native tasks based on the resource matching results.
[0031] The method for high-performance computing applications and cloud-native applications to share cluster resources provided by the present invention, on the same cluster, high-performance computing applications and cloud-native applications receive and schedule tasks with their own interfaces, two application nodes share cluster resources, and each server in the server node can run high-performance computing applications and cloud-native applications at the same time, so as to maximize the comprehensive utilization rate of server resources.
[0032] In an optional implementation, executing a high-performance task and / or a cloud-native task according to a resource matching result includes:
[0033] If there is no conflict between the nodes occupied by the high-performance task allocation result and the nodes occupied by the cloud-native task allocation result in the available resources of the target cluster, the high-performance task and the cloud-native task are executed using their respective allocated nodes;
[0034] If the nodes occupied by the high-performance task allocation result and the nodes occupied by the cloud-native task allocation result conflict in the available resources of the target cluster, the high-performance task or the cloud-native task is executed according to the preset rules.
[0035] The method for high-performance computing applications and cloud-native applications to share cluster resources provided by the present invention avoids resource conflicts by uniformly scheduling and allocating nodes occupied by high-performance task allocation results and nodes occupied by cloud-native task allocation results, thereby enabling high-performance computing applications and cloud-native applications to share cluster resources and achieve efficient utilization of resources.
[0036] In an optional embodiment, the method further includes:
[0037] Based on the task type, preset dedicated nodes are set for the target task in the available resources of the target cluster.
[0038] The method for sharing cluster resources between high-performance computing applications and cloud-native applications provided by the present invention implements personalized resource scheduling by allocating dedicated resource nodes according to task types, ensures reasonable allocation of resources, avoids resource fragmentation, and improves task execution efficiency.
[0039] In a third aspect, the present invention provides a computer device, comprising: a memory and a processor, the memory and the processor being communicatively connected to each other, the memory storing computer instructions, and the processor executing the method of the first aspect or any corresponding embodiment thereof by executing the computer instructions.
[0040] In a fourth aspect, the present invention provides a computer-readable storage medium having computer instructions stored thereon, the computer instructions being used to cause a computer to execute the method of the first aspect or any corresponding embodiment thereof. BRIEF DESCRIPTION OF THE DRAWINGS
[0041] In order to more clearly illustrate the specific implementation methods of the present invention or the technical solutions in the prior art, the drawings required for use in the specific implementation methods or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are some implementation methods of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.
[0042] Figure 1 is a schematic diagram of a system structure in which high-performance computing applications and cloud-native applications share cluster resources according to an embodiment of the present invention;
[0043] Figure 2 is a schematic diagram of a system structure in which another high-performance computing application and a cloud-native application share cluster resources according to an embodiment of the present invention;
[0044] Figure 3 is a flow chart of a method for high-performance computing applications and cloud-native applications to share cluster resources according to an embodiment of the present invention;
[0045] Figure 4 is a schematic diagram of system management resource information for high performance computing applications and cloud native applications sharing cluster resources according to an embodiment of the present invention;
[0046] Figure 5 is a schematic diagram of a system in which high-performance computing applications and cloud-native applications share cluster resources and simultaneously run HPC tasks and AI training tasks according to an embodiment of the present invention;
[0047] Figure 6 is a schematic diagram of setting a task type preference of resources in a system for sharing cluster resources between a high performance computing application and a cloud native application according to an embodiment of the present invention;
[0048] Figure 7 It is a schematic diagram of the hardware structure of a computer device according to an embodiment of the present invention. DETAILED DESCRIPTION
[0049] In order to make the purpose, technical solution and advantages of the embodiments of the present invention clearer, the technical solution in the embodiments of the present invention will be clearly and completely described below in conjunction with the drawings in the embodiments of the present invention. Obviously, the described embodiments are part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative work are within the scope of protection of the present invention.
[0050] Embodiments of the present invention provide a system and method for high-performance computing applications and cloud-native applications to share cluster resources, which achieves the effect of high-performance computing applications and cloud-native applications sharing cluster resources by uniformly allocating and scheduling devices and resources according to device identifiers.
[0051] According to an embodiment of the present invention, a system embodiment for sharing cluster resources between high-performance computing applications and cloud native applications is provided, such as Figure 1 As shown, the system includes: server nodes, management nodes, high-performance computing application nodes, and cloud-native application nodes.
[0052] like Figure 1 As shown, the server node Compute Node has a first output end connected to the input end of the high-performance computing application node, and a second output end connected to the input end of the cloud-native application node, and is used to generate a device identifier for each device in the server node, and transmit the device and resource information to the high-performance computing application node and the cloud-native application node according to the device identifier.
[0053] Specifically, based on the original configuration of the cluster computer nodes, a device management module (Device Mgr) is deployed on each server to generate a unique device identifier (Device Id) for each node (Node) and each CPU and GPU on the node.
[0054] In the Compute Node, a first resource reporting module (Kubelet Device Plugin) is added to Kubelet and the device and resource information is transmitted to the high-performance computing application node according to the Device Id. In the Compute Node, a second resource reporting module (Slurmd Device Plugin) is added to Slurmd and the device and resource information is transmitted to the cloud native node according to the Device Id.
[0055] like Figure 1 As shown, the output end of the high-performance computing application node Kubernetes Master Node is connected to the first input end of the management node, and is used to allocate resources for high-performance computing tasks, and upload each device and resource information and high-performance computing task allocation request to the management node according to the device identifier.
[0056] Specifically, the first node data scheduling module (Kubernetes NodeData Plugin) component is added to the Kubernetes API server of the Kubernetes Master Node, and its functions include:
[0057] (1) Obtain equipment and resource information from the server node. After the high-performance computing task allocation module (Kubernetes scheduler) and the high-performance computing task management module (Kubernetes node manager) bind the resources to the high-performance computing task (Bind), the high-performance computing task allocation result is determined. The KubernetesNodeData Plugin uploads the resource nodes occupied by the high-performance computing task to the management node (Meta Node) in the form of a task allocation request (commit). If the commit is accepted, the task allocation is successful. Otherwise, the resource allocation information is obtained again and the Kubernetes scheduler is asked to reschedule the allocation.
[0058] (2) Obtain the resource list and resource allocation information of the current Node, CPU, GPU and other resources from the Meta Node;
[0059] (3) Report the number and specification information of Node, CPU, GPU and other resources in the server node to the Meta Node.
[0060] like Figure 1As shown, the cloud native application node Slurm Master Node has an output end connected to the second input end of the management node, which is used to allocate resources for cloud native tasks and upload each device and resource information and cloud native task allocation request to the management node according to the device identifier.
[0061] Specifically, the second node data scheduling module (Slurm NodeData Plugin) is added and deployed in the Slurmctld of the Slurm Master Node, and its functions include:
[0062] (1) After obtaining device and resource information from the server node, Slurmctld allocates resources for the cloud native task and determines the cloud native task allocation result, Slurm NodeData Plugin uploads the resource nodes occupied by the cloud native task to the management node (Meta Node) in the form of a task allocation request (commit). If the commit is accepted, the task allocation is successful. Otherwise, the resource allocation information is re-acquired and rescheduled.
[0063] (2) Obtain the resource list and resource allocation information of the current Node, CPU, GPU and other resources from the Meta Node;
[0064] (3) Report the number and specification information of Node, CPU, GPU and other resources in the server node to the Meta Node.
[0065] like Figure 1 As shown, the management node Meta Node is used to store and manage the information of each device and resource according to the information of each device and resource, high-performance computing task allocation request, and cloud-native task allocation request, and manage the high-performance computing task allocation request and cloud-native task allocation request with optimistic concurrency lock.
[0066] Specifically, Meta Node receives the resource quantity and specification information reported by Slurm NodeData Plugin and Kubernetes NodeData Plugin, manages Node and Node's CPU and GPU resources with Device ID as the unique identifier, and supports setting task type preferences for Node, CPU and GPU resources. It receives commit requests from multiple Slurm NodeData Plugin and Kubernetes NodeData Plugin, manages node conflicts of different commits with the control mechanism of optimistic concurrent lock, improves the concurrent performance of multiple tasks, and records the resource allocation information of nodes.
[0067] This embodiment provides a system for high-performance computing applications and cloud-native applications to share cluster resources. On the same cluster, high-performance computing applications and cloud-native applications receive and schedule tasks using their own interfaces. Two application nodes share cluster resources. Each server in the server node can run high-performance computing applications and cloud-native applications at the same time, thereby maximizing the comprehensive utilization of server resources.
[0068] In some optional embodiments, such as Figure 2 As shown, the server node includes: a device management module, a first resource reporting module, and a second resource reporting module.
[0069] like Figure 2 As shown, the device management module Device Mgr is used to generate a unique device identifier for each device in the server node.
[0070] Specifically, Device Mgr is used to generate a unique DeviceId for each Node, and each CPU and GPU of the Node.
[0071] like Figure 2 As shown, the first resource reporting module Kubelet Device Plugin has its input end connected to the first output end of the device management module, and its output end connected to the input end of the high-performance computing application node, and is used to obtain device and resource information according to the device identifier, and upload the device and resource information to the high-performance computing application node.
[0072] Specifically, Kubelet Device Plugin is deployed on Kebelet, which is the management agent component of the Kubernetes platform on each node, used to manage the life cycle of high-performance computing applications. The functions of KubeletDevice Plugin include:
[0073] (1) Obtain the Device Id of the Node, each CPU, and GPU from the Device Mgr module;
[0074] (2) When Kubelet reports Node information, it includes information about each CPU and GPU, using the Device ID as the unique identifier.
[0075] like Figure 2 As shown, the second resource reporting module Slurmd Device Plugin has its input end connected to the second output end of the device management module, and its output end is connected to the input end of the cloud native application node, and is used to obtain device and resource information according to the device identifier, and upload the device and resource information to the cloud native application node.
[0076] Specifically, Slurmd Device Plugin is deployed in Slurmd, which is the management agent component of Slurm on each node and is used to manage the life cycle of cloud native applications. The functions of Slurmd Device Plugin include:
[0077] (1) Obtain the Device Id of the Node, each CPU, and GPU from the Device Mgr module;
[0078] (2) When Slurmd reports Node information, it includes information about each CPU and GPU, using the Device Id as the unique identifier.
[0079] The system provided in this embodiment for high-performance computing applications and cloud-native applications to share cluster resources deploys a device management module on each server, generates a unique device identifier for each device in the server, and reports device and resource information to high-performance computing application nodes and cloud-native application nodes through two resource reporting modules, thereby ensuring the consistency of device and resource information and improving the level of resource management.
[0080] In some optional embodiments, such as Figure 2 As shown, the high performance computing application node includes: a high performance computing task allocation module, a high performance computing task management module, and a first node data scheduling module.
[0081] like Figure 2 As shown, the output end of the high-performance computing task allocation module Kubernetes scheduler is connected to the input end of the first node data scheduling module. It and the high-performance computing task management module Kubernetes Nodemanager jointly allocate resources for high-performance computing tasks and upload the high-performance computing task allocation results to the first node data scheduling module.
[0082] Specifically, Kubernetes scheduler is the scheduler of the Kubernetes platform, and its main functions include allocating resources to applications; Kubernetes Nodemanager is the node management layer of the Kubernetes platform, and its main functions include: managing the information of all nodes.
[0083] like Figure 2 As shown, the first node data scheduling module Kubernetes NodeData Plugin is used to receive each device and resource information, high-performance computing task allocation results, and upload each device and resource information, high-performance computing task allocation request to the management node according to the device identifier.
[0084] Specifically, Kubernetes NodeData Plugin is deployed on the Kubernetes API server. The Kubernetes API server is the application programming interface (API) layer and data layer of the Kubernetes platform, managing resource information and application information.
[0085] The system provided in this embodiment for high-performance computing applications and cloud-native applications to share cluster resources adds a first node data scheduling module in the high-performance computing application node to implement scheduling of equipment and resource information, and high-performance computing task allocation, effectively allocate and manage high-performance computing tasks, and improve resource utilization.
[0086] In some optional embodiments, such as Figure 2 As shown, the cloud native application node includes: a cloud native task allocation module and a second node data scheduling module.
[0087] like Figure 2 As shown, the cloud native task allocation module Slurmctld is used to allocate resources to cloud native tasks and obtain cloud native task allocation results.
[0088] Specifically, Slurmctld is the management layer of Slurm, which is used to manage resource information and application information and allocate resources to cloud native applications.
[0089] like Figure 2 As shown, the second node data scheduling module Slurm NodeData Plugin is used to receive each device and resource information, cloud native task allocation results, and upload each device and resource information, and cloud native task allocation request to the management node according to the device identifier.
[0090] Specifically, the Slurm NodeData Plugin is deployed in Slurmctld.
[0091] The system provided in this embodiment for high-performance computing applications and cloud-native applications to share cluster resources adds a second node data scheduling module in the cloud-native application node to implement scheduling of device and resource information and cloud-native task allocation, effectively allocate and manage cloud-native tasks, and improve resource utilization.
[0092] In some optional embodiments, such as Figure 2 As shown, the management node includes: a node data management module and a database module.
[0093] like Figure 2As shown, the node data management module NodeData Server is used to manage each device and resource information according to the device and resource information, high-performance computing task allocation requests, and cloud-native task allocation requests, and manage high-performance computing task allocation requests and cloud-native task allocation requests with optimistic concurrency locks. The node data management module supports setting task preferences for resources.
[0094] Specifically, NodeData Server is used to receive resource information reported by Slurm NodeData Plugin and KubernetesNodeData Plugin, and manage Node and Node's CPU and GPU resources with Device ID as the unique identifier. It receives commit requests from multiple Slurm NodeData Plugin and Kubernetes NodeData Plugin, manages node conflicts of different commits with optimistic concurrent lock control mechanism, improves the concurrent performance of multiple tasks, and records the resource allocation information of nodes.
[0095] NodeData Server supports setting task preferences for resources. For example, if nodes a1-a10 can only execute HPC tasks, then for the commit sent by Slurm NodeData Plugin, nodes a1-a10 are occupied. If the nodes configured in the commit sent by SlurmNodeData Plugin include a1-a10, the commit will be rejected. This is just an example, but not limited to this.
[0096] like Figure 2 As shown, the database module DB is used to perform statistical storage and management on the data in the node data management module.
[0097] Specifically, DB may be a relational database, such as Mysql, etc. It is mainly used to store and manage data in NodeDataServer.
[0098] The system provided in this embodiment for high-performance computing applications and cloud-native applications to share cluster resources realizes unified scheduling of resources by managing node management equipment and resource information, high-performance computing tasks and cloud-native tasks, so that high-performance computing tasks and cloud-native tasks share cluster resources and improve resource utilization. At the same time, it supports resource preference settings to ensure reasonable allocation of resources and avoid resource fragmentation.
[0099] According to an embodiment of the present invention, a method embodiment for high-performance computing applications and cloud-native applications to share cluster resources is provided. It should be noted that the steps shown in the flowchart of the accompanying drawings can be executed in a computer system such as a set of computer executable instructions, and although a logical order is shown in the flowchart, in some cases, the steps shown or described may be executed in an order different from that shown here.
[0100] In this embodiment, a method for high-performance computing applications and cloud-native applications to share cluster resources is provided, which can be used in the above-mentioned computer system or the system for high-performance computing applications and cloud-native applications to share cluster resources in the previous embodiment. Figure 3 is a flowchart of a method for high-performance computing applications and cloud-native applications to share cluster resources according to an embodiment of the present invention. Figure 3 As shown, the process includes the following steps:
[0101] Step S101, obtain high-performance computing tasks and cloud-native tasks, and allocate resources to the high-performance computing tasks and cloud-native tasks respectively, to obtain high-performance computing task allocation results and cloud-native task allocation results.
[0102] Specifically, the high-performance computing application generates a high-performance computing task, sends it to the high-performance computing application node, allocates node resources to the high-performance computing task in the high-performance computing application node, and obtains the high-performance computing task allocation result; the cloud-native application generates a cloud-native task, sends it to the cloud-native application node, allocates node resources to the cloud-native task in the cloud-native application node, and obtains the cloud-native task allocation result.
[0103] Step S102, obtaining the available resources of the target cluster, and matching the high-performance task allocation result and the cloud-native task allocation result with the available resources of the target cluster to obtain a resource matching result.
[0104] Specifically, the server nodes include the available resources of the target cluster. The high-performance task allocation results and the cloud-native task allocation results are matched with the available resources of the target cluster to determine the resource nodes occupied by the high-performance task allocation results in the available resources of the target cluster and the resource nodes occupied by the cloud-native task allocation results in the available resources of the target cluster as the resource matching results.
[0105] Step S103: execute high-performance tasks and / or cloud-native tasks according to the resource matching result.
[0106] Specifically, the node identifiers (device identifiers) of the resource nodes occupied by the high-performance task allocation results in the available resources of the target cluster and the resource nodes occupied by the cloud-native task allocation results in the available resources of the target cluster are unified. Therefore, it is possible to check whether there is a node conflict based on the resource matching results.
[0107] In some optional implementations, the above step S103 includes:
[0108] Step a1: If there is no conflict between the nodes occupied by the high-performance task allocation result and the nodes occupied by the cloud-native task allocation result in the available resources of the target cluster, the high-performance task and the cloud-native task are executed using their respective allocation nodes.
[0109] In step a2, if the nodes occupied by the high-performance task allocation result and the nodes occupied by the cloud-native task allocation result conflict in the available resources of the target cluster, the high-performance task or the cloud-native task is executed according to the preset rules.
[0110] Specifically, if there is no conflict between the nodes occupied by the high-performance task allocation result and the nodes occupied by the cloud-native task allocation result in the available resources of the target cluster, the high-performance task and the cloud-native task can be executed simultaneously using their respective allocation nodes.
[0111] If there is a conflict between the nodes occupied by the high-performance task allocation results and the nodes occupied by the cloud-native task allocation results in the available resources of the target cluster, it is necessary to execute the high-performance task or the cloud-native task according to the preset rules. For example, you can use optimistic locking to manage high-performance tasks and cloud-native tasks, or set them in a priority manner to give priority to high-performance tasks and reallocate resource nodes for cloud-native tasks.
[0112] The method for high-performance computing applications and cloud-native applications to share cluster resources provided in this embodiment avoids resource conflicts by uniformly scheduling and allocating the nodes occupied by high-performance task allocation results and the nodes occupied by cloud-native task allocation results, thereby enabling high-performance computing applications and cloud-native applications to share cluster resources and achieve efficient utilization of resources.
[0113] In some optional embodiments, the method further comprises:
[0114] Based on the task type, preset dedicated nodes are set for the target task in the available resources of the target cluster.
[0115] The method for high-performance computing applications and cloud-native applications to share cluster resources provided in this embodiment implements personalized resource scheduling by allocating dedicated resource nodes according to task types, ensuring reasonable resource allocation, avoiding resource fragmentation, and improving task execution efficiency. On the same cluster, high-performance computing applications and cloud-native applications receive and schedule tasks with their own interfaces, and the two application nodes share cluster resources. Each server in the server node can run high-performance computing applications and cloud-native applications at the same time, maximizing the comprehensive utilization of server resources.
[0116] In a specific embodiment, Figure 4 The following is a schematic diagram of system management resource information for high-performance computing applications and cloud-native applications sharing cluster resources. The functions of each module on the node are as follows:
[0117] (1) The Device Mgr on the node generates a unique Device Id for each Node, each CPU, and each GPU.
[0118] (2) The Slurmd / Device plugin on the node obtains the Device Id of each CPU and GPU from the Device Mgr module and reports the Node information to Slurmctld, including all CPU and GPU information.
[0119] (3) Slurmctld Nodedata plugin manages all Node, CPU, and GPU resource information and reports resource information to NodedataServer.
[0120] (4) The Kubelet Device plugin on the node obtains the Device Id of each CPU and GPU from the Device Mgr module, and reports the Node information to the Kubermetes API Server, including all CPU and GPU information.
[0121] (5) Kubernetes API Server / Nodedata plugin manages all Node, CPU, and GPU resource information and reports resource information to Nodedata Server.
[0122] (6) NodeData Server receives the resource information reported by NodeData Plugin and manages the Node and its CPU and GPU resources using the Device ID as a unique identifier.
[0123] In another specific embodiment, Figure 5 As shown in the figure, it is a schematic diagram of a system in which high-performance computing applications and cloud-native applications share cluster resources and run HPC tasks and AI training tasks at the same time. The execution process includes:
[0124] (1) The user submits an HPC task through the Slurm interface. Slurmctld / Slurm Nodedata plugin allocates resources to the task from the local resource list: Node A cpu0~cpu15, and submits a resource commit request to the Nodedata Server.
[0125] (2) Nodedata Server detects that the resource (Node A) has not been allocated and accepts the commit request.
[0126] (3) Slurmctld sends the HPC task to Slurmd on node A, and Slurmd on node A runs the HPC task.
[0127] (4) The user submits the AI training task through the Kubernetes interface. The Kubernetes scheduler allocates resources to the task from the local resource list: node A cpu0 to cpu15, and submits a resource commit request to the Nodedata Server through the Kubernetes API Server / Kubernetes Nodedata plugin.
[0128] (5) Nodedata Server detects that the resource (Node A) has been allocated and rejects the commit request.
[0129] (6) Kubernetes API Server / Kubernetes Nodedata plugin obtains updated resource allocation information.
[0130] (7) The Kubermetes scheduler reschedules and allocates resources to the task from the local resource list: Node B cpu0 to cpu15, and submits a resource commit request to the NodedataServer through the Kubermetes API Server / Kubernetes Nodedata plugin.
[0131] (8) Nodedata Server detects that the resource (Node B) has not been allocated and accepts the commit request from Kubernetes Nodedataplugin.
[0132] (9) The Kubernetes API Server sends the AI training task to the Kubelet of Node B, and the Kubelet of Node B runs the AI training task.
[0133] In another specific embodiment, Figure 6 As shown in the figure, a schematic diagram of setting resource task type preferences and running HPC tasks and AI training tasks simultaneously for a system in which high-performance computing applications and cloud-native applications share cluster resources includes the following steps:
[0134] (1) The administrator sets preferences on the NodeData Server: Node A can only run HPC tasks.
[0135] (2) When Slurmctld / Nodedata plugin obtains resource allocation information, the returned result is: Node A is not allocated, and Node B is not allocated.
[0136] (3) When the Kubermetes API Server / Kubermetes Nodedata plugin obtains resource allocation information, the result returned is: Node A is allocated, and Node B is not allocated.
[0137] (4) The user submits an HPC task through the Slurm interface. Slurmctld / Slurm Nodedata plugin allocates resources to the task from the local resource list: Node A cpu0~cpu15, and submits a resource commit request to the Nodedata Server.
[0138] (5) Nodedata Server detects that the resource (Node A) has not been allocated and accepts the commit request.
[0139] (6) Slurmctld sends the HPC task to Slurmd on node A, and Slurmd on node A runs the HPC task.
[0140] (7) The user submits the AI training task through the Kubernetes interface. The Kubernetes scheduler allocates resources to the task from the local resource list: Node B cpu0 to cpu15, and submits a resource commit request to the Nodedata Server through the Kubernetes API Server / Nodedata plugin.
[0141] (8) Nodedata Server detects that resources have not been allocated and accepts the commit request.
[0142] (9) The Kubernetes API Server sends the AI training task to the Kubelet of node B, and the Kubelet runs the AI training task.
[0143] The embodiment of the present invention also provides a computer device having the above Figure 1 or Figure 2 The system shown is a system in which high-performance computing applications and cloud-native applications share cluster resources.
[0144] See also Figure 7 , Figure 7is a schematic diagram of the structure of a computer device provided by an optional embodiment of the present invention, such as Figure 7 As shown, the computer device includes: one or more processors 10, a memory 20, and interfaces for connecting various components, including high-speed interfaces and low-speed interfaces. Various components are connected to each other using different buses for communication, and can be installed on a common mainboard or installed in other ways as needed. The processor can process the instructions executed in the computer device, including instructions stored in or on the memory to display the graphical information of the GUI on an external input / output device (such as, a display device coupled to the interface). In some optional embodiments, if necessary, multiple processors and / or multiple buses can be used together with multiple memories and multiple memories. Similarly, multiple computer devices can be connected, and each device provides some necessary operations (for example, as a server array, a group of blade servers, or a multi-processor system). Figure 7 A processor 10 is taken as an example.
[0145] The processor 10 may be a central processing unit, a network processor or a combination thereof. The processor 10 may further include a hardware chip. The hardware chip may be a dedicated integrated circuit, a programmable logic device or a combination thereof. The programmable logic device may be a complex programmable logic device, a field programmable gate array, a general purpose array logic or any combination thereof.
[0146] The memory 20 stores instructions executable by at least one processor 10, so that the at least one processor 10 executes the method shown in the above embodiment.
[0147] The memory 20 may include a program storage area and a data storage area, wherein the program storage area may store an operating system, an application required for at least one function; the data storage area may store data created according to the use of the computer device, etc. In addition, the memory 20 may include a high-speed random access memory, and may also include a non-transient memory, such as at least one disk storage device, a flash memory device, or other non-transient solid-state storage device. In some optional embodiments, the memory 20 may optionally include a memory remotely arranged relative to the processor 10, and these remote memories may be connected to the computer device via a network. Examples of the above-mentioned network include, but are not limited to, the Internet, an intranet, a local area network, a mobile communication network, and combinations thereof.
[0148] The memory 20 may include a volatile memory, such as a random access memory; the memory may also include a non-volatile memory, such as a flash memory, a hard disk or a solid state drive; the memory 20 may also include a combination of the above types of memory.
[0149] The computer device further comprises a communication interface 30 for the computer device to communicate with other devices or a communication network.
[0150] The embodiment of the present invention also provides a computer-readable storage medium. The method according to the embodiment of the present invention can be implemented in hardware, firmware, or can be implemented as a computer code that can be recorded in a storage medium, or can be implemented as a computer code that is originally stored in a remote storage medium or a non-temporary machine-readable storage medium and will be stored in a local storage medium through a network download, so that the method described herein can be stored in such software processing on a storage medium using a general-purpose computer, a dedicated processor, or programmable or dedicated hardware. Among them, the storage medium can be a magnetic disk, an optical disk, a read-only storage memory, a random access memory, a flash memory, a hard disk or a solid-state hard disk, etc.; further, the storage medium can also include a combination of the above types of memories. It can be understood that a computer, a processor, a microprocessor controller, or programmable hardware includes a storage component that can store or receive software or computer code. When the software or computer code is accessed and executed by a computer, a processor, or hardware, the method shown in the above embodiment is implemented.
[0151] Although the embodiments of the present invention have been described in conjunction with the accompanying drawings, those skilled in the art may make various modifications and variations without departing from the spirit and scope of the present invention, and such modifications and variations are all within the scope defined by the appended claims.
Claims
1. A system for high-performance computing applications and cloud-native applications to share cluster resources, characterized in that: The system includes: server nodes, management nodes, high-performance computing application nodes, and cloud-native application nodes, wherein: A server node, a first output end of which is connected to an input end of the high-performance computing application node, and a second output end of which is connected to an input end of the cloud-native application node, for generating a device identifier for each device in the server node, and transmitting device and resource information to the high-performance computing application node and the cloud-native application node according to the device identifier; A high-performance computing application node, whose output terminal is connected to the first input terminal of the management node, is used to allocate resources for high-performance computing tasks, and upload each device and resource information and high-performance computing task allocation request to the management node according to the device identifier; A cloud native application node, whose output end is connected to the second input end of the management node, is used to allocate resources for cloud native tasks, and upload each device and resource information and cloud native task allocation request to the management node according to the device identifier; The management node is used to store and manage the information of each device and resource according to the information of each device and resource, the high-performance computing task allocation request, and the cloud-native task allocation request, and manage the high-performance computing task allocation request and the cloud-native task allocation request with an optimistic concurrency lock.
2. The system according to claim 1, characterized in that The server node includes: a device management module, a first resource reporting module, and a second resource reporting module, wherein: A device management module, which is used to generate a unique device identifier for each device in the server node; A first resource reporting module, whose input end is connected to the first output end of the device management module, and whose output end is connected to the input end of the high-performance computing application node, is used to obtain device and resource information according to the device identifier, and upload the device and resource information to the high-performance computing application node; A second resource reporting module, whose input end is connected to the second output end of the device management module, and whose output end is connected to the input end of the cloud native application node, is used to obtain device and resource information according to the device identifier, and upload the device and resource information to the cloud native application node.
3. The system according to claim 1, characterized in that The high performance computing application node includes: a high performance computing task allocation module, a high performance computing task management module, and a first node data scheduling module, wherein: A high-performance computing task allocation module, whose output end is connected to the input end of the first node data scheduling module, and which jointly allocates resources for high-performance computing tasks with the high-performance computing task management module, and uploads the high-performance computing task allocation result to the first node data scheduling module; The first node data scheduling module is used to receive the information of each device and resource, and the high-performance computing task allocation result, and upload the information of each device and resource, and the high-performance computing task allocation request to the management node according to the device identifier.
4. The system according to claim 1, characterized in that The cloud native application node includes: a cloud native task allocation module and a second node data scheduling module, wherein: A cloud-native task allocation module is used to allocate resources to cloud-native tasks and obtain cloud-native task allocation results; The second node data scheduling module is used to receive the information of each device and resource, and the cloud native task allocation result, and upload the information of each device and resource, and the cloud native task allocation request to the management node according to the device identifier.
5. The system according to claim 1, characterized in that The management node includes: a node data management module and a database module, wherein: A node data management module, which is used to manage each device and resource information according to each device and resource information, high-performance computing task allocation request, and cloud-native task allocation request, and manage the high-performance computing task allocation request and cloud-native task allocation request with optimistic concurrency lock. The node data management module supports setting task preferences for resources; The database module is used to perform statistical storage and management on the data in the node data management module.
6. A method for high-performance computing applications and cloud-native applications to share cluster resources, characterized in that: The method is applied to the system according to any one of claims 1 to 5, and the method comprises: Obtain high-performance computing tasks and cloud-native tasks, and allocate resources to the high-performance computing tasks and the cloud-native tasks respectively, to obtain high-performance computing task allocation results and cloud-native task allocation results; Obtain available resources of the target cluster, and match the available resources of the target cluster with the high-performance task allocation result and the cloud-native task allocation result to obtain a resource matching result; The high-performance task and / or cloud-native task is executed according to the resource matching result.
7. The method according to claim 6, characterized in that The executing the high-performance task and / or the cloud-native task according to the resource matching result includes: If there is no conflict between the nodes occupied by the high-performance task allocation result and the nodes occupied by the cloud-native task allocation result in the available resources of the target cluster, the high-performance task and the cloud-native task are executed using their respective allocation nodes; If there is a conflict between the nodes occupied by the high-performance task allocation result and the nodes occupied by the cloud-native task allocation result in the available resources of the target cluster, the high-performance task or the cloud-native task is executed according to preset rules.
8. The method according to claim 6 or 7, characterized in that: The method further comprises: According to the task type, a preset dedicated node is set for the target task in the available resources of the target cluster.
9. A computer device, characterized in that: include: A memory and a processor, wherein the memory and the processor are communicatively connected to each other, the memory stores computer instructions, and the processor executes the method according to any one of claims 6 to 8 by executing the computer instructions.
10. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores computer instructions, and the computer instructions are used to enable a computer to execute the method according to any one of claims 6 to 8.