GPU node scheduling method, system and storage medium based on computing business pre-analysis
By extracting the CUDA version and GPU architecture requirements of the computing service, filtering and matching Kubernetes nodes, the problem of resource mismatch in container scheduling is solved, the utilization efficiency of computing resources and system stability is improved, and resource waste and business interruption is avoided.
Patent Information
- Application Number
- CN202411131962.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-08-19
- Publication Date
- 2024-12-17
- Estimated Expiration
- 2044-08-19
AI Technical Summary
Kubernetes lacks in-depth analysis of the specific hardware requirements of computing services during container scheduling, resulting in mismatch of CUDA version or GPU architecture, resulting in container startup failure or unstable operation, and the existing methods fail to effectively use pre-analytic data to optimize scheduling decisions. Increased the risk of resource waste and business disruption.
By obtaining the cubin file and compiling configuration files of the computing business, extracting CUDA version and GPU architecture information, filtering appropriate Kubernetes nodes, and using nonlinear weighted sum distance functions or resource usage to calculate the matching degree, ensuring that the container is scheduled to the most matching node .
Accurately understand the requirements of computing services for GPU and CUDA, reduce container startup failures and computing task interruptions caused by resource mismatch, improve the utilization efficiency of computing resources, enhance system stability and reliability, and avoid the risks of resource waste and business interruption.
Smart Images

Figure CN118660055B_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of computer technology, and in particular to a GPU node scheduling method, system and storage medium based on computing business pre-analysis. Background Art
[0002] With the continuous growth of computing demand and the improvement of computing power, modern computing systems are increasingly dependent on high-performance computing (HPC) and parallel processing technologies. Graphics processing units (GPUs), as a powerful parallel computing platform, are widely used in deep learning, scientific computing, and data analysis. Kubernetes, as a popular container orchestration platform, can efficiently manage and schedule large-scale containerized applications. However, with the increasing demand for GPU-accelerated computing, how to optimize the scheduling of GPU resources in the Kubernetes environment has become an important research topic. Accurate and effective resource scheduling can not only improve computing efficiency, but also avoid resource waste and improve the overall performance and stability of the system.
[0003] Currently, Kubernetes mainly relies on the resource identification information of the node to schedule during the container scheduling process. In order to support GPU accelerated computing, Kubernetes introduced the concept of GPU resources and allocated these resources through specific scheduling strategies. However, in actual applications, computing services are highly dependent on hardware such as CUDA versions and GPU architectures, and existing scheduling methods mainly schedule based on the static resource information of nodes. Schedulers are usually unable to fully analyze and match the specific hardware requirements of computing services before scheduling, which may cause the container to fail to start or run unstable due to hardware incompatibility during runtime.
[0004] The existing technology has the following defects: First, the Kubernetes scheduler lacks in-depth analysis of the specific needs of computing services during the container scheduling stage, which leads to failures caused by CUDA version or GPU architecture mismatch during actual operation. Secondly, the existing methods fail to effectively use pre-analysis data to optimize scheduling decisions, thereby increasing the waste of resources and the risk of business interruption. Therefore, the technical problem of this application is how to accurately understand the needs of computing services for GPUs and CUDA through pre-analysis of computing services during the scheduling stage, and intelligently filter out unsuitable nodes during the scheduling process, thereby avoiding container startup failures and computing task interruptions due to resource mismatches. Summary of the invention
[0005] This application provides a GPU node scheduling method, system and storage medium based on pre-analysis of computing services, which can accurately understand its demand for GPU and CUDA by pre-analyzing computing services during the scheduling stage, and intelligently filter unsuitable nodes during the scheduling process, thereby avoiding container startup failures and computing task interruptions caused by resource mismatches. This application provides the following technical solutions:
[0006] In a first aspect, the present application provides a GPU node scheduling method based on computing service pre-analysis, the method comprising:
[0007] Obtain a computing business and extract a cubin file and a compilation configuration file from the computing business;
[0008] Acquire the CUDA version requirement and GPU architecture information of the computing service based on the cubin file and the compilation configuration file;
[0009] Get the CUDA version requirements and GPU architecture information of all nodes in the Kubernetes cluster;
[0010] Filter nodes in the Kubernetes cluster based on the CUDA version requirements and GPU architecture information of the computing business;
[0011] The computing service is matched with the screened nodes, and based on the matching result, the computing service is scheduled to the node with the highest matching degree.
[0012] In a specific possible implementation scheme, obtaining the CUDA version requirement and GPU architecture information of the computing service based on the cubin file and the compilation configuration file includes:
[0013] Use the cuobjdump tool to process the cubin file, generate a ptx code file, and extract the ptx code from the cubin file;
[0014] Open the generated ptx file and extract the CUDA version information from the .version statement in the ptx file;
[0015] Use the cuobjdump tool to process the cubin file and extract the SASS code;
[0016] Open the generated SASS file and extract the GPU architecture information from the .arch directive in the SASS file.
[0017] In a specific possible implementation scheme, the obtaining the CUDA version requirement and GPU architecture information of the computing service based on the cubin file and the compilation configuration file further includes:
[0018] In the compilation configuration file, find the options related to the CUDA compiler, parse the CUDA version information, and extract the CUDA version from the direct specified items or indirect information in the compilation configuration file;
[0019] In the compilation configuration file, look for options related to the GPU architecture, parse the GPU architecture information, and extract the GPU architecture information from the compilation configuration file.
[0020] In a specific implementation scheme, the step of obtaining the CUDA version requirement and GPU architecture information of the computing service based on the cubin file and the compilation configuration file includes:
[0021] After obtaining the CUDA version requirement and GPU architecture information of the computing business from the extracted cubin file and the compilation configuration file respectively, if the CUDA version requirement and GPU architecture information in the cubin file and the compilation configuration file are different, the one with the higher CUDA version requirement and GPU architecture information is selected as the final requirement.
[0022] In a specific possible implementation scheme, screening nodes in the Kubernetes cluster based on the CUDA version requirements and GPU architecture information of the computing business includes:
[0023] Traverse each node in the Kubernetes cluster;
[0024] Compare the CUDA version of each node with the CUDA version required by the computing business. If the CUDA version of the node is lower than the required version, mark the node as mismatched.
[0025] Compare the GPU architecture of each node with the GPU architecture requirements of the computing business. If the GPU architecture of the node does not meet the requirements, mark the node as mismatched.
[0026] All nodes that do not meet the CUDA version or GPU architecture requirements are recorded and all nodes marked as mismatched are excluded from the node list.
[0027] In a specific implementation scheme, matching the computing service with the screened nodes, and scheduling the computing service to the node with the highest matching degree based on the matching result includes:
[0028] The matching degree between the computing business and the filtered nodes is calculated based on the nonlinear weighted distance function. The calculation formula is as follows:
[0029] in, Is a node The total amount of resources available on It is a computing business The amount of resources required, Is a node The ratio of the current load to its maximum load, is the adjustment coefficient;
[0030] The matching degree between the computing service and all the selected nodes is calculated by the above formula, and the computing service is scheduled to the node with the highest matching degree.
[0031] In a specific implementation scheme, matching the computing service with the screened nodes, and scheduling the computing service to the node with the highest matching degree based on the matching result includes:
[0032] The matching degree between the computing business and the selected nodes is calculated based on the resource utilization rate. The calculation formula is as follows:
[0033] in, Is a node The total amount of resources available on Is a node The total amount of resources used on It is a computing business The amount of resources required, Is a node The resource utilization rate is and The ratio of is the adjustment coefficient;
[0034] The matching degree between the computing service and all the selected nodes is calculated by the above formula, and the computing service is scheduled to the node with the highest matching degree.
[0035] In the second aspect, the present application provides a GPU node scheduling system based on computing business pre-analysis, which adopts the following technical solutions:
[0036] A GPU node scheduling system based on computing business pre-analysis, comprising:
[0037] A file extraction module, used to obtain a computing business and extract a cubin file and a compilation configuration file from the computing business;
[0038] A requirement analysis module, used for obtaining the CUDA version requirement and GPU architecture information of the computing service based on the cubin file and the compilation configuration file;
[0039] The requirement acquisition module is used to obtain the CUDA version requirements and GPU architecture information of all nodes in the Kubernetes cluster;
[0040] A node screening module, used to screen nodes in the Kubernetes cluster based on the CUDA version requirements and GPU architecture information of the computing business;
[0041] The service scheduling module is used to match the computing service with the screened nodes, and schedule the computing service to the node with the highest matching degree based on the matching result.
[0042] In a third aspect, the present application provides an electronic device, comprising a processor and a memory; a program is stored in the memory, and the program is loaded and executed by the processor to implement a GPU node scheduling method based on computing business pre-analysis as described in the first aspect.
[0043] In a fourth aspect, the present application provides a computer-readable storage medium, wherein the storage medium stores a program, and when the program is executed by a processor, the program is used to implement a GPU node scheduling method based on computing business pre-analysis as described in the first aspect.
[0044] In summary, the beneficial effects of this application include at least:
[0045] (1) By extracting information from cubin files and compilation configuration files, we can fully understand the needs of computing services. Cubin files usually contain specific information after compilation, while compilation configuration files may provide configuration details specified during the development process. Combining information from these two sources can more accurately describe the actual needs of computing services for CUDA versions and GPU architectures, reducing resource mismatches caused by incomplete information fragments.
[0046] (2) The node's resource availability, load, and resource utilization are comprehensively considered in the matching degree calculation. By using nonlinear weighted sum distance functions and adjustment items based on resource utilization, this scheme can better evaluate the adaptability and resource matching of nodes. This not only improves the utilization efficiency of computing resources, but also helps avoid overloaded nodes, ensuring that computing tasks run in a relatively stable and efficient environment.
[0047] (3) This solution reduces business interruptions and resource waste caused by mismatched resource scheduling through intelligent node screening and matching. Accurate demand analysis and optimized scheduling decisions improve the overall performance and stability of the system, reduce the risk of resource mismatch encountered in actual operation, and thus improve the reliability and operation efficiency of the computing system.
[0048] By accurately extracting the CUDA version and GPU architecture requirements of the computing business, and combining the actual resource conditions of the nodes, intelligent node screening and matching are performed to solve the problems of container startup failure and computing task interruption caused by resource mismatch. By comprehensively considering the available resources, load conditions, and resource utilization of the nodes, this solution can effectively improve the utilization efficiency of computing resources, enhance the stability of the system, and avoid resource waste and business interruption risks in traditional scheduling methods.
[0049] The above description is only an overview of the technical solution of the present application. In order to more clearly understand the technical means of the present application and implement it according to the contents of the specification, the following is a detailed description of the preferred embodiments of the present application in conjunction with the accompanying drawings. BRIEF DESCRIPTION OF THE DRAWINGS
[0050] Figure 1 It is a flow chart of a GPU node scheduling method based on computing business pre-analysis in an embodiment of the present application.
[0051] Figure 2 It is a schematic diagram of the overall process of the GPU node scheduling method based on computing business pre-analysis in an embodiment of the present application.
[0052] Figure 3 It is a structural block diagram of a GPU node scheduling system based on computing business pre-analysis in an embodiment of the present application.
[0053] Figure 4 It is a block diagram of an electronic device for GPU node scheduling based on pre-analysis of computing services in an embodiment of the present application. DETAILED DESCRIPTION
[0054] The specific implementation methods of the present application are further described in detail below in conjunction with the accompanying drawings and examples. The following examples are used to illustrate the present application but are not intended to limit the scope of the present application.
[0055] The following are the professional terms and their explanations in this application:
[0056] A GPU (Graphics Processing Unit) is a processor that is specialized for processing graphics and image computing tasks. Although originally designed to accelerate graphics rendering, modern GPUs have evolved into a powerful computing device that is widely used for a variety of computationally intensive tasks.
[0057] CUDA (Compute Unified Device Architecture) is a parallel computing platform and programming model developed by NVIDIA. It allows developers to use the powerful computing power of NVIDIA GPUs to accelerate computationally intensive tasks.
[0058] CUBIN (CUDA Binary) is a binary file format generated after compilation in CUDA programming, which contains low-level instructions that can be executed directly on NVIDIA GPU.
[0059] PTX (Parallel Thread Execution) is an intermediate representation language designed by NVIDIA for its CUDA programming model. PTX code is a virtual instruction set between high-level CUDA C / C++ code and underlying machine code (SASS). PTX code is generated at compile time and further optimized and converted into actual machine instructions by the GPU driver at runtime.
[0060] FATBIN (Fat Binary) is a file format used in the CUDA programming model to package and manage multiple binary code versions. FATBIN files can contain PTX code and SASS code for different GPU architectures (such as Kepler, Maxwell, Pascal, Volta, etc.), allowing one file to run efficiently on different NVIDIA GPUs.
[0061] cuobjdump is a tool in the NVIDIA CUDA toolchain that is used to analyze and extract information from the binary files of CUDA programs. cuobjdump is mainly used to view the kernel code, PTX (Parallel Thread Execution) code, SASS (Shader Assembly) code and other related information in the binary files of CUDA programs. It is one of the important tools for CUDA developers to debug and optimize CUDA applications.
[0062] Kubernetes (K8s for short) is an open source container orchestration platform for automating the deployment, management, expansion, and operation of containerized applications. It was originally designed and developed by Google and is currently maintained by the Cloud Native Computing Foundation (CNCF). Kubernetes provides a centralized approach to container management, making the management of large-scale distributed systems simpler and more efficient.
[0063] The Kubernetes Scheduler is a key component in the Kubernetes cluster, responsible for allocating newly created Pods to appropriate nodes in the cluster to run. The main goal of the scheduler is to find the most suitable node to run each Pod based on a set of predefined rules and policies, thereby ensuring efficient use of resources and stability of the cluster.
[0064] The Kubernetes scheduler is a component in the Kubernetes cluster that is responsible for scheduling new Pods that are not assigned to nodes to suitable nodes. In order to adapt to different application requirements and cluster environments, the Kubernetes scheduler is highly scalable.
[0065] Kubernetes Deployment is a high-level resource object in Kubernetes that manages and deploys multiple copies (Pods) of an application and provides declarative update, rollback, and scaling functions.
[0066] In Kubernetes, Pod is the smallest deployable computing unit. It represents a collection of one or more containers running in a cluster. These containers share resources such as storage, network, and configuration, and run in the same execution environment. Pod is designed to run an instance of a single application or a tightly coupled service group.
[0067] Optionally, the present application takes the GPU node scheduling method based on computing business pre-analysis provided in each embodiment as an example for use in an electronic device, where the electronic device is a terminal or a server. The terminal may be a computer, a tablet computer, etc. This embodiment does not limit the type of electronic device.
[0068] Reference Figure 1 , is a flow chart of a GPU node scheduling method based on computing service pre-analysis provided by an embodiment of the present application, the method comprising at least the following steps:
[0069] Step S101: Obtain a computing service and extract a cubin file and a compilation configuration file from the computing service.
[0070] Step S102: Obtain CUDA version requirements and GPU architecture information of the computing service based on the cubin file and the compilation configuration file.
[0071] Step S103: Obtain CUDA version requirements and GPU architecture information of all nodes in the Kubernetes cluster.
[0072] Step S104: Filter the nodes in the Kubernetes cluster based on the CUDA version requirements and GPU architecture information of the computing business.
[0073] Step S105: Match the computing service with the screened nodes, and schedule the computing service to the node with the highest matching degree based on the matching result.
[0074] In step S101, two key data sources are extracted from the computing business: cubin files and compilation configuration files. The above data sources will be used to further analyze the CUDA version requirements and hardware requirements of the computing business. Specifically, first, obtain the CUDA binary files related to the computing business. The files are usually in the deployment package of the application or generated from the build system. If the computing business exists in the form of a container image, the binary file can be extracted from the image. If the computing business is still in the build stage, get the binary file from the build output directory. If there is source code, a binary file is usually generated after compilation. Then use the cuobjdump tool to extract the cubin file from the CUDA binary file. The cubin file is a binary file generated by the CUDA compiler and contains the compiled CUDA code. At the same time, extract the compilation configuration file from the build system or container image. The compilation configuration file records the CUDA compiler options and parameters used during compilation, and provides detailed information on the CUDA version and GPU architecture.
[0075] It should be noted that in this application, computing services refer to computing tasks that run in the Kubernetes environment and require GPU acceleration. These tasks use CUDA for high-performance computing, so special attention needs to be paid to the scheduling and optimization of GPU resources.
[0076] In step S102, the CUDA version requirements and GPU architecture information of the computing service are obtained from the extracted cubin file and the compilation configuration file. This information will help determine the specific requirements of the computing service for GPU resources and select appropriate nodes during the scheduling process.
[0077] In the implementation, first obtain the CUDA version requirements and GPU architecture information of the computing business from the cubin file. Specifically, use the cuobjdump tool to process the cubin file, generate a ptx code file, and extract the ptx code in the cubin file. Ptx is the intermediate code generated by the CUDA compiler, which contains the detailed implementation of the CUDA kernel. Open the generated ptx file and find information about the CUDA version. There is usually a version number in the ptx file. The common identification method is to have a command named .version at the beginning of the file or in the code, which indicates the version used to compile the CUDA code. For example, .version 11.0 means that the ptx code is written for CUDA 11.0. That is, extract the CUDA version information from the .version statement in the ptx file. Similarly, use the cuobjdump tool to process the cubin file and extract the SASS code. SASS is the compiled underlying assembly code that provides information about the GPU architecture. Open the generated SASS file and find the GPU architecture information. SASS files usually have .arch or similar tags to indicate the supported GPU architecture versions. For example, .arch sm_80 indicates that the GPU architecture version supported by the SASS code is sm_80. That is, the GPU architecture information is extracted from the .arch instruction in the SASS file.
[0078] Then, the CUDA version requirements and GPU architecture information of the computing business are obtained from the compilation configuration file. Specifically, in the compilation configuration file, options related to the CUDA compiler are searched. Options are usually used to specify the CUDA version required during the compilation process. Common options include specific CUDA compiler versions or CUDA environment variable settings. At the same time, the CUDA version information is parsed. The version information may be specified directly in the configuration file or indirectly determined by specifying a specific compiler tool chain. For example, some configuration files may specify the path or version requirements of the CUDA compiler. Check possible comments or instructions in the configuration file, which may clearly give the required CUDA version information. If the version information is not directly marked, it is usually necessary to confirm it in conjunction with documents or other instructions. Finally, the CUDA version is extracted from the directly specified items or indirect information in the compilation configuration file. For example, if the file specifies a specific CUDA tool chain or version number, the computing business requires that CUDA version. Similarly, in the compilation configuration file, options related to the GPU architecture are searched. Options are usually used to specify the GPU architecture supported during the compilation process. For example, there may be settings to specify the supported computing capabilities or target GPU architectures. At the same time, the GPU architecture information is parsed. The GPU architecture information usually appears in the form of architecture version or computing capabilities. The configuration file may contain explicit GPU architecture settings, or be indirectly specified through compiler options. For example, the configuration file may contain instructions or parameters to define the GPU architecture version of the compilation target, such as the settings of the -arch or -code parameters, or similar configuration items. The architecture information is finally extracted from the compilation configuration file. For example, if the configuration file specifies parameters to support a specific GPU architecture, the computing business needs to support that GPU architecture.
[0079] In implementation, after obtaining the CUDA version requirements and GPU architecture information of the computing business from the extracted cubin file and the compilation configuration file respectively, if the CUDA version requirements and GPU architecture information in the cubin file and the compilation configuration file are different, the one with the higher CUDA version requirement and GPU architecture information is selected as the final requirement. By extracting information from the cubin file and the compilation configuration file, the requirements of the computing business can be fully understood. The cubin file usually contains specific information after compilation, while the compilation configuration file may provide configuration details specified during the development process. Combining the information from these two sources can more accurately describe the actual requirements of the computing business for the CUDA version and GPU architecture, reducing resource mismatches caused by incomplete information fragments.
[0080] In step S103, first use the Kubernetes API to query the list of all nodes in the cluster, and obtain the basic information of all nodes from the Kubernetes cluster, including the name, label, and other metadata of the node. Then use the Kubernetes API or the relevant configuration tool of the node to extract the hardware specification information of each node, and for each node, obtain the detailed information of its GPU resources, including GPU architecture, CUDA version, GPU memory, etc. Then parse the detailed information of the node and extract the CUDA version information, including the installation path and version number of CUDA on the node. Extract the CUDA version information from the hardware information of the node to ensure that the CUDA version installed on each node is collected. At the same time, parse the hardware information of the node, extract the GPU architecture specifications, and obtain the above hardware information through the hardware detection tool or relevant configuration file on the node. Finally, record the CUDA version requirements and GPU architecture information of each node, and record the extracted CUDA version requirements and GPU architecture information in a database or data structure for subsequent use.
[0081] In step S104, for each node, check whether its CUDA version and GPU architecture meet the requirements of the computing business. If the CUDA version of the node is lower than the version required by the computing business, the node does not meet the requirements. If the GPU architecture of the node does not support the computing power version required by the computing business, the node does not meet the requirements. Traverse each node in the Kubernetes cluster and compare the CUDA version of each node with the CUDA version requirements of the computing business. If the CUDA version of the node is lower than the required version, mark the node as mismatched. Compare the GPU architecture of each node with the GPU architecture requirements of the computing business. If the GPU architecture of the node does not meet the requirements, mark the node as mismatched. Record all nodes that do not meet the CUDA version or GPU architecture requirements, and exclude all nodes marked as mismatched from the node list.
[0082] In step S105, the matching degree between the computing service and the screened nodes is calculated based on the nonlinear weighted sum distance function, and the calculation formula is as follows:
[0083] in, Is a node The total amount of resources available on It is a computing business The amount of resources required, Is a node The ratio of the current load to its maximum load, is the adjustment coefficient, which is used to control the impact of load conditions on the matching degree. The matching degree between the computing business and all the selected nodes is calculated by the above formula, and the computing business is scheduled to the node with the highest matching degree. In the design process of the above formula, the first half calculates the ratio of the available resources of the node to the resources required by the computing business, ensuring that only nodes with sufficient resources are considered. This enables the scheduler to give priority to nodes with sufficient resources. In addition, the first half actually measures the relative difference of resources, which is similar to a distance metric. The second half reduces the matching score of nodes with excessive load through nonlinear adjustment of the load condition. This avoids scheduling computing services to nodes with excessive loads and helps improve the stability and performance of the system. In addition, the second half is a nonlinear function. When the load ratio increases, the influence gradually increases, thereby reducing the matching score of the node. This effectively avoids scheduling computing services to nodes with excessive loads and ensures that computing tasks can run in a relatively stable environment. By considering both the available resources and the load condition of the node, the formula provides a comprehensive score to ensure that the scheduling decision can fully consider the current state of the node. This enables the scheduler to make more comprehensive scheduling decisions, improving resource utilization efficiency and system stability.
[0084] In addition, as a preferred embodiment, in addition to the above-mentioned calculation method of the matching degree, the matching degree between the computing service and the screened nodes can also be calculated based on the resource utilization rate, and the calculation formula is as follows:
[0085] in, Is a node The total amount of resources available on Is a node The total amount of resources used on It is a computing business The amount of resources required, Is a node The resource utilization rate is and The ratio of is the adjustment coefficient. By adding an adjustment item based on resource utilization to the above formula, the formula can dynamically adjust the impact of resource utilization on the matching degree. This means that when node resources are tight, the node's matching score will be reduced accordingly to avoid over-utilization of already highly loaded nodes. The resource utilization of the node will affect the matching score of the computing business. A higher resource utilization will underestimate the actual available resources of the node, resulting in a lower score in the matching calculation. This helps ensure that computing businesses are not scheduled to highly loaded nodes, reducing the risk of performance bottlenecks.
[0086] Optionally, the above two calculation methods can be used to calculate the matching degree of the computing business and the screened nodes respectively, and then the two calculated matching degrees are added and averaged, and finally the average value is used as the matching degree to sort the matching degree of the screened nodes. The first calculation formula focuses on the matching degree between the resource availability of the node and the computing business requirements, combining the comprehensive consideration of the load situation and the resource matching degree, while the second calculation formula further refines the actual load situation of the node and emphasizes the direct impact of resource utilization on the matching degree. This makes the matching degree calculation not only consider the absolute availability of resources, but also reflect the actual usage. The combination of these two methods can more comprehensively evaluate the adaptability of the node and the resource matching situation, ensuring the rationality and efficiency of the computing business in resource allocation.
[0087] In summary, combined with Figure 2 , the existing Kubernetes scheduling methods mainly rely on the static resource information of the nodes for scheduling, and lack in-depth analysis of the specific hardware requirements of the computing business. This leads to the failure or instability of the container at runtime due to the mismatch of CUDA version or GPU architecture. This solution accurately extracts the CUDA version and GPU architecture requirements of the computing business, and combines the actual resource conditions of the nodes to perform intelligent node screening and matching, solving the problems of container startup failure and computing task interruption caused by resource mismatch. By comprehensively considering the available resources, load conditions and resource utilization of the nodes, this solution can effectively improve the utilization efficiency of computing resources, enhance the stability of the system, and avoid resource waste and business interruption risks in traditional scheduling methods.
[0088] Figure 3 This is a structural block diagram of a GPU node scheduling system based on computing service pre-analysis provided by an embodiment of the present application. The device includes at least the following modules:
[0089] The file extraction module is used to obtain computing services and extract cubin files and compilation configuration files from the computing services.
[0090] The requirement analysis module is used to obtain the CUDA version requirements and GPU architecture information of the computing business based on the cubin file and the compilation configuration file.
[0091] The requirement acquisition module is used to obtain the CUDA version requirements and GPU architecture information of all nodes in the Kubernetes cluster.
[0092] The node screening module is used to screen nodes in the Kubernetes cluster based on the CUDA version requirements and GPU architecture information of the computing business.
[0093] The service scheduling module is used to match the computing service with the screened nodes, and schedule the computing service to the node with the highest matching degree based on the matching result.
[0094] For relevant details, refer to the above method embodiment.
[0095] Figure 4 4 is a block diagram of an electronic device provided by an embodiment of the present application. The device at least includes a processor 401 and a memory 402.
[0096] The processor 401 may include one or more processing cores, such as a 4-core processor, an 8-core processor, etc. The processor 401 may be implemented in at least one hardware form of DSP (Digital Signal Processing), FPGA (Field-Programmable Gate Array), and PLA (Programmable Logic Array). The processor 401 may also include a main processor and a coprocessor. The main processor is a processor for processing data in the awake state, also known as a CPU (Central Processing Unit); the coprocessor is a low-power processor for processing data in the standby state. In some embodiments, the processor 401 may be integrated with a GPU (Graphics Processing Unit), which is responsible for rendering and drawing the content to be displayed on the display screen. In some embodiments, the processor 401 may also include an AI (Artificial Intelligence) processor, which is used to process computing operations related to machine learning.
[0097] The memory 402 may include one or more computer-readable storage media, which may be non-transitory. The memory 402 may also include a high-speed random access memory, and a non-volatile memory, such as one or more disk storage devices, flash memory storage devices. In some embodiments, the non-transitory computer-readable storage medium in the memory 402 is used to store at least one instruction, which is used to be executed by the processor 401 to implement the GPU node scheduling method based on computing business pre-analysis provided in the method embodiment of the present application.
[0098] In some embodiments, the electronic device may further optionally include: a peripheral device interface and at least one peripheral device. The processor 401, the memory 402 and the peripheral device interface may be connected via a bus or a signal line. Each peripheral device may be connected to the peripheral device interface via a bus, a signal line or a circuit board. Schematically, the peripheral devices include but are not limited to: a radio frequency circuit, a touch display screen, an audio circuit, and a power supply.
[0099] Of course, the electronic device may also include fewer or more components, which is not limited in this embodiment.
[0100] Optionally, the present application also provides a computer-readable storage medium, in which a program is stored, and the program is loaded and executed by a processor to implement the GPU node scheduling method based on computing business pre-analysis of the above method embodiment.
[0101] Optionally, the present application also provides a computer product, which includes a computer-readable storage medium, in which a program is stored, and the program is loaded and executed by a processor to implement the GPU node scheduling method based on computing business pre-analysis of the above method embodiment.
[0102] The technical features of the above embodiments may be combined arbitrarily. To make the description concise, not all possible combinations of the technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this specification.
[0103] The above embodiments only express several implementation methods of the present application, and the descriptions thereof are relatively specific and detailed, but they cannot be understood as limiting the scope of the invention patent. It should be pointed out that, for a person of ordinary skill in the art, several variations and improvements can be made without departing from the concept of the present application, and these all belong to the protection scope of the present application. Therefore, the protection scope of the patent of the present application shall be subject to the attached claims.
Claims
1. A GPU node scheduling method based on computing business pre-analysis, It is characterized in that The method comprises: Obtain a computing business and extract a cubin file and a compilation configuration file from the computing business; Acquire the CUDA version requirement and GPU architecture information of the computing service based on the cubin file and the compilation configuration file; Get the CUDA version requirements and GPU architecture information of all nodes in the Kubernetes cluster; The nodes in the Kubernetes cluster are screened based on the CUDA version requirements and GPU architecture information of the computing business, including: traversing each node in the Kubernetes cluster; comparing the CUDA version of each node with the CUDA version requirements of the computing business, and if the CUDA version of the node is lower than the required version, marking the node as mismatched; comparing the GPU architecture of each node with the GPU architecture requirements of the computing business, and if the GPU architecture of the node does not meet the requirements, marking the node as mismatched; recording all nodes that do not meet the CUDA version or GPU architecture requirements, and excluding all nodes marked as mismatched from the node list; The computing service is matched with the screened nodes, and based on the matching result, the computing service is scheduled to the node with the highest matching degree.
2. The GPU node scheduling method based on computing business pre-analysis according to claim 1, It is characterized in that The obtaining of the CUDA version requirement and GPU architecture information of the computing service based on the cubin file and the compilation configuration file includes: Use the cuobjdump tool to process the cubin file, generate a ptx code file, and extract the ptx code file from the cubin file; Open the generated ptx code file and extract the CUDA version information from the .version statement in the ptx code file; Use the cuobjdump tool to process the cubin file and extract the SASS code; Open the generated SASS file and extract the GPU architecture information from the .arch directive in the SASS file.
3. The GPU node scheduling method based on computing business pre-analysis according to claim 2, It is characterized in that The obtaining of the CUDA version requirement and GPU architecture information of the computing service based on the cubin file and the compilation configuration file further includes: In the compilation configuration file, find the options related to the CUDA compiler, parse the CUDA version information, and extract the CUDA version from the direct specified items or indirect information in the compilation configuration file; In the compilation configuration file, look for options related to the GPU architecture, parse the GPU architecture information, and extract the GPU architecture information from the compilation configuration file.
4. The GPU node scheduling method based on computing service pre-analysis according to claim 3, It is characterized in that The step of obtaining the CUDA version requirement and GPU architecture information of the computing service based on the cubin file and the compilation configuration file includes: After obtaining the CUDA version requirement and GPU architecture information of the computing business from the extracted cubin file and the compilation configuration file respectively, if the CUDA version requirement and GPU architecture information in the cubin file and the compilation configuration file are different, the one with the higher CUDA version requirement and GPU architecture information is selected as the final requirement.
5. The GPU node scheduling method based on computing business pre-analysis according to claim 1, It is characterized in that The matching of the computing service with the screened nodes and scheduling the computing service to the node with the highest matching degree based on the matching result comprises: The matching degree between the computing business and the filtered nodes is calculated based on the nonlinear weighted distance function. The calculation formula is as follows: Among them, Available_R i is the total amount of available resources on node i, Required_R j is the amount of resources required to calculate business j, Load_Ratio i is the ratio of the current load of node i to its maximum load, and α is the adjustment coefficient; The matching degree between the computing service and all the selected nodes is calculated by the above formula, and the computing service is scheduled to the node with the highest matching degree.
6. The GPU node scheduling method based on computing service pre-analysis according to claim 1, It is characterized in that The matching of the computing service with the screened nodes and scheduling the computing service to the node with the highest matching degree based on the matching result comprises: The matching degree between the computing business and the selected nodes is calculated based on the resource utilization rate. The calculation formula is as follows: Among them, Available_R i is the total amount of available resources on node i, Used_R i is the total amount of resources used on node i, Required_R j is the amount of resources required to calculate business j, Utilization_Rate i is the resource utilization rate of node i, i.e., Used_R i Available_R i The ratio of , β is the adjustment coefficient; The matching degree between the computing service and all the selected nodes is calculated by the above formula, and the computing service is scheduled to the node with the highest matching degree.
7. A GPU node scheduling system based on pre-analysis of computing services, It is characterized in that include: A file extraction module, used to obtain a computing business and extract a cubin file and a compilation configuration file from the computing business; A requirement analysis module, used for obtaining the CUDA version requirement and GPU architecture information of the computing service based on the cubin file and the compilation configuration file; The requirement acquisition module is used to obtain the CUDA version requirements and GPU architecture information of all nodes in the Kubernetes cluster; A node screening module is used to screen nodes in the Kubernetes cluster based on the CUDA version requirements and GPU architecture information of the computing business, including: traversing each node in the Kubernetes cluster; comparing the CUDA version of each node with the CUDA version requirements of the computing business, and if the CUDA version of the node is lower than the required version, marking the node as mismatched; comparing the GPU architecture of each node with the GPU architecture requirements of the computing business, and if the GPU architecture of the node does not meet the requirements, marking the node as mismatched; recording all nodes that do not meet the CUDA version or GPU architecture requirements, and excluding all nodes marked as mismatched from the node list; The service scheduling module is used to match the computing service with the screened nodes, and schedule the computing service to the node with the highest matching degree based on the matching result.
8. An electronic device, It is characterized in that The device includes a processor and a memory; a program is stored in the memory, and the program is loaded and executed by the processor to implement a GPU node scheduling method based on computing business pre-analysis as described in any one of claims 1 to 6.
9. A computer-readable storage medium, It is characterized in that The storage medium stores a program, which, when executed by a processor, is used to implement a GPU node scheduling method based on computing business pre-analysis as described in any one of claims 1 to 6.
Citation Information
Patent Citations
Heterogeneous computing-oriented hardware architecture of distributed big data system
CN104023062A
Big data appliance realizing method based on CPU-GPU heterogeneous cluster
CN104536937A
Resource scheduling method and device and electronic equipment
CN115878303A
Development method of DevOps of AI algorithm service
CN116301876A
Container scheduling method, electronic device, and storage medium
WO2023198061A1
