Resource quota control method, device and product

By monitoring user requests and generating general resource key value information, it solves the problem of GPU resource quota control of different manufacturers and models in the K8S system, realizes unified management and control of GPU resources, and is suitable for scenarios where multiple GPU models coexist, improving efficiency. Resource utilization and management efficiency.

CN118426977BActive Publication Date: 2024-10-18JINAN INSPUR DATA TECH CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202410895290.4
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-07-05
Publication Date
2024-10-18
Estimated Expiration
2044-07-05

AI Technical Summary

Technical Problem

The existing Kubernetes (K8S) system is difficult to uniformly manage and control GPU resource quotas of different manufacturers and models, making it difficult for cloud platform administrators to effectively control GPU resources used by multi-tenants on the cloud through unified resource quotas.

Method used

By monitoring the user's application creation request, obtain the current resource key value information, and generate general resource key value information according to the preset resource mapping configuration file, add it to the application creation request, determine the general resource capacity of the target node, and shield different vendors and Differences in GPU models enable unified settings and control of GPU resources.

Benefits of technology

It achieves unified management and control of different types of GPU resources, supports unified calculation of resources in exclusive and shared modes, is compatible with new GPU models, is suitable for scenarios where multiple GPU models coexist, and improves resource utilization and management efficiency.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118426977B_ABST
    Figure CN118426977B_ABST
Patent Text Reader

Abstract

The embodiment of the present application provides a resource quota control method, device and product, belonging to the field of computer technology, the method includes monitoring any user's application creation request, obtaining the current resource key value information in the application creation request; according to the resource mapping configuration file storing the unit core computing power ratio and unit video memory ratio of different graphics processors, generating the general resource key value information corresponding to the current resource key value information and adding it to the application creation request; according to the general resource capacity in each node, determining the target node corresponding to the application creation request carrying the general resource key value information, the general resource capacity in any node is determined according to the resource information reported by the graphics processor of the node and the unit core computing power ratio and unit video memory ratio corresponding to the graphics processor in the resource mapping configuration file. The embodiment of the present application aims to uniformly control the resource quotas of different types of graphics processors.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The embodiments of the present application relate to the field of computer technology, and in particular to a resource quota control method, device, and product. Background Art

[0002] Kubernetes (K8S) is an open source containerized application for managing multiple hosts in a cloud platform. It provides a complete set of functions such as deployment and operation, resource scheduling, service discovery, and dynamic scaling for containerized applications, improving the convenience of large-scale container cluster management. A K8S cluster is a collection of physical or virtual machines that are organized into a single computing resource pool and run the K8S platform on it. K8S has a resource quota function, which allocates available resource quotas to users' pods.

[0003] GPU (Graphics Processing Unit) is a processor specifically designed to accelerate compute-intensive tasks such as image and video processing, 3D rendering, and scientific computing. It has powerful processing capabilities and can process large amounts of data simultaneously and perform fast parallel calculations. GPU was originally widely used in computer games and graphic design, but with the rise of compute-intensive applications such as artificial intelligence and machine learning, GPU has also become an important part of high-performance computing and scientific computing.

[0004] K8S also has a device plugin mechanism that can report the GPU as an extended resource of the K8S node. However, different manufacturers and models of GPUs report different resource key values ​​when expanding. As a cloud platform manager, it is difficult to shield the differences between various GPU hardware models like managing CPU and memory, and control the GPU resources used by multiple tenants on the cloud through a unified resource quota.

[0005] How to uniformly control the resource quotas of GPUs from different manufacturers and models is an urgent problem to be solved. Summary of the invention

[0006] The embodiments of the present application provide a resource quota control method, device, and product, which are intended to uniformly control different types of GPU resource quotas.

[0007] In a first aspect, an embodiment of the present application provides a resource quota control method, which is applied to a container cluster management system, wherein the system includes multiple nodes, and the method includes:

[0008] Listening to an application creation request of any user, obtaining current resource key value information in the application creation request, wherein the current resource key value information is used to represent a resource request of any graphics processor corresponding to the application creation request;

[0009] Generate general resource key information corresponding to the current resource key information according to a preset resource mapping configuration file, and add the general resource key information to the application creation request, wherein the resource mapping configuration file stores resource configuration information of different graphics processors, and the resource configuration information includes a unit core computing power ratio and a unit video memory ratio;

[0010] According to the general resource capacity in each node, determine the target node corresponding to the application creation request carrying the general resource key value information, wherein the general resource capacity in any node is determined based on the resource information reported by the graphics processor of the node and the unit core computing power ratio and unit video memory ratio corresponding to the graphics processor in the resource mapping configuration file.

[0011] Optionally, generating the universal resource key value information corresponding to the current resource key value information according to a preset resource mapping configuration file includes:

[0012] When the current resource key value information includes a core computing power request value and a video memory request value of any graphics processor, general core computing power request information is calculated according to the core computing power request value in the current resource key value information and the unit core computing power ratio corresponding to the graphics processor;

[0013] Calculate and obtain general video memory request information according to the video memory request value in the current resource key value information and the unit video memory ratio corresponding to the graphics processor;

[0014] The general core computing power request information and the general graphics memory request information are used as the general resource key value information corresponding to the current resource key value information.

[0015] Optionally, generating the universal resource key value information corresponding to the current resource key value information according to a preset resource mapping configuration file includes:

[0016] When the current resource key information includes a video memory request value of any graphics processor, general video memory request information is calculated according to the video memory request value in the current resource key information and the unit video memory ratio corresponding to the graphics processor;

[0017] The general video memory request information is used as the general resource key information corresponding to the current resource key information.

[0018] Optionally, generating the universal resource key value information corresponding to the current resource key value information according to a preset resource mapping configuration file includes:

[0019] When the current resource key value information includes a core computing power request value of any graphics processor, general core computing power request information is calculated according to the core computing power request value in the current resource key value information and the unit core computing power ratio corresponding to the graphics processor;

[0020] The general core computing power request information is used as the general resource key value information corresponding to the current resource key value information.

[0021] Optionally, after determining the target node corresponding to the application creation request carrying the universal resource key value information according to the universal resource capacity in each node, the method further includes:

[0022] When the graphics processor in the target node corresponding to the application creation request is in exclusive mode, obtaining a video memory capacity tag in the target node for parsing to obtain a single-card video memory capacity of the graphics processor in the target node, and adding the single-card video memory capacity of the graphics processor in the target node to the application creation request;

[0023] When the graphics processor of any node is in exclusive mode, a video memory capacity label representing the single-card video memory capacity of the graphics processor is added to the node.

[0024] Optionally, after determining the target node corresponding to the application creation request carrying the universal resource key value information according to the universal resource capacity in each node, the method further includes:

[0025] After resources are allocated in the target node for the application creation request, the general resource capacity of the target node is updated according to the general resource key value information included in the application creation request.

[0026] Optionally, before monitoring an application creation request from any user, the method further includes:

[0027] In response to the first adding operation, obtaining resource configuration information of a graphics processor in any shared mode, wherein the resource configuration information of the graphics processor in the shared mode includes a unit core computing power ratio and a unit video memory ratio;

[0028] The resource configuration information of the shared mode graphics processor is added to the resource mapping configuration file.

[0029] Optionally, before monitoring an application creation request from any user, the method further includes:

[0030] In response to the second adding operation, obtaining resource configuration information of any exclusive mode graphics processor, wherein the resource configuration information of the exclusive mode graphics processor includes a unit core computing power ratio;

[0031] Adding resource configuration information of the exclusive mode graphics processor to the resource mapping configuration file;

[0032] And in the resource mapping configuration file, a full identifier is added for the unit video memory ratio of the graphics processor in the exclusive mode, and the full identifier is used to represent the full video memory resources of the graphics processor in the exclusive mode.

[0033] Optionally, before monitoring an application creation request from any user, the method further includes:

[0034] In response to an expansion operation of a graphics processor on any node, the node obtains resource information reported by the graphics processor and adds the resource information to a capacity field;

[0035] Searching the resource mapping configuration file to see whether there is resource configuration information of the graphics processor;

[0036] When the resource configuration information of the graphics processor exists in the resource mapping configuration file, the general resource capacity corresponding to the graphics processor is generated according to the resource information reported by the graphics processor and the resource configuration information of the graphics processor, and the general resource capacity corresponding to the graphics processor is added to the capacity field of the node.

[0037] Optionally, when the resource configuration information of the graphics processor exists in the resource mapping configuration file, generating a general resource capacity corresponding to the graphics processor according to the resource information reported by the graphics processor and the resource configuration information of the graphics processor includes:

[0038] When the graphics processor is a shared mode graphics processor, the resource information reported by the graphics processor includes a core computing power value and a video memory value;

[0039] Obtaining a general computing capacity corresponding to the graphics processor according to a core computing power value in the resource information reported by the graphics processor and a unit core computing power ratio in the resource configuration information of the graphics processor;

[0040] Obtaining a general video memory capacity corresponding to the graphics processor according to a video memory value in the resource information reported by the graphics processor and a unit video memory ratio in the resource configuration information of the graphics processor;

[0041] The general computing power capacity and the general graphics memory capacity are used as the general resource capacity.

[0042] Optionally, when the resource configuration information of the graphics processor exists in the resource mapping configuration file, generating a general resource capacity corresponding to the graphics processor according to the resource information reported by the graphics processor and the resource configuration information of the graphics processor includes:

[0043] When the graphics processor is an exclusive mode graphics processor, the resource information reported by the graphics processor includes a core computing power value;

[0044] Obtaining a general computing capacity corresponding to the graphics processor according to a core computing power value in the resource information reported by the graphics processor and a unit core computing power ratio in the resource configuration information of the graphics processor;

[0045] The general computing power capacity is used as the general resource capacity.

[0046] Optionally, after generating the general resource capacity corresponding to the graphics processor according to the resource information reported by the graphics processor and the resource configuration information of the graphics processor, the method further includes:

[0047] When the graphics processor is an exclusive mode graphics processor, the resource information reported by the graphics processor does not include a video memory value. The node detects the single-card video memory capacity of the extended graphics processor and adds a video memory capacity tag representing the single-card video memory capacity of the graphics processor on the node.

[0048] Optionally, after searching the resource mapping configuration file for whether there is resource configuration information of the graphics processor, the method further includes:

[0049] When the resource configuration information of the graphics processor does not exist in the resource mapping configuration file, a prompt message is sent to the management client.

[0050] Optionally, the method further comprises:

[0051] When an abnormality of a graphics processor on any node is detected, the general resource capacity of the graphics processor in the capacity field of the node is removed.

[0052] Optionally, the method further comprises:

[0053] When it is detected that a graphics processor on any node is removed, the general resource capacity of the graphics processor in the capacity field of the node is removed.

[0054] In a second aspect, an embodiment of the present application provides a resource quota control device, which is applied to a container cluster management system, wherein the system includes multiple nodes, and the device includes:

[0055] A monitoring module, used to monitor an application creation request of any user, and obtain current resource key value information in the application creation request, wherein the current resource key value information is used to represent a resource request of any graphics processor corresponding to the application creation request;

[0056] a general resource key value information generation module, configured to generate general resource key value information corresponding to the current resource key value information according to a preset resource mapping configuration file, and add the general resource key value information to the application creation request, wherein the resource mapping configuration file stores resource configuration information of different graphics processors, and the resource configuration information includes a unit core computing power ratio and a unit video memory ratio;

[0057] The target node determination module is used to determine the target node corresponding to the application creation request carrying the general resource key value information according to the general resource capacity in each node, wherein the general resource capacity in any node is determined according to the resource information reported by the graphics processor of the node and the unit core computing power ratio and unit video memory ratio corresponding to the graphics processor in the resource mapping configuration file.

[0058] In a third aspect, an embodiment of the present application provides a container cluster management system, wherein the container cluster management system is used to execute the resource quota control method described in the first aspect of the embodiment.

[0059] In a fourth aspect, an embodiment of the present application provides a computer device, comprising: at least one processor, and a memory, wherein the memory stores a computer program that can be run on the processor, wherein when the processor executes the computer program, the resource quota control method described in the first aspect of the embodiment is executed.

[0060] In a fifth aspect, an embodiment of the present application provides a non-volatile readable storage medium, wherein the non-volatile readable storage medium stores a computer program, wherein when the computer program is executed by a processor, the resource quota control method described in the first aspect of the embodiment is executed.

[0061] In a sixth aspect, an embodiment of the present application provides a computer program product, including a computer program / instruction, which, when executed by a processor, implements the resource quota control method described in the first aspect of the embodiment.

[0062] Beneficial effects:

[0063] Listen to any user's application creation request, obtain current resource key value information in the application creation request, the current resource key value information is used to characterize the resource request of any graphics processor corresponding to the application creation request; generate general resource key value information corresponding to the current resource key value information according to a preset resource mapping configuration file, and add it to the application creation request, wherein the resource mapping configuration file stores resource configuration information of different graphics processors, and the resource configuration information includes a unit core computing power ratio and a unit video memory ratio; determine the target node corresponding to the application creation request carrying the general resource key value information according to the general resource capacity in each node, wherein the general resource capacity in any node is determined according to the resource information reported by the graphics processor of the node and the unit core computing power ratio and unit video memory ratio corresponding to the graphics processor in the resource mapping configuration file.

[0064] The method stores the unit core computing power ratio and unit video memory ratio of different graphics processors in a resource mapping configuration file, converts the resource information reported by the graphics processor in any node into a universal resource capacity according to the resource mapping configuration file, and allocates resources by generating universal resource key information corresponding to the current resource key information according to the resource mapping configuration file for the current resource key information representing the resource request for any graphics processor in the application creation request, thereby shielding the differences between graphics processors of different manufacturers and different models, and realizing unified setting and unified control of resource quotas of different graphics processors. BRIEF DESCRIPTION OF THE DRAWINGS

[0065] In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the following briefly introduces the drawings required for use in the embodiments or the description of the prior art.

[0066] Figure 1 A flowchart showing the steps of the resource quota control method provided by an embodiment of the present application is shown;

[0067] Figure 2 A schematic diagram of a resource quota control device provided in an embodiment of the present application is shown;

[0068] Figure 3 A schematic diagram of a computer device provided in an embodiment of the present application is shown;

[0069] Figure 4 A schematic diagram of a non-volatile readable storage medium provided in an embodiment of the present application is shown;

[0070] Figure 5 A schematic diagram of a computer program product provided by an embodiment of the present application is shown. DETAILED DESCRIPTION

[0071] The technical solutions in the embodiments of the present application will be described below in conjunction with the drawings in the embodiments of the present application.

[0072] To make the purpose, technical scheme and advantages of the embodiments of the present application clearer, each embodiment of the present application will be described in detail below in conjunction with the accompanying drawings. However, it will be appreciated by those skilled in the art that in each embodiment of the present application, many technical details are proposed in order to enable the reader to better understand the present application. However, even without these technical details and various changes and modifications based on the following embodiments, the technical scheme claimed in the present application can also be implemented. The division of the following embodiments is for the convenience of description, and the specific implementation of the present application should not constitute any limitation, and the various embodiments can be combined with each other and referenced to each other without contradiction.

[0073] K8S: kubernetes, a container cluster management system, is an open source container orchestration and scheduling platform.

[0074] Docker: is an open source application container engine that allows developers to package their applications and dependencies into a portable image and then publish it to any popular Linux or Windows operating system machine, and can also achieve virtualization;

[0075] k8s master: the node where the K8S management components are deployed in the K8S cluster, including the api server, kube-scheduler, controller-manager, etc.

[0076] k8s node: A node that does not deploy management components in a K8S cluster and is used to run workloads;

[0077] api-server: A module in the K8S cluster that provides external API (Application Programming Interface) services;

[0078] list-watch: K8S's unified asynchronous message processing mechanism can synchronize changes in K8S resource objects to the client in near real time, and ensure the reliability and sequence of messages.

[0079] GPU: Graphics Processing Unit, graphics processor;

[0080] Device plugin: The device plugin framework provided by K8S is used to publish hardware to K8S; the device plugin reports extended resources so that the container can identify and access these extended resources.

[0081] Kubernetes (K8S) is an open source platform for managing containerized applications on multiple hosts in a cloud platform. Based on Docker technology, it provides a series of complete functions such as deployment and operation, resource scheduling, service discovery, and dynamic scaling for containerized applications, improving the convenience of large-scale container cluster management. A K8S cluster is a collection of physical or virtual machines that are organized into a single computing resource pool and run the K8S platform on it. A K8S cluster usually includes a master node and multiple worker nodes. The master node is usually responsible for cluster management and control, while the worker node is responsible for running containerized applications.

[0082] K8S has complete cluster management capabilities, including multi-level security protection and access mechanisms, multi-tenant application support capabilities, transparent service registration and discovery mechanisms, built-in intelligent load balancer, powerful fault detection and self-repair capabilities, service rolling upgrades and online capacity expansion capabilities, scalable resource automatic scheduling mechanisms and multi-granularity resource quota management capabilities; at the same time, K8S provides complete management tools, covering all aspects including development, deployment testing, operation and maintenance monitoring.

[0083] As deep learning research gradually takes root and develops in various fields, a complete system from data acquisition to model training to model implementation is needed to reduce the computing resource cost of model training and shorten the model development cycle. Currently, major cloud service providers have launched their own deep learning cloud platforms, such as Amazon Sagemaker, Google GCP, Alibaba Cloud PAI, Baidu BML, Tencent TI-ONE, and Huawei ModelArts. These deep learning cloud platforms solve the problems of high computing resource costs, lack of a unified resource monitoring system, and the need for algorithm personnel to participate in operation and maintenance (such as building hardware and software environments) in the traditional training method on personal computers or servers. At the same time, these deep learning cloud platforms are based on K8S's unified resource monitoring and scheduling, which greatly improves the resource utilization of the computing center and effectively reduces the cost of model training.

[0084] GPU is a processor specifically designed to accelerate compute-intensive tasks such as image and video processing, 3D rendering, and scientific computing. Compared to traditional central processing units (CPUs), GPUs have more powerful processing capabilities and can process large amounts of data simultaneously and perform fast parallel calculations. GPUs were initially widely used in computer games and graphic design, but with the rise of compute-intensive applications such as artificial intelligence and machine learning, GPUs have also become an important part of high-performance computing and scientific computing.

[0085] The architecture of GPU is different from that of CPU. Its core design concept is to organize numerous computing units in parallel to achieve efficient parallel computing. Current GPUs can have thousands of computing units, each with its own memory and control unit, so that it can execute instructions independently. This highly parallel design enables GPUs to demonstrate high performance in fields such as scientific computing and machine learning. With the development of GPU technology, in order to better support applications such as scientific computing and machine learning, various GPU manufacturers have also developed a series of software and tools, such as CUDA, OpenCL, etc., so that developers can more conveniently use GPUs for programming and computing.

[0086] The quota function of K8S is implemented by resource quota; resource quota is a resource at the namespace layer that is used to control the total amount of resources that can be used by namespaces; for example:

[0087] api Version:v1

[0088] kind:ResourceQuota

[0089] metadata:

[0090] name: compute-resources

[0091] spec:

[0092] hard:

[0093] requests.cpu: "1"

[0094] requests.memory: 1Gi

[0095] limits.cpu: "2"

[0096] limits.memory: 2Gi

[0097] requests.nvidia.com / gpu: 4

[0098] The hard part is divided into request and limit. Request refers to the minimum amount of resources allocated to the pod by K8S. K8S will schedule the pod to a node with remaining resources greater than the request. Limit refers to the maximum amount of resources allocated to the pod by K8S. Resource requests exceeding this value in the pod will not be allocated. Pod is the smallest resource management component in K8S and is also the resource object that minimizes the running of containerized applications. That is, a pod represents a process running in the K8S cluster.

[0099] Currently, K8S supports computing resource quotas, storage resource quotas, and object quantity quotas. In addition to allocating computing resources such as CPU and memory resources, K8S 1.10 also adds support for extended resources. Extended resources are device plugins developed by various device manufacturers to add devices on the node, such as GPUs, as extended resources to the node capacity of the K8S node. Because over-allocation is not supported, its request and limit must be the same. Currently, its name must be prefixed with requests. If the resource name is nvidia.com / gpu, the format is as follows when defining the quota:

[0100] requests.nvidia.com / gpu:4.

[0101] The pod in K8S uses GPU mainly through the device plugin mechanism, which reports GPU as an extended resource of the K8S node.

[0102] For example, NVIDIA has launched an official plug-in nvidia-device-plugin for the exclusive mode of GPU, and the reported resource key value resourceKey is nvidia.com / gpu;

[0103] For example, NVIDIA can support the GPU sharing mode by enabling the mig mode. After enabling, the reported resource key value resourcekey becomes nvidia.cin / mig-1g.10gb, etc.; Alibaba Cloud has open-sourced the gpushare-device-plugin plug-in that supports GPU sharing, and the reported resource key value resourceKey is aliyun.com / gpu-mem; Tencent has open-sourced the gpumanager plug-in that supports GPU sharing, and its resource key value resourcekey is tencent.com / vcuda-core, tencent.com / vcuda-memory, etc.; other GPU manufacturers such as Cambrian, Tianshu and Moore Threads have also launched their own deviceplugin plug-ins, reporting resource key values ​​resourcekey with their own manufacturer information, such as cambricon.com / mlu-mem, etc., for pod application in K8S.

[0104] In addition, the value behind the resource key resourcekey has different meanings in different vendors’ implementations. For example:

[0105] tencent.com / vcuda-memory: 1 represents 256M video memory resources;

[0106] cambricon.com / mlu-mem: 1 represents 1GB video memory resources;

[0107] nvidia.com / mig-1g.10gb: 1 represents 14.56% of computing core resources and 10GB of video memory resources, etc.

[0108] Although the prosperity of the GPU ecosystem has accelerated the development of AI, from the perspective of a unified cloud management platform, the wide variety of GPU models and various resource key values ​​have brought challenges to the unified management of GPU resources.

[0109] As a cloud platform manager, it is difficult to shield the differences between various GPU hardware models and control the GPU resources used by multiple tenants on the cloud through unified resource quotas, just like managing CPU and memory.

[0110] For example, a cloud platform administrator can simply specify a CPU quota of 100 cores for an organization, which means that the organization can apply for a maximum of 100 cores of CPU resources when creating pods and other workloads. However, in the existing resource quota solution of K8S, cloud platform administrators cannot control the available quotas of GPU resources of various manufacturers and models by creating a unified key in the resource quota. With the rapid development of intelligent computing centers and AI applications, there will be more and more scenarios where multiple GPU models and manufacturers coexist in a single cluster, and cloud administrators have an increasingly strong demand for unified control of GPU resource quotas.

[0111] To solve the above problems, the present invention proposes a resource quota control method, which can shield the differences between GPUs of different manufacturers and different models, uniformly set and control the GPU resource quotas in the K8S cluster, support unified resource calculation of exclusive and shared GPU usage modes, and support compatibility with new GPU models by modifying configuration files. In the current scenario where supply chain relations are tense and various GPU models coexist in a single cluster, the method has high practicality.

[0112] Reference Figure 1 , shows a flow chart of the steps of a resource quota control method provided in an embodiment of the present application, the method is applied to a container cluster management system, i.e., a K8S cluster, the system includes multiple nodes, and the method may include the following steps:

[0113] S101: monitoring an application creation request of any user, and obtaining current resource key value information in the application creation request, wherein the current resource key value information is used to represent a resource request of any graphics processor corresponding to the application creation request.

[0114] When a user needs to create an application pod on a K8S cluster, the K8S cluster obtains the user's application creation request through the service interface API server. The application creation request carries the current resource key value information, namely, resourcekey; specifically, the request field of the pod request includes the computing power and / or video memory of the GPU requested to be allocated.

[0115] For example, the request field of pod request 1 may be: tencent.com / vcuda-memory:40; the request field of pod request 2 may be: cambricon.com / mlu-mem:10, etc.

[0116] However, because different manufacturers or different models of GPUs use different resource key values, the corresponding numerical meanings behind the resource key resourcekey are also not uniform. For example:

[0117] tencent.com / vcuda-memory: 1 represents 256M video memory resources;

[0118] cambricon.com / mlu-mem: 1 represents 1GB video memory resources;

[0119] Therefore, in order to facilitate the unified management of resources of different types of GPUs in the K8S cluster, it is first necessary to convert the current resource key value information in the application creation request into the corresponding universal resource key value information.

[0120] S102: Generate general resource key value information corresponding to the current resource key value information according to a preset resource mapping configuration file, and add the general resource key value information to the application creation request, wherein the resource mapping configuration file stores resource configuration information of different graphics processors, and the resource configuration information includes a unit core computing power ratio and a unit video memory ratio.

[0121] Specifically, a resource mapping configuration file, namely, resource-mapping-config, is created in advance, and resource configuration information of different GPUs is stored in the resource mapping configuration file. The resource configuration information includes a unit core computing power ratio and a unit video memory ratio.

[0122] In a feasible implementation, the process of pre-setting resource configuration information of different GPUs in the resource mapping configuration file may include:

[0123] In response to the first adding operation, resource configuration information of any shared mode graphics processor is obtained, wherein the resource configuration information of the shared mode graphics processor includes a unit core computing power ratio and a unit video memory ratio; and the resource configuration information of the shared mode graphics processor is added to the resource mapping configuration file.

[0124] In response to the second adding operation, resource configuration information of any exclusive mode graphics processor is obtained, wherein the resource configuration information of the exclusive mode graphics processor includes a unit core computing power ratio; the resource configuration information of the exclusive mode graphics processor is added to the resource mapping configuration file; and all identifiers are added to the resource mapping configuration file for the unit video memory ratio of the exclusive mode graphics processor, wherein the all identifiers are used to characterize all video memory resources of the exclusive mode graphics processor.

[0125] For a GPU in shared mode, in addition to allocating the core computing power of the GPU to multiple pods, you can also allocate the GPU's video memory space, while a GPU in exclusive mode can only be used by one pod.

[0126] For example, the data format of the resource mapping configuration file can be designed as follows:

[0127] common-core:

[0128] tencent.com / vcuda-core:1#When this resourcekey appears in a pod, 1 unit represents 1% of the single-card GPU computing core computing power

[0129] cambricon.com / mlu:100#When this resourocoey appears in the pod, 1 unit represents 100% of the single-card GPU computing core computing power

[0130] nvidia.com / gpu:100#When this resource key appears in the pod, 1 unit represents 100% of the single-card GPU computing core computing power

[0131] nvidia.com / mig-1g.10gb:15#When this resourcekey appears in the pod, 1 unit represents 15% of the single-card GPU computing core computing power

[0132] common-memory:

[0133] tencent.com / vcuda-memory:256#When this resourcekey appears in the pod, 1 unit represents 256MB of GPU memory resources

[0134] cambricon.com / mlu-mem:1024#When this resourcekey appears in the pod, 1 unit represents 1024MB of GPU memory resources

[0135] cambricon.com / mlu:all#When this resourcekey appears in a pod, 1 unit represents all the memory resources of the single GPU card of the node

[0136] nvidia.com / gpu: all#When this resourcekey appears in a pod, 1 unit represents all the memory resources of the single GPU card of the node

[0137] nvidia.com / mig-1g.10gb:10240#When this resourcekey appears in the pod, 1 unit represents 10240MB of GPU memory resources

[0138] When adding any new GPU configuration, the above data structure is used in the same way.

[0139] In the above resource mapping configuration file, taking tencent.com / vcuda-core:1 as an example, 1 is the unit core computing power ratio corresponding to the GPU, that is, 1 unit represents 1% of the single-card GPU computing core computing power; tencent.com / vcuda-memory:256, 256 is the unit video memory ratio corresponding to the GPU, that is, 1 unit represents 256MB of GPU video memory resources.

[0140] Since nvidia.com / gpu is an exclusive GPU, the unit core computing power ratio of its resource configuration information is 100, that is, 1 unit represents 100% of the single-card GPU computing core computing power. At this time, the unit video memory ratio of the GPU is marked with all, that is, in common-memory, nvidia.com / gpu is all, indicating that when this resouroekey appears in the pod, 1 unit represents all the video memory resources of the single-card GPU of the node.

[0141] In a feasible implementation manner, generating the universal resource key value information corresponding to the current resource key value information according to a preset resource mapping configuration file includes:

[0142] A1: When the current resource key information contains the core computing power request value and the video memory request value of any graphics processor, general core computing power request information is calculated according to the core computing power request value in the current resource key information and the unit core computing power ratio corresponding to the graphics processor; general video memory request information is calculated according to the video memory request value in the current resource key information and the unit video memory ratio corresponding to the graphics processor; the general core computing power request information and the general video memory request information are used as the general resource key information corresponding to the current resource key information.

[0143] A2: When the current resource key information contains a video memory request value of any graphics processor, general video memory request information is calculated based on the video memory request value in the current resource key information and the unit video memory ratio corresponding to the graphics processor; and the general video memory request information is used as the general resource key information corresponding to the current resource key information.

[0144] A3: When the current resource key value information contains the core computing power request value of any graphics processor, the general core computing power request information is calculated according to the core computing power request value in the current resource key value information and the unit core computing power ratio corresponding to the graphics processor; the general core computing power request information is used as the general resource key value information corresponding to the current resource key value information.

[0145] For example, when the request field of the pod request is: tencent.com / vcuda-memory:40, that is, the video memory request value contained in the current resource key value information of the request is 40, the resource mapping configuration file is searched, and the unit video memory ratio corresponding to the GPU is 256. Therefore, the product of the unit video memory ratio 256 and the video memory request value 40 is used as the general video memory request information, which is 10240. For example, the general video memory request information can be recorded as: gpu.commom / mem:10240, and the general video memory request information is used as the general resource key value information corresponding to the current resource key value information, and is added to the application creation request. Specifically, the general video memory request information: gpu.commom / mem:10240 is added to the request field of the pod request and attached to the current resource key value information tencent.com / vcuda-memory:40.

[0146] For example, when the request field of the pod request is: nvidia.com / mig-1g.10gb:1, the core computing power request value contained in the current resource key value information representing the request is 1, and the video memory request value is 1. Find the resource mapping configuration file, and in the resource mapping configuration file:

[0147] Common-core includes: nvidia.com / mig-1g.10gb:15;

[0148] common-memory includes: nvidia.com / mig-1g.10gb:10240;

[0149] That is, the unit core computing power ratio of the GPU is 15, and the unit memory ratio is 10240. Then, the product of the core computing power request value 1 and the unit core computing power ratio 15 is used as the general core computing power request information 15, and the general core computing power request information is recorded as: gpu.commom / core:15;

[0150] The product of the video memory request value 1 and the unit video memory ratio 10240 is used as the general video memory request information 10240, and the general video memory request information is recorded as: gpu.commom / mem:10240;

[0151] Then add the general core computing power request information gpu.commom / core:15 and the general video memory request information gpu.commom / mem:10240 to the request field of the pod request, and attach them after the current resource key value information tencent.com / vcuda-memory:40.

[0152] In this embodiment, by storing the unit core computing power ratio and unit video memory ratio of different graphics processors in a resource mapping configuration file, and then converting the current resource key value information of the application creation request into universal resource key value information according to the resource mapping configuration file, the differences in GPU manufacturers and models can be shielded, and the GPU resource quotas in the K8S cluster can be uniformly set and controlled.

[0153] S103: Determine the target node corresponding to the application creation request carrying the general resource key value information according to the general resource capacity in each node, wherein the general resource capacity in any node is determined according to the resource information reported by the graphics processor of the node and the unit core computing power ratio and unit video memory ratio corresponding to the graphics processor in the resource mapping configuration file.

[0154] The general resource capacity in any node is determined based on the resource information reported by the GPU of the node and the unit core computing power ratio and unit video memory ratio corresponding to the GPU in the resource mapping configuration file.

[0155] In a feasible implementation, when any node in the K8S cluster expands the GPU, the GPU will report resource information in a format defined by each manufacturer, and the resource information will be added to the capacity field of the node, such as the capacity field.

[0156] In order to facilitate the unification of resources of GPUs from different manufacturers and models, in this embodiment, when expanding a GPU, the general resource capacity corresponding to the GPU is generated based on the resource information reported by the GPU and the resource configuration information of the GPU in the resource mapping configuration file, and then the general resource capacity is also added to the capacity field of the node.

[0157] Specifically, in response to an expansion operation of a GPU on any node, the node obtains resource information reported by the GPU and adds it to a capacity field; and then searches the resource mapping configuration file to find out whether there is resource configuration information of the GPU.

[0158] When the resource configuration information of the GPU does not exist in the resource mapping configuration file, a prompt message is sent to the management client; that is, the resource configuration information of the GPU including the unit core computing power ratio and the unit video memory ratio has not been set, and the administrator can be prompted to set them in time.

[0159] When the resource configuration information of the GPU exists in the resource mapping configuration file, the general resource capacity corresponding to the GPU is generated according to the resource information reported by the GPU and the resource configuration information of the GPU, and the general resource capacity corresponding to the GPU is added to the capacity field of the node.

[0160] For example, when the GPU is a GPU in shared mode, the resource information reported by the GPU includes a core computing power value and a video memory value; the general computing power capacity corresponding to the GPU is obtained based on the core computing power value in the resource information reported by the GPU and the unit core computing power ratio in the resource configuration information of the GPU; the general video memory capacity corresponding to the GPU is obtained based on the video memory value in the resource information reported by the GPU and the unit video memory ratio in the resource configuration information of the GPU; the general computing power capacity and the general video memory capacity are used as the general resource capacity.

[0161] For example, if the resource information reported by GPU1 is: tencent.com / vcuda-core:100, tencent.com / vcuda-mem:160, then the core computing power value of GPU1 is 100, and the video memory value is 160; search in the resource mapping configuration file, and you will find:

[0162] Common-core includes: tencent.com / vcuda-core:1;

[0163] Common-memory includes: tencent.com / vcuda-memory:256;

[0164] That is, the unit core computing power ratio in the resource configuration information of GPU1 is 1, the unit video memory ratio is 256, and the general computing power capacity is 100, which is the product of the unit core computing power ratio 1 and the core computing power value of 100;

[0165] The general video memory capacity is 40960, based on the product of the unit video memory ratio of 256 and the video memory value of 160;

[0166] Then, add the general computing capacity gpu.commom / core: 100 and the general video memory capacity 40960 as general resource capacities in the capacity field of the node.

[0167] When the GPU is in exclusive mode, the resource information reported by the GPU may only include the core computing power value. Because it is in exclusive mode, the video memory space of the GPU will be occupied by a pod. The general computing power capacity corresponding to the GPU can be obtained based on the core computing power value in the resource information reported by the GPU and the unit core computing power ratio in the resource configuration information of the GPU; the general computing power capacity is used as the general resource capacity.

[0168] For example, if the resource information reported by GPU2 is: nvidia.com / gpu:1, then the core computing power value of GPU2 is 1. According to the resource mapping configuration file, there is:

[0169] Common-core includes: nvidia.com / gpu:100;

[0170] That is, the unit core computing power ratio in the resource configuration information of GPU2 is 100. The product of the unit core computing power ratio 100 and the core computing power value of 1 is used as the general computing power capacity of 100. Then, the general computing power capacity gpu.commom / core:100 is added as the general resource capacity in the capacity field of the node.

[0171] The common-memory in the resource mapping configuration file includes nvidia.com / gpu:all, where all is the all identifier, that is, GPU2 is an exclusive mode GPU, which occupies all the video memory resources of a single-card GPU.

[0172] Because the GPU in exclusive mode does not report the size of the video memory space, although all the video memory resources of all single-card GPUs are allocated when allocating the GPU in exclusive mode, the specific single-card video memory capacity of the GPU is unknown. Therefore, in a feasible implementation, the method further includes:

[0173] When the GPU is an exclusive mode GPU, the resource information reported by the GPU does not include a video memory value. The node detects the single-card video memory capacity of the extended GPU and adds a video memory capacity tag representing the single-card video memory capacity of the GPU on the node.

[0174] In the actual implementation process, a GPU detection module, such as gpu-detect-daemonset, can be deployed in the K8S cluster. The GPU detection module runs on each node of the K8S cluster in the form of daemonset. The single-card video memory of the GPU in the node can be marked on the node resources of the K8S cluster in the form of a label, such as in the metadata of the node, for example, gpu.common / unit.mem:40960, which means that the single-card video memory of the GPU of the node is 40G.

[0175] In the actual implementation process, the GPU detection module can monitor whether any node includes a GPU in exclusive mode, obtain the GPU in exclusive mode, and add a video memory capacity label representing the single-card video memory capacity of the GPU to the node.

[0176] In addition to adding the general resource capacity of the GPU to the capacity field of the node when expanding the GPU, in this embodiment, when a GPU abnormality is detected on any node, the general resource capacity of the GPU in the capacity field of the node can be removed; when a GPU on any node is detected to be removed, the general resource capacity of the GPU in the capacity field of the node can be removed; this indicates that the GPU cannot participate in the quota process of the K8S cluster.

[0177] Based on the native resource expansion mechanism and quota control mechanism of the K8S cluster, the target node corresponding to the application creation request carrying the universal resource key-value information can be determined according to the universal resource key-value information and the universal resource capacity in each node; for example, the universal resource key-value information in the application creation request can be compared with the universal resource capacity on any node, and then the application creation request can be allocated to the node with sufficient resources.

[0178] After determining the target node corresponding to the application creation request, when the GPU in the target node corresponding to the application creation request is in exclusive mode, the video memory capacity label is obtained in the target node for parsing to obtain the single-card video memory capacity of the GPU in the target node, and the single-card video memory capacity of the GPU in the target node is added to the application creation request; thereby, for the GPU in exclusive mode, the value of the video memory capacity of the single-card GPU can be accurately obtained.

[0179] After resources are allocated to the application creation request in the target node, the general resource capacity in the capacity field of the target node is updated according to the general resource key information included in the application creation request; for example, if target node A allocates resources to the application creation request, the resources allocated according to the general resource key information corresponding to the application creation request can be deducted from the general resource capacity of target node A.

[0180] In the actual implementation process, the following design process can be included in advance when implementing this method:

[0181] 1. Design a resource mapping configuration file resource-mapping-config, which is deployed in the K8S cluster and is used to store the resource configuration information of each GPU. The resource configuration information includes the unit core computing power ratio and the unit video memory ratio;

[0182] 2. Design GPU detection module:

[0183] The GPU detection module is deployed in the K8S cluster and runs in each K8S node in the form of daemonset. Daemonset is a native K8S object that is designed to ensure that a pod runs on each working node. This module is mainly responsible for detecting whether any node has an exclusive GPU installed, and marking the single-card video memory capacity of the exclusive GPU on the node in the form of a video memory capacity label. For example, the video memory capacity label is as follows:

[0184] gpu.common / unit.mem: 40960, indicating that the single-card video memory of the GPU of this node is 40G;

[0185] For nodes with a single-card video memory label, when the pod completes node selection, the video memory resource size corresponding to the single exclusive GPU card requested by the pod can be obtained.

[0186] 3. Design request monitoring modules, such as the gpu-quota-webhook module;

[0187] The request monitoring module is deployed in the K8S cluster and registered on the K8S API server in the form of webhook to monitor the creation or modification events of pods;

[0188] The main functions of this module include the following two points:

[0189] 1) Monitor the request field of the pod request and obtain the current resource key value information of the request field; according to the resource mapping configuration file resource-mapping-config, convert the current resource key value information into universal resource key value information and append it to the request field of the pod request;

[0190] 2) Parse the memory capacity label on the node. When the GPU is in exclusive mode, obtain the memory capacity label in the node for parsing to obtain the single-card memory capacity of the GPU. Add the single-card memory capacity of the GPU to the request field of the pod request, that is, add it to the application creation request.

[0191] 4. Design node control modules, such as gpu-node-controller module;

[0192] The node control module is deployed in the K8S cluster and monitors the update events of the node resources of the K8S cluster through the list-watch method. When the GPU expansion on the node is monitored, the general resource capacity corresponding to the GPU is generated according to the resource configuration information of the GPU, and the general resource capacity corresponding to the GPU is added to the capacity field of the node, such as adding it to the capacity field.

[0193] For example, when the GPU resource configuration information already exists in the resource mapping configuration file, add gpu.common / core: 99999, gpu.common / mem: 999999999 to the capacity field of the node, and set the maximum value so that the common resources will not affect the normal scheduling logic of the pod of the K8S cluster;

[0194] When the GPU card of a node is detected to be abnormal or removed, the general resource capacity is automatically removed from the capacity field.

[0195] This method has at least the following beneficial effects:

[0196] 1. This method can support GPU resources reported by different GPU manufacturers and different types of GPU deviceplugin plug-ins, shielding the differences between GPUs of different manufacturers and different models, and realizing unified setting and unified control of GPU resource quotas in the K8S cluster;

[0197] 2. It can support unified control of GPU resources in both exclusive and shared modes;

[0198] 3. Add the video memory capacity label of the single-card video memory capacity of the exclusive mode GPU to the node, so that the video memory size corresponding to each exclusive mode GPU card can be dynamically obtained, and the video memory quota of the exclusive mode GPU can be accurately calculated;

[0199] 4. When expanding a new GPU, you only need to add it in the resource mapping configuration file without modifying the code, which is convenient for GPU expansion;

[0200] 5. The entire solution does not require modifying the source code of the K8S cluster. It can be completed using the K8S native resource expansion mechanism and quota control mechanism. It is non-invasive to the K8S cluster itself and easy to upgrade and maintain.

[0201] Reference Figure 2 , shows a schematic diagram of a resource quota control device provided in an embodiment of the present application, which is applied to a container cluster management system, wherein the system includes multiple nodes, and the device includes:

[0202] A monitoring module 100 is used to monitor an application creation request of any user and obtain current resource key value information in the application creation request, where the current resource key value information is used to represent a resource request of any graphics processor corresponding to the application creation request;

[0203] A general resource key value information generation module 200, configured to generate general resource key value information corresponding to the current resource key value information according to a preset resource mapping configuration file, and add the general resource key value information to the application creation request, wherein the resource mapping configuration file stores resource configuration information of different graphics processors, and the resource configuration information includes a unit core computing power ratio and a unit video memory ratio;

[0204] The target node determination module 300 is used to determine the target node corresponding to the application creation request carrying the general resource key value information based on the general resource capacity in each node, wherein the general resource capacity in any node is determined based on the resource information reported by the graphics processor of the node and the unit core computing power ratio and unit video memory ratio corresponding to the graphics processor in the resource mapping configuration file.

[0205] Optionally, the general resource key value information generation module includes:

[0206] A first generating unit is configured to calculate and obtain general core computing power request information according to the core computing power request value in the current resource key information and the unit core computing power ratio corresponding to the graphics processor when the current resource key information contains a core computing power request value and a video memory request value of any graphics processor;

[0207] Calculate and obtain general video memory request information according to the video memory request value in the current resource key value information and the unit video memory ratio corresponding to the graphics processor;

[0208] The general core computing power request information and the general graphics memory request information are used as the general resource key value information corresponding to the current resource key value information.

[0209] Optionally, the general resource key value information generation module includes:

[0210] A second generating unit is configured to calculate and obtain general video memory request information according to the video memory request value in the current resource key information and the unit video memory ratio corresponding to the graphics processor when the current resource key information contains a video memory request value of any graphics processor;

[0211] The general video memory request information is used as the general resource key information corresponding to the current resource key information.

[0212] Optionally, the general resource key value information generation module includes:

[0213] A third generating unit is configured to calculate and obtain general core computing power request information according to the core computing power request value in the current resource key value information and the unit core computing power ratio corresponding to the graphics processor when the current resource key value information contains the core computing power request value of any graphics processor;

[0214] The general core computing power request information is used as the general resource key value information corresponding to the current resource key value information.

[0215] Optionally, the device further comprises:

[0216] a label parsing module, configured to obtain a video memory capacity label in the target node for parsing when the graphics processor in the target node corresponding to the application creation request is in exclusive mode, obtain the single-card video memory capacity of the graphics processor in the target node, and add the single-card video memory capacity of the graphics processor in the target node to the application creation request;

[0217] When the graphics processor of any node is in exclusive mode, a video memory capacity label representing the single-card video memory capacity of the graphics processor is added to the node.

[0218] Optionally, the device further comprises:

[0219] The updating module is used to update the general resource capacity of the target node according to the general resource key value information included in the application creation request after allocating resources for the application creation request in the target node.

[0220] Optionally, the device further comprises:

[0221] A first adding module, configured to obtain resource configuration information of a graphics processor in any shared mode in response to a first adding operation, wherein the resource configuration information of the graphics processor in the shared mode includes a unit core computing power ratio and a unit video memory ratio;

[0222] The resource configuration information of the shared mode graphics processor is added to the resource mapping configuration file.

[0223] Optionally, the device further comprises:

[0224] A second adding module is used to obtain resource configuration information of any exclusive mode graphics processor in response to a second adding operation, wherein the resource configuration information of the exclusive mode graphics processor includes a unit core computing power ratio;

[0225] Adding resource configuration information of the exclusive mode graphics processor to the resource mapping configuration file;

[0226] And in the resource mapping configuration file, a full identifier is added for the unit video memory ratio of the graphics processor in the exclusive mode, and the full identifier is used to represent the full video memory resources of the graphics processor in the exclusive mode.

[0227] Optionally, the device further comprises:

[0228] An expansion module, used for responding to an expansion operation of a graphics processor on any node, the node obtaining resource information reported by the graphics processor and adding it to a capacity field;

[0229] Searching the resource mapping configuration file to see whether there is resource configuration information of the graphics processor;

[0230] When the resource configuration information of the graphics processor exists in the resource mapping configuration file, the general resource capacity corresponding to the graphics processor is generated according to the resource information reported by the graphics processor and the resource configuration information of the graphics processor, and the general resource capacity corresponding to the graphics processor is added to the capacity field of the node.

[0231] Optionally, the expansion module includes:

[0232] A first expansion unit, configured to, when the graphics processor is a graphics processor in a shared mode, include a core computing power value and a video memory value in the resource information reported by the graphics processor;

[0233] Obtaining a general computing capacity corresponding to the graphics processor according to a core computing power value in the resource information reported by the graphics processor and a unit core computing power ratio in the resource configuration information of the graphics processor;

[0234] Obtaining a general video memory capacity corresponding to the graphics processor according to a video memory value in the resource information reported by the graphics processor and a unit video memory ratio in the resource configuration information of the graphics processor;

[0235] The general computing power capacity and the general graphics memory capacity are used as the general resource capacity.

[0236] Optionally, the expansion module includes:

[0237] A second expansion unit is used for, when the graphics processor is a graphics processor in exclusive mode, the resource information reported by the graphics processor includes a core computing power value;

[0238] Obtaining a general computing capacity corresponding to the graphics processor according to a core computing power value in the resource information reported by the graphics processor and a unit core computing power ratio in the resource configuration information of the graphics processor;

[0239] The general computing power capacity is used as the general resource capacity.

[0240] Optionally, the device further comprises:

[0241] The label adding module is used for, when the graphics processor is an exclusive mode graphics processor, the resource information reported by the graphics processor does not include a video memory value, the node detects the single-card video memory capacity of the extended graphics processor, and adds a video memory capacity label representing the single-card video memory capacity of the graphics processor on the node.

[0242] Optionally, the device further comprises:

[0243] The prompt module is used to send prompt information to the management client when the resource configuration information of the graphics processor does not exist in the resource mapping configuration file.

[0244] Optionally, the device further comprises:

[0245] The first monitoring unit is used to remove the general resource capacity of the graphics processor in the capacity field of the node when monitoring that the graphics processor on any node is abnormal.

[0246] Optionally, the device further comprises:

[0247] The second monitoring unit is used to remove the general resource capacity of the graphics processor in the capacity field of the node when monitoring that the graphics processor on any node is removed.

[0248] An embodiment of the present application also provides a container cluster management system, namely a K8S cluster, which is used to execute the resource quota control method as described in the embodiment.

[0249] Reference Figure 3 , shows a schematic diagram of a computer device provided in an embodiment of the present application, including: at least one processor 301, and a memory 302, wherein the memory 302 stores a computer program that can be executed on the processor 301, wherein the processor 301 executes the resource quota control method described in the embodiment when executing the computer program.

[0250] Reference Figure 4 , shows a schematic diagram of a non-volatile readable storage medium provided in an embodiment of the present application, wherein the non-volatile readable storage medium 400 stores a computer program 401, wherein the computer program 401, when executed by a processor, executes the resource quota control method described in the embodiment.

[0251] Reference Figure 5 , showing a schematic diagram of a computer program product provided in an embodiment of the present application, the computer program product 500 includes a computer program / instruction 501, and the computer program / instruction 501, when executed by a processor, implements the resource quota control method described in the embodiment.

Claims

1. A resource quota control method, It is characterized in that Applied to a container cluster management system, the system includes multiple nodes, and the method includes: Listening to an application creation request of any user, obtaining current resource key value information in the application creation request, wherein the current resource key value information is used to represent a resource request of any graphics processor corresponding to the application creation request; Generate general resource key information corresponding to the current resource key information according to a preset resource mapping configuration file, and add the general resource key information to the application creation request, wherein the resource mapping configuration file stores resource configuration information of different graphics processors, and the resource configuration information includes a unit core computing power ratio and a unit video memory ratio; According to the general resource capacity in each node, determine the target node corresponding to the application creation request carrying the general resource key value information, wherein the general resource capacity in any node is determined based on the resource information reported by the graphics processor of the node and the unit core computing power ratio and unit video memory ratio corresponding to the graphics processor in the resource mapping configuration file.

2. The method according to claim 1, It is characterized in that Generate the common resource key value information corresponding to the current resource key value information according to the preset resource mapping configuration file, including: When the current resource key information contains a core computing power request value and a video memory request value of any graphics processor, general core computing power request information is calculated according to the core computing power request value in the current resource key information and the unit core computing power ratio corresponding to the graphics processor; Calculate and obtain general video memory request information according to the video memory request value in the current resource key value information and the unit video memory ratio corresponding to the graphics processor; The general core computing power request information and the general graphics memory request information are used as the general resource key value information corresponding to the current resource key value information.

3. The method according to claim 1, It is characterized in that Generate the common resource key value information corresponding to the current resource key value information according to the preset resource mapping configuration file, including: When the current resource key information includes a video memory request value of any graphics processor, general video memory request information is calculated according to the video memory request value in the current resource key information and the unit video memory ratio corresponding to the graphics processor; The general video memory request information is used as the general resource key information corresponding to the current resource key information.

4. The method according to claim 1, It is characterized in that Generate the common resource key value information corresponding to the current resource key value information according to the preset resource mapping configuration file, including: When the current resource key value information includes a core computing power request value of any graphics processor, general core computing power request information is calculated according to the core computing power request value in the current resource key value information and the unit core computing power ratio corresponding to the graphics processor; The general core computing power request information is used as the general resource key value information corresponding to the current resource key value information.

5. The method according to claim 1, It is characterized in that After determining the target node corresponding to the application creation request carrying the universal resource key value information according to the universal resource capacity in each node, the method further includes: When the graphics processor in the target node corresponding to the application creation request is in exclusive mode, obtaining a video memory capacity tag in the target node for parsing to obtain a single-card video memory capacity of the graphics processor in the target node, and adding the single-card video memory capacity of the graphics processor in the target node to the application creation request; When the graphics processor of any node is in exclusive mode, a video memory capacity label representing the single-card video memory capacity of the graphics processor is added to the node.

6. The method according to claim 1, It is characterized in that After determining the target node corresponding to the application creation request carrying the universal resource key value information according to the universal resource capacity in each node, the method further includes: After resources are allocated in the target node for the application creation request, the general resource capacity of the target node is updated according to the general resource key value information included in the application creation request.

7. The method according to claim 1, It is characterized in that Before monitoring any user's application creation request, the method further includes: In response to the first adding operation, obtaining resource configuration information of a graphics processor in any shared mode, wherein the resource configuration information of the graphics processor in the shared mode includes a unit core computing power ratio and a unit video memory ratio; The resource configuration information of the shared mode graphics processor is added to the resource mapping configuration file.

8. The method according to claim 1, It is characterized in that Before monitoring any user's application creation request, the method further includes: In response to the second adding operation, obtaining resource configuration information of any exclusive mode graphics processor, wherein the resource configuration information of the exclusive mode graphics processor includes a unit core computing power ratio; Adding resource configuration information of the exclusive mode graphics processor to the resource mapping configuration file; And in the resource mapping configuration file, a full identifier is added for the unit video memory ratio of the graphics processor in the exclusive mode, and the full identifier is used to represent the full video memory resources of the graphics processor in the exclusive mode.

9. The method according to claim 1, It is characterized in that Before monitoring any user's application creation request, the method further includes: In response to an expansion operation of a graphics processor on any node, the node obtains resource information reported by the graphics processor and adds the resource information to a capacity field; Searching the resource mapping configuration file to see whether there is resource configuration information of the graphics processor; When the resource configuration information of the graphics processor exists in the resource mapping configuration file, the general resource capacity corresponding to the graphics processor is generated according to the resource information reported by the graphics processor and the resource configuration information of the graphics processor, and the general resource capacity corresponding to the graphics processor is added to the capacity field of the node.

10. The method according to claim 9, It is characterized in that When the resource configuration information of the graphics processor exists in the resource mapping configuration file, generating a general resource capacity corresponding to the graphics processor according to the resource information reported by the graphics processor and the resource configuration information of the graphics processor includes: When the graphics processor is a shared mode graphics processor, the resource information reported by the graphics processor includes a core computing power value and a video memory value; Obtaining a general computing capacity corresponding to the graphics processor according to a core computing power value in the resource information reported by the graphics processor and a unit core computing power ratio in the resource configuration information of the graphics processor; Obtaining a general video memory capacity corresponding to the graphics processor according to a video memory value in the resource information reported by the graphics processor and a unit video memory ratio in the resource configuration information of the graphics processor; The general computing power capacity and the general graphics memory capacity are used as the general resource capacity.

11. The method according to claim 9, It is characterized in that When the resource configuration information of the graphics processor exists in the resource mapping configuration file, generating a general resource capacity corresponding to the graphics processor according to the resource information reported by the graphics processor and the resource configuration information of the graphics processor includes: When the graphics processor is an exclusive mode graphics processor, the resource information reported by the graphics processor includes a core computing power value; Obtaining a general computing capacity corresponding to the graphics processor according to a core computing power value in the resource information reported by the graphics processor and a unit core computing power ratio in the resource configuration information of the graphics processor; The general computing power capacity is used as the general resource capacity.

12. The method according to claim 9, It is characterized in that After generating the general resource capacity corresponding to the graphics processor according to the resource information reported by the graphics processor and the resource configuration information of the graphics processor, the method further includes: When the graphics processor is an exclusive mode graphics processor, the resource information reported by the graphics processor does not include a video memory value. The node detects the single-card video memory capacity of the extended graphics processor and adds a video memory capacity tag representing the single-card video memory capacity of the graphics processor on the node.

13. The method according to claim 9, It is characterized in that After searching the resource mapping configuration file for whether there is resource configuration information of the graphics processor, the method further includes: When the resource configuration information of the graphics processor does not exist in the resource mapping configuration file, a prompt message is sent to the management client.

14. The method according to claim 9, It is characterized in that The method further comprises: When an abnormality of a graphics processor on any node is detected, the general resource capacity of the graphics processor in the capacity field of the node is removed.

15. The method according to claim 9, It is characterized in that The method further comprises: When it is detected that a graphics processor on any node is removed, the general resource capacity of the graphics processor in the capacity field of the node is removed.

16. A resource quota control device, It is characterized in that Applied to a container cluster management system, the system includes multiple nodes, and the device includes: A monitoring module, used to monitor an application creation request of any user, and obtain current resource key value information in the application creation request, wherein the current resource key value information is used to represent a resource request of any graphics processor corresponding to the application creation request; a general resource key value information generation module, configured to generate general resource key value information corresponding to the current resource key value information according to a preset resource mapping configuration file, and add the general resource key value information to the application creation request, wherein the resource mapping configuration file stores resource configuration information of different graphics processors, and the resource configuration information includes a unit core computing power ratio and a unit video memory ratio; The target node determination module is used to determine the target node corresponding to the application creation request carrying the general resource key value information according to the general resource capacity in each node, wherein the general resource capacity in any node is determined according to the resource information reported by the graphics processor of the node and the unit core computing power ratio and unit video memory ratio corresponding to the graphics processor in the resource mapping configuration file.

17. A container cluster management system, It is characterized in that The container cluster management system is used to execute the resource quota control method described in any one of claims 1-15.

18. A computer device, It is characterized in that include: At least one processor, and a memory, wherein the memory stores a computer program that can be run on the processor, wherein the processor executes the resource quota control method described in any one of claims 1-15 when executing the computer program.

19. A non-volatile readable storage medium, It is characterized in that The non-volatile readable storage medium stores a computer program, wherein the computer program, when executed by a processor, executes the resource quota control method according to any one of claims 1 to 15.

20. A computer program product comprising a computer program / instructions, It is characterized in that When the computer program / instruction is executed by a processor, the resource quota control method described in any one of claims 1-15 is implemented.

Citation Information

Patent Citations

  • GPU virtualization and resource scheduling method and device

    CN111930522A

  • Resource scheduling method and device, electronic equipment and storage medium

    CN116414561A