Resource allocation method and device and resource scheduling method and device
By obtaining the scheduler's scheduling task information and determining the target graphics processor in the container cluster management system, the problem of low GPU resource allocation efficiency is solved, and the effect of improving GPU performance and utilization is achieved.
Patent Information
- Application Number
- CN202411764545.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-12-03
- Publication Date
- 2025-04-18
AI Technical Summary
In container cluster management systems, how to effectively allocate GPU resources to improve GPU performance and utilization, especially in edge reasoning scenarios.
By obtaining the scheduler's scheduling task information, determining the container information and the number of GPUs of the container group to be allocated, determining the memory access group of the target central processor based on the container information, and determining the target graphics processor based on the quantity and memory access group, and allocating the target graphics processor for the container group to be allocated.
By arranging the target graphics processor and the central processor to the same memory access group, the bandwidth and latency are improved, allowing the target graphics processor to access data faster, reducing data transmission bottlenecks, and improving the overall computing power of the container cluster management system.
Smart Images

Figure CN119847725A_ABST
Abstract
Description
Technical Field
[0001] The present disclosure relates to the field of information technology, specifically to technical fields such as cloud computing, and in particular to a resource allocation method and device, a resource scheduling method and device, an electronic device, a computer-readable storage medium, and a computer program product. Background Art
[0002] In an open source container cluster management system such as the Kubernetes cluster, containerized applications can be deployed simply and efficiently, and specific resources on the host can be managed through device plug-ins, such as allocating graphics processing unit (GPU) resources and managing the GPUs on each container in the system.
[0003] Among them, when allocating GPU resources, how to allocate one or more GPU resources to the containers in the system so that the performance of the GPU can be best utilized and the utilization rate of the GPU resources can be improved is a relatively important issue. Summary of the invention
[0004] The present disclosure provides a resource allocation method and apparatus, an electronic device, a computer-readable storage medium, and a computer program product.
[0005] According to a first aspect, a resource allocation method is provided, the method comprising: after creating a container group to be allocated, obtaining scheduling task information of a scheduler; determining container information of the container group to be allocated and the number of graphics processors to be allocated based on the scheduling task information; determining a memory access group of a target central processing unit based on the container information; determining a target graphics processor based on the number and the memory access group, and allocating the target graphics processor to the container group to be allocated.
[0006] According to a second aspect, a resource scheduling method is provided, the method comprising: receiving business demand information of a container group to be allocated; determining the number of graphics processors to be allocated and container information of the container group to be allocated based on the business demand information; determining a target node based on the container information and the number; generating scheduling task information based on the container information and the number; and sending the scheduling task information to the target node.
[0007] According to a third aspect, a resource allocation device is provided, the device comprising: an acquisition unit, configured to acquire scheduling task information of a scheduler after creating a container group to be allocated; an information determination unit, configured to determine container information of the container group to be allocated and the number of graphics processors to be allocated based on the scheduling task information; a topology determination unit, configured to determine a memory access group of a target central processing unit based on the container information; an allocation unit, configured to determine a target graphics processor based on the number and the memory access group, and allocate the target graphics processor to the container group to be allocated.
[0008] According to a fourth aspect, a resource scheduling device is provided, which includes: a receiving unit, configured to receive business demand information of a container group to be allocated; a business determination unit, configured to determine the number of graphics processors to be allocated and the container information of the container group to be allocated based on the business demand information; a node determination unit, configured to determine a target node based on the container information and the number; a task determination unit, configured to generate scheduling task information based on the container information and the number; and a sending unit, configured to send the scheduling task information to the target node.
[0009] According to the fifth aspect, an electronic device is provided, which includes: at least one processor; and a memory communicatively connected to the at least one processor, wherein the memory stores instructions executable by the at least one processor, and the instructions are executed by the at least one processor so that the at least one processor can execute the method described in any implementation of the first aspect or the second aspect.
[0010] According to a sixth aspect, a non-transitory computer-readable storage medium storing computer instructions is provided, wherein the computer instructions are used to cause a computer to execute the method described in any implementation of the first aspect or the second aspect.
[0011] According to a seventh aspect, a computer program product is provided, comprising a computer program, which, when executed by a processor, implements the method described in any implementation of the first aspect or the second aspect.
[0012] The resource allocation method and device provided by the embodiments of the present disclosure first obtain the scheduling task information of the scheduler after creating the container group to be allocated; secondly, based on the scheduling task information, determine the container information of the container group to be allocated and the number of graphics processors to be allocated; then, based on the container information, determine the memory access group of the target central processor; finally, based on the number and the memory access group, determine the target graphics processor, and allocate the target graphics processor to the container group to be allocated. Thus, by determining the target graphics processor based on the memory access group of the central processor, the determined target graphics processor and the central processor can belong to the same memory access group, which improves bandwidth and reduces latency, enables the target graphics processor to access data faster, reduces data transmission bottlenecks, and improves the overall computing power of the container cluster management system.
[0013] The resource scheduling method and device provided by the embodiments of the present disclosure first receive the business demand information of the container group to be allocated; secondly, based on the business demand information, determine the number of graphics processors to be allocated and the container information of the container group to be allocated; thirdly, determine the target node based on the container information and the number; then, generate the scheduling task information based on the container information and the number; finally, send the scheduling task information to the target node. Thus, the scheduling task information generated based on the container information and the number can enable the target node to determine the container information of the container to be allocated, so that when the target node performs resource allocation, resources belonging to the same memory access group can be allocated, reducing the data transmission bottleneck and improving the overall computing power of the container cluster management system.
[0014] It should be understood that the content described in this section is not intended to identify the key or important features of the embodiments of the present disclosure, nor is it intended to limit the scope of the present disclosure. Other features of the present disclosure will become easily understood through the following description. BRIEF DESCRIPTION OF THE DRAWINGS
[0015] The accompanying drawings are used to better understand the present solution and do not constitute a limitation of the present disclosure.
[0016] Figure 1 is a flow chart of an embodiment of a resource allocation method according to the present disclosure;
[0017] Figure 2 is a schematic diagram of the internal structure of the target node of the present disclosure;
[0018] Figure 3 is a flow chart of an embodiment of a resource scheduling method according to the present disclosure;
[0019] Figure 4 is a schematic diagram of the connection relationship between the scheduler, target node and application programming interface server disclosed in the present invention;
[0020] Figure 5 is a structural schematic diagram of an embodiment of a resource allocation device according to the present disclosure;
[0021] Figure 6 is a structural schematic diagram of an embodiment of a resource scheduling device according to the present disclosure;
[0022] Figure 7 It is a block diagram of an electronic device used to implement the resource allocation method and resource scheduling method of the embodiments of the present disclosure. DETAILED DESCRIPTION
[0023] The following is a description of exemplary embodiments of the present disclosure in conjunction with the accompanying drawings, including various details of the embodiments of the present disclosure to facilitate understanding, which should be considered as merely exemplary. Therefore, it should be recognized by those of ordinary skill in the art that various changes and modifications may be made to the embodiments described herein without departing from the scope and spirit of the present disclosure. Similarly, for the sake of clarity and conciseness, descriptions of well-known functions and structures are omitted in the following description.
[0024] In the era of AI (Artificial Intelligence), improving GPU computing performance has become an important issue to support large-scale deep learning, reasoning and generation tasks. In GPU computing, data needs to be transferred between the CPU (Central Processing Unit) and the GPU, which involves H2D and D2H memory copying. H2D and D2H represent the memory copying operation between the GPU and the CPU. H2D is the abbreviation of Host to Device, which means copying the memory from the CPU (Host) to the GPU device; D2H is the abbreviation of Device to Host, which means copying the memory from the GPU device back to the CPU.
[0025] When the GPU accesses nodes and memory of the near-end memory access group (non-uniform memory access, non-uniform memory access architecture), the bandwidth performance is good; when the GPU accesses nodes and memory of the far-end CPU memory access group, the H2D or D2H bandwidth will be reduced to varying degrees. On some platforms, the performance of GPU access across memory access groups is only half of the performance of access within the same memory access group.
[0026] In the edge computing scenario, resources are occupied by Pod (container group) of open source container cluster management system, such as Kubernetes (K8s for short), to realize resource allocation for virtual machines. K8s is an open source component for automatically deploying, scaling and managing (generally referred to as management) containerized applications. It combines the containers that make up the application into logical units for easy management and service discovery. K8s can run on a variety of computers, including but not limited to physical machines, virtual machines of cloud services, bare metal servers on racks, etc. In K8s, Pod is the smallest deployable unit that can create and manage K8s computing, which is a container group unit including one or more containers. Pod has shared storage and network resources, as well as specifications for how to run containers. The contents of Pod are always located in the same location and co-scheduled, and run in a shared context. Pod behaves as the "logical host" of the application, that is, Pod contains one or more relatively tightly coupled application containers.
[0027] The GPU Device Plugin in K8s is a device plug-in mechanism, called a device plug-in for a graphics processor, which is specifically used to integrate special hardware resource management such as GPUs into K8s. Its main function is to schedule GPU resources into container groups to support edge inference and other workloads that require high-performance computing. In edge scenarios, when users create GPU virtual machines, the K8S GPU Device Plugin participates in the actual scheduling and allocation of GPU resources.
[0028] In a container cluster management system (such as a K8 cluster), except for the cluster master node (Master), the remaining nodes are called Nodes. As working nodes, each Node node will be assigned a reasonable workload by the Master node according to the scheduling rules and is the executor of computing tasks.
[0029] The existing technical solution for the gpu device plugin is to apply for GPU resources at the card granularity (a pod applies for several GPU cards). In this scenario, the scheduler is weakly involved in the allocation of GPU cards. Weak participation means that the scheduler knows how many GPU cards are currently available on the node. It only needs to determine that the value applied by the pod is smaller than this value. It does not care which GPU cards are allocated to the pod. The kubelet on the node actually performs the allocation operation and decides which GPU cards on the node are allocated to the pod.
[0030] However, in edge inference scenarios, in order to improve GPU performance, the scheduler needs to be strongly involved in resource allocation, that is, it must not only know the current available value of a resource on the node and the size comparison with the pod request value, but also decide which resources to allocate to the pod. However, in the implementation of existing technologies, when kubelet calls the Allocate function of deviceplugin through the GRPC protocol, it only passes the device ID assigned to the container to the device plugin. At this time, deviceplugin does not know which container of which Pod these device IDs are assigned to, and it is impossible to allocate GPU resources on a specific Numa for the specified Pod. Finally, the CPU and GPU of the virtual machine that starts the virtual machine are in different numa topologies, and the computing potential of the GPU cannot be maximized.
[0031] The existing resource allocation method only cares about the number of CPUs and GPUs requested by the Pod and the corresponding memory space required, but does not pay special attention to whether the CPUs and GPUs belong to the proximal NUMA, resulting in a loss of data transmission performance between the system memory and the GPU memory.
[0032] In view of the defects in the traditional technology, the present disclosure proposes a resource allocation method, which can consider the reasonable allocation of memory space between the central processing unit and the graphics processing unit, thereby reducing the performance loss of direct data transmission between the system memory and the GPU video memory. Figure 1 A process 100 according to an embodiment of a resource allocation method of the present disclosure is shown. The resource allocation method comprises the following steps:
[0033] Step 101: After creating the container group to be allocated, obtain the scheduling task information of the scheduler.
[0034] In this embodiment, the execution subject on which the resource allocation method runs is the target node (such as Figure 2 The device plugin for managing graphics processors ( Figure 2 The target node is the working node of the created container group to be allocated, and is also the cluster master node in the container cluster management system that manages and starts the container group to be allocated ( Figure 2 A node in a POD.
[0035] In this embodiment, the container group (Pod) is the smallest deployable unit that can create and manage the calculation of the container cluster management system (such as K8s). The container group to be allocated is a container group created due to the needs of the client. The application programming interface server allocates container information to the container group, and the scheduler allocates a target node to the container group. The container information is the information of the container group to be allocated, including: container name, container identifier, and processor identifier of the target central processor, wherein the target central processor is the central processor allocated to the container group by the application programming interface server according to the user request. Since the container group to be allocated is not bound to a graphics processor, the target node is required to allocate a graphics processor to the container group to be allocated, and obtain the scheduling task information of the target graphics processor of the container group to be allocated.
[0036] In this embodiment, the scheduling task information is task information generated by the scheduler for the container group to be allocated. The resources required by the container group to be allocated can be determined through the scheduling task information.
[0037] In this embodiment, the process of creating a container group to be allocated is as follows: the client submits business requirement information for creating a container group to the application programming interface server, and the application programming interface server processes the business requirement information and stores the container information of the container group to be allocated. The scheduler checks the business requirement information of the unbound container group through the application programming interface server, and allocates the target node and the number of graphics processors to be allocated to the unbound container group. At this time, the container group to be allocated is obtained, which can be obtained from the scheduler.
[0038] Step 102: Determine container information of a container group to be allocated and the number of graphics processors to be allocated based on the scheduling task information.
[0039] In this embodiment, the scheduling task information includes: the number of graphics processors to be allocated and the container information of the container group to be allocated. Generally, corresponding location areas can be set for different contents in the scheduling task information. The above step 102 includes: extracting the information of the first location segment of the scheduling task information to obtain the container information of the container group to be allocated; extracting the information of the second location segment in the scheduling task information to obtain the number of graphics processors to be allocated. Among them, the graphics processor to be allocated is the graphics processor to be allocated to the container group to be allocated. After the graphics processor with corresponding requirements is allocated to the container group to be allocated, the graphics processor with corresponding requirements is the target graphics processor.
[0040] Step 103: Determine the memory access group of the target CPU based on the container information.
[0041] In this embodiment, the container information may include: a container name, a container identifier, and a processor identifier of a target CPU. The memory access group of the target CPU may be obtained by querying the application programming interface server through the processor identifier of the target CPU in the container information.
[0042] In this embodiment, the memory access group of the target central processor may be a non-uniform memory access group. A NUMA group may include one or more GPUs. A GPU has a faster speed when accessing the memory of other GPUs in the NUMA group to which the GPU belongs.
[0043] Optionally, the memory access group of the target CPU may be information directly obtained by the scheduler by querying storage information and placed in the container information after determining the target CPU. To this end, the above step 103 includes: extracting the memory access group of the target CPU from a fixed position of the container information.
[0044] Step 104 : determining a target GPU based on the quantity and the memory access group, and assigning the target GPU to the container group to be assigned.
[0045] In this embodiment, the execution subject on which the resource allocation method runs is a device plug-in, and the device plug-in is used to manage multiple graphics processors in the target node. The above step 104 includes: determining the memory access groups of the multiple graphics processors currently managed; based on the memory access groups of the multiple graphics processors, selecting graphics processors that are the same as the memory access group of the target central processor from the multiple graphics processors currently managed to obtain a graphics processor sequence; selecting graphics processors of the number of the target central processor from the graphics processor sequence to obtain a target graphics processor.
[0046] In this embodiment, the target graphics processor is a graphics processor that needs to be allocated to the to-be-allocated container group. The target graphics processor may be one graphics processor or multiple graphics processors.
[0047] Optionally, before determining the memory access groups of the multiple graphics processors currently managed, the above step 104 further includes: obtaining the number of the multiple graphics processors currently managed; detecting whether the number of the multiple graphics processors is greater than or equal to the number of target central processors; in response to the number of the multiple graphics processors being greater than the number of target central processors, determining the memory access groups of the multiple graphics processors currently managed, and based on the memory access groups of the multiple graphics processors, selecting graphics processors that are the same as the memory access group of the target central processor from the multiple graphics processors currently managed to obtain a graphics processor sequence; and selecting graphics processors that are the number of the target central processor from the graphics processor sequence to obtain the target graphics processor.
[0048] In this embodiment, the above step 104 also includes: in response to the number of the multiple graphics processors being equal to the number of the target central processors, determining the memory access groups of the multiple graphics processors currently managed; detecting whether the memory access groups of the multiple graphics processors are equal to the memory access group of the target central processor, and if it is detected that the memory access groups of the multiple graphics processors are equal to the memory access group of the target central processor, using the multiple graphics processors as target graphics processors.
[0049] The resource allocation method provided by the embodiment of the present disclosure first obtains the scheduling task information of the scheduler after creating the container group to be allocated; secondly, based on the scheduling task information, determines the container information of the container group to be allocated and the number of graphics processors to be allocated; then, based on the container information, determines the memory access group of the target central processing unit; finally, based on the number and the memory access group, determines the target graphics processor, and allocates the target graphics processor to the container group to be allocated. Thus, by determining the target graphics processor based on the memory access group of the central processing unit, the determined target graphics processor and the central processing unit can belong to the same memory access group, which improves bandwidth and reduces latency, enables the target graphics processor to access data faster, reduces data transmission bottlenecks, and improves the overall computing power of the container cluster management system.
[0050] In some embodiments of the present disclosure, the resource allocation method further includes: in response to the target GPU allocation being completed, sending allocation completion information to the node runner so that the node runner starts the container group to be allocated.
[0051] In this embodiment, the node runner (kubelet) is used to run containerized applications on the nodes in the cluster. It is the main "node agent" running on each node and ensures that the container runs correctly.
[0052] In this embodiment, the execution subject on which the resource allocation method runs obtains the scheduling task information of the scheduler through the node runner, and determines the container information of the container group to be allocated and the number of graphics processors to be allocated based on the scheduling task information; determines the memory access group of the target central processing unit based on the container information; determines the target graphics processor based on the number and the memory access group, and allocates the target graphics processor to the container group to be allocated; after the target graphics processor is allocated to the container group to be allocated, an allocation completion message indicating that the allocation is completed can be sent to the node runner, so that the node runner starts the container group to be allocated.
[0053] In this embodiment, the node runner of the target node sends an allocation message to the device plug-in of the graphics processor in the target node to ask whether the allocation is completed. After receiving the allocation completion information of the device plug-in, it is determined that the target graphics processor is allocated and the container group to be allocated is directly started. It should be noted that the way in which the node runner starts the container group is a conventional way and will not be repeated here.
[0054] The resource allocation method provided in this embodiment sends allocation completion information to the node runner after the target graphics processor is allocated, so that the node runner starts the container group to be allocated, thereby improving the reliability and security of the work of the container group to be allocated.
[0055] In some optional implementations of the present disclosure, determining the container information of the container group to be allocated and the number of graphics processors to be allocated based on the scheduling task information includes: determining the container name and the number of graphics processors to be allocated based on the scheduling task information; and using the container name as the container information of the container group to be allocated.
[0056] In this optional implementation, the container name is the name of the container group to be allocated, and the container group to be allocated can be found through the name.
[0057] In this optional implementation, in the container cluster management system, after the container groups to be allocated are constructed, each container group to be allocated has a container name, and the corresponding container group to be allocated can be determined by each container name.
[0058] The method for determining container information and the number of graphics processors to be allocated provided by this optional implementation manner determines the container name and the number of graphics processors to be allocated based on the scheduling task information; uses the container name as the container information of the container group to be allocated, provides a reliable implementation means for obtaining the container information and the number of graphics processors to be allocated, and determines the container information by the container name to improve the reliability of the information acquisition.
[0059] Optionally, determining the container information of the container group to be allocated and the number of graphics processors to be allocated based on the scheduling task information includes: determining a container identifier and the number of graphics processors to be allocated based on the scheduling task information; and using the container identifier as the container information of the container group to be allocated, wherein the container identifier is a mark that uniquely identifies the container group to be allocated, and the container group to be allocated can be uniquely determined by the container identifier.
[0060] In some optional implementations of the present disclosure, the above-mentioned container information includes: a container name, and determining the memory access group of the target central processor based on the container information includes: determining the processor identifier of the target central processor based on the container name; and determining the memory access group of the target central processor based on the processor identifier and a processor memory correspondence table.
[0061] In this optional implementation, the above-mentioned determining the processor identification of the target central processor based on the container name includes: determining information of the container group to be allocated based on the container name; and determining the processor identification of the target processor of the container group to be allocated based on the information of the container group to be allocated.
[0062] In this optional implementation, the processor memory correspondence table is a pre-set correspondence between the central processing unit, the graphics processing unit and the memory access group. In the processor memory correspondence table, each central processing unit can correspond to a memory access group, and each graphics processing unit can correspond to a memory access group. When the graphics processor does not have a corresponding memory access group, it is determined that the graphics processor has not been assigned to any container group.
[0063] The method for determining the memory access group of the target central processing unit provided by this optional implementation method determines the processor identification of the target central processing unit based on the container name; and determines the memory access group of the target central processing unit based on the processor identification and the processor memory correspondence table. Thus, the memory access group of the target central processing unit is obtained simply and reliably by looking up the table, thereby improving the reliability of obtaining the memory access group of the target central processing unit.
[0064] In some optional implementations of the present disclosure, the above-mentioned container information includes: a container name, and based on the container information, determining the memory access group of the target central processing unit includes: based on the container name, obtaining basic information of the container group to be allocated from the application programming interface server; based on the basic information, determining the memory access group of the target central processing unit.
[0065] In this optional implementation, the application programming interface server (kube-apiserver) is the gateway of the container cluster management system (such as K8), which is used to manage cluster status, configuration and operation. The application programming interface server is the central contact point accessible to all users, automation and components in the container cluster management system. The application programming interface server provides all interfaces of the container cluster management system, all certificates required to access these interfaces, and the access architecture of the internal components of the entire container cluster management system. The application programming interface server implements RESTful API (Application Programming Interface) through HTTP, executes all API operations, and is responsible for storing API objects in the persistent storage backend.
[0066] In this optional implementation, the basic information is a description of the container group to be allocated. By accessing the application programming interface server through the name of the container group to be allocated, the basic information of the container group to be allocated can be obtained. Through the basic information, the information of the memory access group where the central processor on the container group to be allocated is located can be obtained.
[0067] The method for determining the memory access group of the target central processing unit provided by this optional implementation obtains basic information of the container group to be allocated from the application programming interface server based on the container name; based on the basic information, the memory access group of the target central processing unit is determined, which provides a reliable implementation method for obtaining the memory access group of the target central processing unit and improves the reliability of obtaining the memory access group of the target central processing unit.
[0068] In some optional implementations of the present disclosure, the above-mentioned determining the target graphics processor based on the quantity and the memory access group, and allocating the target graphics processor to the container group to be allocated includes: determining a graphics processor sequence belonging to the same memory access group as the target central processor based on the memory access group; obtaining the target graphics processor based on the quantity and the graphics processor sequence; and allocating the target graphics processor to the container group to be allocated.
[0069] In this optional implementation, the execution entity on which the resource allocation method runs can execute a point algorithm to determine the memory allocation on the device. The above-mentioned determination of the graphics processor sequence belonging to the same memory access group as the target central processor based on the memory access group includes: calling the get Preferred Allocation function to obtain the graphics processor sequence belonging to the same memory access group as the target central processor.
[0070] In this optional implementation, the getPreferredAllocation function is used to determine the best strategy for allocating memory on a specific device. It returns a pointer to a memory pool that is best suited for allocating memory blocks of a specified size. This function is often used to optimize memory allocation, especially in scenarios that require large amounts of memory allocation. The getPreferredAllocation function can help developers select the memory allocation strategy that best suits the current device state, thereby reducing memory fragmentation and improving memory utilization.
[0071] The method for allocating a target graphics processor to a container group to be allocated provided by this optional implementation manner determines, based on a memory access group, a graphics processor sequence belonging to the same memory access group as the target central processor, and obtains the target graphics processor based on the quantity and the graphics processor sequence, thereby providing a reliable implementation basis for allocating the target graphics processor and improving the reliability of allocating the target graphics processor.
[0072] Optionally, in some optional implementations of the present disclosure, the determining the target graphics processor based on the quantity and the memory access group, and allocating the target graphics processor to the container group to be allocated includes: determining a graphics processor sequence belonging to the same memory access group as the target central processor based on a memory access group and a processor memory correspondence table; obtaining the target graphics processor based on the quantity and the graphics processor sequence; and allocating the target graphics processor to the container group to be allocated.
[0073] In some optional implementations of the present disclosure, obtaining the target graphics processor based on the quantity and the graphics processor sequence includes: randomly selecting a number of graphics processors from the graphics processor sequence as the target graphics processors.
[0074] The method for obtaining a target graphics processor provided by this optional implementation randomly selects a number of graphics processors from a graphics processor sequence as target graphics processors, provides a reliable implementation method for obtaining the target graphics processor, and improves the reliability of obtaining the target graphics processor.
[0075] Optionally, obtaining the target graphics processor based on the quantity and the graphics processor sequence includes: selecting the first number of graphics processors from the graphics processor sequence as the target graphics processors.
[0076] In some optional implementations of the present disclosure, the step of obtaining the target graphics processor based on the quantity and the graphics processor sequence further includes: updating a processor memory correspondence table to obtain an updated correspondence table.
[0077] In this optional implementation, the processor memory correspondence table is a table of the relationship between the graphics processor, the central processing unit and the memory access group. The processor memory correspondence table can be used to quickly obtain the current allocation status between the graphics processor, the central processing unit and the memory access group.
[0078] In this optional implementation, the above-mentioned updating of the processor memory correspondence table includes: detecting the field of the target graphics processor in the processor memory correspondence table, filling the target central processor and the memory access group of the target central processor under the field, and when filling the information of the target central processor, if the target central processor already has a memory access group, only the target graphics processor needs to be filled.
[0079] Optionally, after obtaining the updated correspondence table, the updated correspondence table may be sent to the node runner.
[0080] The method for obtaining the target graphics processor provided by this optional implementation can update the processor memory correspondence table after allocating the target graphics processor, and can update the current memory architecture allocation status in real time, thereby improving the reliability of memory allocation information.
[0081] In a specific example of the present disclosure, the specific process of the resource allocation method of the present disclosure is shown in Figure 2 The structure shown:
[0082] Node Runner Figure 2 When the kubelet in the node actually starts the container group to be allocated, the node runner calls the device plug-in to pass the container information of the container group to be allocated and the number of graphics processors to be allocated. Figure 2 The device plugin Manager in the Figure 2 The GPU device plugin in the ContainerManager is the container group that calls it and requests several GPUs.
[0083] The device plug-in will call it through which container group, find the memory access group where the target CPU of this container group is located (such as Figure 2 Numa0, Numa1 in ), and then find the corresponding number of GPUs in the same memory access group (such as Figure 2GPU0, GPU1, GPU2, GPU3 and GPUN in the memory, where N>1) are used as target graphics processors and returned to the node runner. Specifically, the device plug-in can determine the memory access group on which the allocated target CPU is based on the obtained container information, and force the return of a list of graphics processors on the same memory access group through the Get Preferred Allocation function, and select the target graphics processor from the list.
[0084] The node runner finally starts the container group to be allocated, and the target CPU and target GPU of the same memory access group are bound together, and the binding relationship is updated to the updated corresponding relationship table.
[0085] After the allocated container group obtains the ID of the target GPU assigned to itself, it calls the libvirtd API to start the virtual machine and passes the target GPU directly to the virtual machine through XML.
[0086] In the edge inference scenario, the resource allocation method disclosed in the present invention implements the strategy of modifying the device plug-in to return some optimal devices from a group of available devices. This method is designed to enable the device manager to make more meaningful decisions when possible and force the allocation of GPU and CPU to the same memory access group.
[0087] Assigning the GPU and CPU to the same memory access group node can significantly improve GPU inference performance. In the memory access group architecture, the system memory is divided into multiple nodes, and each CPU has a local memory node and a remote node. The memory access speed of the local node is faster and the latency is lower. In a GPU system that supports memory access groups, through a reasonable memory access group allocation strategy, the CPU, memory, and GPU resources can be associated with the same node, thereby reducing memory access latency and bandwidth bottlenecks, improving inference performance, and improving the performance of edge inference tasks.
[0088] The resource allocation method provided by the present disclosure can ensure that the GPU and CPU share the same memory node by allocating the CPU and GPU to the same memory access group node, reduce the frequency of remote access, thereby reducing memory access latency and improving reasoning performance.
[0089] The present disclosure also provides a resource scheduling method. Figure 3 A process 300 according to an embodiment of a resource scheduling method of the present disclosure is shown. The resource allocation method includes the following steps:
[0090] Step 301: Receive business requirement information of a container group to be allocated.
[0091] In this embodiment, the execution subject on which the resource scheduling method runs can be as follows: Figure 4 For the scheduler shown, the business demand information is the resource demand obtained by analyzing the application programming interface server after obtaining the application call request of the user to actually call the container group to be allocated. The scheduler determines the resource demand of the created container group to be allocated through the business demand information and allocates a node, that is, a target node, to the container group to be allocated.
[0092] In this embodiment, the business requirement information may be stored in an application programming interface server, and the caller directly obtains the business requirement information from the application programming interface server.
[0093] Step 302: Determine the number of graphics processors to be allocated and container information of container groups to be allocated based on the business demand information.
[0094] In this embodiment, the execution subject on which the resource scheduling method runs can determine the processor identifier of the central processor that meets the business demand information and the number of graphics to be allocated that meet the business demand information based on the business demand information. Based on the information of the container group to be allocated constructed by the application programming interface server, determine the container name and container identifier of the container group to be allocated; and use the container name, container identifier and processor identifier of the central processor as container information.
[0095] Optionally, before obtaining the container information, the memory access group of the target central processor can be queried through the processor identifier of the target central processor; the container name, container identifier; the container name, container identifier, processor identifier of the central processor and memory access group of the central processor are used as the container information.
[0096] Step 303: Determine the target node based on the container information and quantity.
[0097] In this embodiment, the above step 303 includes: selecting a graphics processor from the container cluster management system to obtain a processor identifier that identifies the selected graphics processor; based on the processor identifier of the graphics processor, obtaining a memory access group of the selected graphics processor; matching the memory access group of the selected graphics processor with the memory access group of the central processing unit in the container information; in response to a successful match between the memory access group of the graphics processor and the memory access group of the central processing unit in the container information, using the node of the successfully matched graphics processor as the target node.
[0098] Step 304: Generate scheduling task information based on the container information and quantity.
[0099] In this embodiment, the scheduling task information is task information generated by the execution subject on which the resource scheduling method runs for the container group to be allocated. The target node can determine which resources need to be allocated to the container group to be allocated through the scheduling task information.
[0100] In this embodiment, the container information and the number of central processing units may be directly spliced together in a certain position sequence to obtain the scheduling task information.
[0101] Step 305: Send scheduling task information to the target node.
[0102] like Figure 4 As shown, the scheduler determines the container information of the to-be-allocated container group to be bound and the number of to-be-allocated graphics processors to be allocated to the to-be-allocated container group based on the business demand information in the application programming interface server, and can bring the information of the memory access group to the target central processor of the to-be-allocated container group, find the target node that meets the number, and send the identifier and name of the to-be-allocated container group, the processor identifier of the target central processor, and the information of the memory access group of the target central processor as the container information and the number of to-be-allocated graphics processors as the scheduling task information to the node runner of the target node ( Figure 2 kubelet in Node Runner Control Device Plugin ( Figure 4 GPU deviceplugin in) to the container group to be allocated ( Figure 4 The node runner also starts the container group to be allocated after the resource allocation of the container group to be allocated is completed.
[0103] The resource scheduling method provided by the embodiment of the present disclosure first receives the business demand information of the container group to be allocated; secondly, based on the business demand information, determines the number of graphics processors to be allocated and the container information of the container group to be allocated; thirdly, based on the container information and the number, determines the target node; then, based on the container information and the number, generates the scheduling task information; finally, sends the scheduling task information to the target node. Thus, the scheduling task information generated based on the container information and the number can enable the target node to determine the container information of the container to be allocated, so that when the target node performs resource allocation, resources belonging to the same memory access group can be allocated, reducing the data transmission bottleneck and improving the overall computing power of the container cluster management system. The present disclosure realizes an efficient and flexible resource scheduling strategy by comprehensively considering business needs, container information and graphics processor resources, which helps to improve the overall performance and resource utilization of the system.
[0104] In some optional implementations of the present disclosure, the above-mentioned determining the number of graphics processors to be allocated and the container information of the container group to be allocated based on the business demand information includes: determining the container name of the container group to be allocated; extracting the number of graphics processors to be allocated and the processor identifier of the target central processor based on the business demand information; determining the memory access group of the target central processor based on the processor identifier, and storing the processor identifier and the memory access group in a processor memory correspondence table; and using the container name and the processor identifier as the container information.
[0105] The method for determining the number of graphics processors to be allocated and the container information of the container group to be allocated provided by this optional implementation manner determines the container name of the container group to be allocated; based on business demand information, extracts the number of graphics processors to be allocated and the processor identifier of the target central processor; based on the processor identifier, determines the memory access group of the target central processor, and stores the processor identifier and the memory access group in a processor memory correspondence table; uses the container name and the processor identifier as the container information, thereby improving the reliability of obtaining the number of graphics processors to be allocated and the container information of the container group to be allocated.
[0106] Optionally, the determining the number of graphics processors to be allocated and the container information of the container group to be allocated based on the business demand information includes: determining the container identifier of the container group to be allocated; extracting the number of graphics processors to be allocated and the processor identifier of the target central processor based on the business demand information; determining the memory access group of the target central processor based on the processor identifier, and storing the processor identifier and the memory access group in a processor memory correspondence table; and using the container identifier and the processor identifier as the container information.
[0107] In some optional implementations of the present disclosure, the above-mentioned determining the target node based on the container information and quantity includes: determining the target central processor based on the container information; and selecting a scheduling node that meets the target central processor and quantity from the scheduling node cluster as the target node.
[0108] In this optional implementation, the above-mentioned determining the target central processor based on the container information includes: obtaining basic information of the container group to be allocated from the application programming interface server based on the container information; and determining the target central processor from the basic information.
[0109] In this optional implementation, the scheduling node cluster is a cluster formed by all scheduling nodes in the container cluster management system. The above-mentioned selecting a scheduling node that meets the target central processing unit and quantity from the scheduling node cluster as the target node includes: communicating with each scheduling node in the scheduling node cluster respectively to determine the number of central processing units and graphics processing units of each scheduling node; selecting a scheduling node whose number of central processing units and graphics processing units meets the target number of central processing units and graphics processing units to be allocated as the target node.
[0110] The method for determining the target node provided by this optional implementation method determines the target central processing unit based on the container information; a scheduling node that meets the target central processing unit and quantity is selected from the scheduling node cluster as the target node, which provides a reliable implementation method for obtaining the target node and improves the reliability of obtaining the target node.
[0111] Further references Figure 5As an implementation of the methods shown in the above figures, the present disclosure provides an embodiment of a resource allocation device, which is similar to Figure 1 Corresponding to the method embodiment shown, the device can be specifically used in various electronic devices.
[0112] like Figure 5 As shown, the resource allocation device 500 provided in this embodiment includes: an acquisition unit 501, an information determination unit 502, a topology determination unit 503, and an allocation unit 504. The acquisition unit 501 can be configured to acquire the scheduling task information of the scheduler after creating the container group to be allocated. The information determination unit 502 can be configured to determine the container information of the container group to be allocated and the number of graphics processors to be allocated based on the scheduling task information. The topology determination unit 503 can be configured to determine the memory access group of the target central processor based on the container information. The allocation unit 504 can be configured to determine the target graphics processor based on the number and the memory access group, and allocate the target graphics processor to the container group to be allocated.
[0113] In this embodiment, in the resource allocation device 500, the specific processing of the acquisition unit 501, the information determination unit 502, the topology determination unit 503, and the allocation unit 504 and the technical effects thereof can be referred to respectively. Figure 1 The relevant descriptions of step 101, step 102, step 103, and step 104 in the corresponding embodiment are not repeated here.
[0114] In some embodiments of the present embodiment, the above-mentioned device 500 also includes: a starting unit (not shown in the figure), which is configured to send allocation completion information to the node runner in response to the completion of the allocation of the target graphics processor, so that the node runner starts the container group to be allocated.
[0115] In some optional implementations of this embodiment, the information determining unit 502 is configured to: determine the container name and the number of graphics processors to be allocated based on the scheduling task information; and use the container name as the container information of the container group to be allocated.
[0116] In some optional implementations of this embodiment, the above-mentioned container information includes: a container name, and the topology determination unit 503 is configured to: determine the processor identifier of the target central processor based on the container name; and determine the memory access group of the target central processor based on the processor identifier and the processor memory correspondence table.
[0117] In some optional implementations of this embodiment, the above-mentioned container information includes: a container name, and the above-mentioned topology determination unit 503 is configured to: based on the container name, obtain basic information of the container group to be allocated from the application programming interface server; based on the basic information, determine the memory access group of the target central processor.
[0118] In some optional implementations of this embodiment, the allocation unit 504 is configured to: determine a sequence of graphics processors that belong to the same memory access group as the target central processor based on the memory access group; obtain a target graphics processor based on the quantity and the graphics processor sequence; and allocate the target graphics processor to the container group to be allocated.
[0119] In some optional implementations of this embodiment, the allocating unit 504 is configured to: randomly select a number of graphics processors from a graphics processor sequence as target graphics processors.
[0120] In some optional implementations of this embodiment, the allocation unit 504 is configured to: update the processor memory correspondence table to obtain an updated correspondence table.
[0121] The resource allocation device provided by the embodiment of the present disclosure, first, after creating the container group to be allocated, the acquisition unit 501 acquires the scheduling task information of the scheduler; secondly, the information determination unit 502 determines the container information of the container group to be allocated and the number of graphics processors to be allocated based on the scheduling task information; then, the topology determination unit 503 determines the memory access group of the target central processor based on the container information; finally, the allocation unit 504 determines the target graphics processor based on the number and the memory access group, and allocates the target graphics processor to the container group to be allocated. Therefore, by analyzing the scheduling task information and container requirements in detail, the required graphics processor resources can be matched more accurately to avoid resource waste; by considering the memory access group, the data exchange path between the central processor and the memory is optimized, thereby improving the overall performance of the system; the method is applicable to different types of container groups and task requirements, and has high flexibility and adaptability. By comprehensively considering the scheduling task information, container requirements, central processor memory access group and graphics processor resources, a more efficient and flexible resource allocation strategy is achieved, which helps to improve the overall performance and resource utilization of the system.
[0122] In the technical solution of the present disclosure, the collection, storage, use, processing, transmission, provision and disclosure of user personal information involved are in compliance with the provisions of relevant laws and regulations and do not violate public order and good morals.
[0123] Further references Figure 6 As an implementation of the methods shown in the above figures, the present disclosure provides an embodiment of a resource scheduling device. Figure 3 Corresponding to the method embodiment shown, the device can be specifically used in various electronic devices.
[0124] Figure 6 As shown, the resource allocation device 600 provided in this embodiment includes: a receiving unit 601, a business determination unit 602, a node determination unit 603, a task determination unit 604, and a sending unit 605. Among them, the above-mentioned receiving unit 601 can be configured to receive business demand information of the container group to be allocated. The above-mentioned business determination unit 602 can be configured to determine the number of graphics processors to be allocated and the container information of the container group to be allocated based on the business demand information. The above-mentioned node determination unit 603 is configured to determine the target node based on the container information and the number. The above-mentioned task determination unit 604 is configured to generate scheduling task information based on the container information and the number. The above-mentioned sending unit 605 can be configured to send the scheduling task information to the target node.
[0125] In this embodiment, the specific processing of the receiving unit 601, the service determination unit 602, the node determination unit 603, the task determination unit 604, and the sending unit 605 and the technical effects thereof can be referred to respectively. Figure 3 The relevant descriptions of step 301, step 302, step 303, step 304, and step 305 in the corresponding embodiment are not repeated here.
[0126] In some optional implementations of this embodiment, the business determination unit 602 is configured to: generate a container name for the container group to be allocated; extract the number of graphics processors to be allocated and the processor identifier of the target central processor based on the business demand information; determine the memory access group of the target central processor based on the processor identifier, and store the processor identifier and the memory access group in a processor memory correspondence table; and use the container name and the processor identifier as container information.
[0127] In some optional implementations of this embodiment, the node determination unit 603 is configured to: determine the target CPU based on the container information; and select a scheduling node that meets the target CPU and quantity from the scheduling node cluster as the target node.
[0128] The resource allocation device provided by the embodiment of the present disclosure, first, the receiving unit 601 receives the business demand information of the container group to be allocated; secondly, the business determination unit 602 determines the number of graphics processors to be allocated and the container information of the container group to be allocated based on the business demand information; thirdly, the node determination unit 603 determines the target node based on the container information and the number; then, the task determination unit 604 generates the scheduling task information based on the container information and the number; finally, the sending unit 605 sends the scheduling task information to the target node. Thus, the scheduling task information generated based on the container information and the number can enable the target node to determine the container information of the container to be allocated, so that when the target node performs resource allocation, resources belonging to the same memory access group can be allocated, which reduces the data transmission bottleneck and improves the overall computing power of the container cluster management system.
[0129] In the technical solution of the present disclosure, the collection, storage, use, processing, transmission, provision and disclosure of user personal information involved are in compliance with the provisions of relevant laws and regulations and do not violate public order and good morals.
[0130] According to an embodiment of the present disclosure, the present disclosure also provides an electronic device, a readable storage medium and a computer program product.
[0131] Figure 7 A schematic block diagram of an example electronic device 700 that can be used to implement an embodiment of the present disclosure is shown. The electronic device is intended to represent various forms of digital computers, such as laptop computers, desktop computers, workstations, personal digital assistants, servers, blade servers, mainframe computers, and other suitable computers. The electronic device can also represent various forms of mobile devices, such as personal digital processing, cellular phones, smart phones, wearable devices, and other similar computing devices. The components shown herein, their connections and relationships, and their functions are merely examples and are not intended to limit the implementation of the present disclosure described and / or required herein.
[0132] like Figure 7 As shown, the device 700 includes a computing unit 701, which can perform various appropriate actions and processes according to a computer program stored in a read-only memory (ROM) 702 or a computer program loaded from a storage unit 708 into a random access memory (RAM) 703. In the RAM 703, various programs and data required for the operation of the device 700 can also be stored. The computing unit 701, the ROM 702, and the RAM 70703 are connected to each other via a bus 70704. An input / output (I / O) interface 70705 is also connected to the bus 704.
[0133] A number of components in the device 700 are connected to the I / O interface 70705, including: an input unit 706, such as a keyboard, a mouse, etc.; an output unit 707, such as various types of displays, speakers, etc.; a storage unit 708, such as a disk, an optical disk, etc.; and a communication unit 709, such as a network card, a modem, a wireless communication transceiver, etc. The communication unit 709 allows the device 700 to exchange information / data with other devices through a computer network such as the Internet and / or various telecommunication networks.
[0134] The computing unit 701 may be a variety of general and / or special processing components with processing and computing capabilities. Some examples of the computing unit 701 include, but are not limited to, a central processing unit (CPU), a graphics processing unit (GPU), various dedicated artificial intelligence (AI) computing chips, various computing units running machine learning model algorithms, digital signal processors (DSPs), and any appropriate processors, controllers, microcontrollers, etc. The computing unit 701 performs the various methods and processes described above, such as a resource allocation method or a resource scheduling method. For example, in some embodiments, the resource allocation method or the resource scheduling method may be implemented as a computer software program, which is tangibly included in a machine-readable medium, such as a storage unit 708. In some embodiments, part or all of the computer program may be loaded and / or installed on the device 700 via the ROM 702 and / or the communication unit 709. When the computer program is loaded into the RAM 703 and executed by the computing unit 701, one or more steps of the resource allocation method or the resource scheduling method described above may be performed. Alternatively, in other embodiments, the computing unit 701 may be configured to execute the resource allocation method or the resource scheduling method in any other appropriate manner (for example, by means of firmware).
[0135] Various implementations of the systems and techniques described above herein can be implemented in digital electronic circuit systems, integrated circuit systems, field programmable gate arrays (FPGAs), application specific integrated circuits (ASICs), application specific standard products (ASSPs), systems on chips (SOCs), load programmable logic devices (CPLDs), computer hardware, firmware, software, and / or combinations thereof. These various implementations can include: being implemented in one or more computer programs that can be executed and / or interpreted on a programmable system including at least one programmable processor, which can be a special purpose or general purpose programmable processor that can receive data and instructions from a storage system, at least one input device, and at least one output device, and transmit data and instructions to the storage system, the at least one input device, and the at least one output device.
[0136] The program code for implementing the method of the present disclosure may be written in any combination of one or more programming languages. These program codes may be provided to a processor or controller of a general-purpose computer, a special-purpose computer, or other programmable resource allocation device or resource scheduling device, so that the program code, when executed by the processor or controller, implements the functions / operations specified in the flow chart and / or block diagram. The program code may be executed entirely on the machine, partially on the machine, partially on the machine and partially on a remote machine as a stand-alone software package, or entirely on a remote machine or server.
[0137] In the context of the present disclosure, a machine-readable medium may be a tangible medium that may contain or store a program for use by or in conjunction with an instruction execution system, device, or equipment. A machine-readable medium may be a machine-readable signal medium or a machine-readable storage medium. A machine-readable medium may include, but is not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, device, or equipment, or any suitable combination of the foregoing. A more specific example of a machine-readable storage medium may include an electrical connection based on one or more lines, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing.
[0138] To provide interaction with a user, the systems and techniques described herein can be implemented on a computer having: a display device (e.g., a CRT (cathode ray tube) or LCD (liquid crystal display) monitor) for displaying information to the user; and a keyboard and pointing device (e.g., a mouse or trackball) through which the user can provide input to the computer. Other types of devices can also be used to provide interaction with the user; for example, the feedback provided to the user can be any form of sensory feedback (e.g., visual feedback, auditory feedback, or tactile feedback); and input from the user can be received in any form (including acoustic input, voice input, or tactile input).
[0139] The systems and techniques described herein may be implemented in a computing system that includes back-end components (e.g., as a data server), or a computing system that includes middleware components (e.g., an information server), or a computing system that includes front-end components (e.g., a user computer with a graphical user interface or a web browser through which a user can interact with implementations of the systems and techniques described herein), or a computing system that includes any combination of such back-end components, middleware components, or front-end components. The components of the system may be interconnected by any form or medium of digital data communication (e.g., a communications network). Examples of communications networks include: a local area network (LAN), a wide area network (WAN), and the Internet.
[0140] A computer system may include a client and a server. The client and the server are generally remote from each other and usually interact through a communication network. The relationship of client and server is generated by computer programs running on respective computers and having a client-server relationship with each other. The server may be a cloud server, a server of a distributed system, or a server combined with a blockchain.
[0141] It should be understood that the various forms of processes shown above can be used to reorder, add or delete steps. For example, the steps recorded in this disclosure can be executed in parallel, sequentially or in different orders, as long as the desired results of the technical solutions disclosed in this disclosure can be achieved, and this document does not limit this.
[0142] The above specific implementations do not constitute a limitation on the protection scope of the present disclosure. It should be understood by those skilled in the art that various modifications, combinations, sub-combinations and substitutions can be made according to design requirements and other factors. Any modification, equivalent substitution and improvement made within the spirit and principle of the present disclosure shall be included in the protection scope of the present disclosure.
Claims
1. A resource allocation method, the method comprising: After creating the container group to be allocated, obtain the scheduling task information of the scheduler; Based on the scheduling task information, determine the container information of the to-be-allocated container group and the number of graphics processors to be allocated; Determining a memory access group of a target CPU based on the container information; Based on the quantity and the memory access group, a target graphics processor is determined, and the target graphics processor is allocated to the to-be-allocated container group.
2. The method according to claim 1, further comprising: In response to the target GPU being allocated and completed, an allocation completion message is sent to a node runner, so that the node runner starts the to-be-allocated container group.
3. The method according to claim 1 or 2, wherein: The determining, based on the scheduling task information, the container information of the to-be-allocated container group and the number of to-be-allocated graphics processors comprises: Determine the container name and the number of graphics processors to be allocated based on the scheduling task information; The container name is used as the container information of the container group to be allocated.
4. The method according to claim 1 or 2, wherein: The container information includes: a container name, and determining the memory access group of the target CPU based on the container information includes: Determining a processor identifier of a target central processing unit based on the container name; Based on the processor identification and the processor memory correspondence table, a memory access group of the target central processor is determined.
5. The method according to claim 1 or 2, wherein: The container information includes: a container name, and determining the memory access group of the target CPU based on the container information includes: Based on the container name, obtaining basic information of the container group to be allocated from the application programming interface server; Based on the basic information, a memory access group of the target central processing unit is determined.
6. The method according to claim 1 or 2, wherein: The determining a target graphics processor based on the quantity and the memory access group, and allocating the target graphics processor to the to-be-allocated container group comprises: Based on the memory access group, determining a sequence of graphics processors that belong to the same memory access group as the target central processor; Based on the number and the sequence of graphics processors, obtaining a target graphics processor; The target graphics processor is allocated to the to-be-allocated container group.
7. The method according to claim 6, wherein: The obtaining of a target graphics processor based on the quantity and the graphics processor sequence comprises: The number of graphics processors is randomly selected from the graphics processor sequence as target graphics processors.
8. The method according to claim 6, wherein obtaining a target graphics processor based on the quantity and the graphics processor sequence further comprises: The processor memory correspondence table is updated to obtain an updated correspondence table.
9. A resource scheduling method, the method comprising: Receive business demand information of the container group to be allocated; Based on the business demand information, determine the number of graphics processors to be allocated and container information of the container group to be allocated; Determine a target node based on the container information and the quantity; Based on the container information and the quantity, generating scheduling task information; The scheduling task information is sent to the target node.
10. The method according to claim 9, wherein: The determining, based on the business demand information, the number of graphics processors to be allocated and the container information of the container group to be allocated includes: Determine the container name of the container group to be assigned; Based on the business demand information, extract the number of graphics processors to be allocated and the processor identifier of the target central processor; Based on the processor identification, determining a memory access group of the target central processor, and storing the processor identification and the memory access group in a processor memory correspondence table; The container name and the processor identifier are used as container information.
11. The method according to claim 9, wherein: The determining the target node based on the container information and the quantity includes: Determining a target central processor based on the container information; A scheduling node that meets the target central processor and the number is selected from the scheduling node cluster as the target node.
12. A resource allocation device, comprising: An acquisition unit is configured to acquire scheduling task information of a scheduler after creating a container group to be allocated; an information determining unit, configured to determine the container information of the to-be-allocated container group and the number of to-be-allocated graphics processors based on the scheduling task information; a topology determination unit configured to determine a memory access group of a target central processor based on the container information; The allocation unit is configured to determine a target graphics processor based on the quantity and the memory access group, and allocate the target graphics processor to the to-be-allocated container group.
13. The device according to claim 12, further comprising: The starting unit is configured to send allocation completion information to the node runner in response to the target GPU allocation completion, so that the node runner starts the to-be-allocated container group.
14. The apparatus according to claim 12 or 13, wherein the information determination unit is configured to: determine a container name and the number of graphics processors to be allocated based on the scheduling task information; and use the container name as the container information of the container group to be allocated.
15. The device according to claim 12 or 13, wherein: The container information includes: a container name, and the topology determination unit is configured to: determine a processor identifier of a target central processor based on the container name; and determine a memory access group of the target central processor based on the processor identifier and a processor memory correspondence table.
16. The device according to claim 12 or 13, wherein: The container information includes: a container name, and the topology determination unit is configured to: based on the container name, obtain basic information of the container group to be allocated from the application programming interface server; based on the basic information, determine the memory access group of the target central processor.
17. The device according to claim 12 or 13, wherein: The allocation unit is configured to: determine a graphics processor sequence belonging to the same memory access group as the target central processor based on the memory access group; obtain a target graphics processor based on the quantity and the graphics processor sequence; and allocate the target graphics processor to the to-be-allocated container group.
18. The device according to claim 17, wherein: The allocation unit is configured to randomly select the number of graphics processors from the graphics processor sequence as target graphics processors.
19. The device according to claim 17, wherein: The allocation unit is configured to update the processor memory correspondence table to obtain an updated correspondence table.
20. A resource scheduling device, comprising: A receiving unit, configured to receive business demand information of a container group to be allocated; A service determination unit, configured to determine the number of graphics processors to be allocated and container information of the container group to be allocated based on the service demand information; a node determination unit configured to determine a target node based on the container information and the quantity; a task determination unit configured to generate scheduling task information based on the container information and the quantity; A sending unit is configured to send the scheduling task information to the target node.
21. The device according to claim 20, wherein: The service determination unit is configured to: generate a container name of the container group to be allocated; extract the number of graphics processors to be allocated and the processor identifier of the target central processor based on the service requirement information; Based on the processor identification, a memory access group of the target central processor is determined, and the processor identification and the memory access group are stored in a processor memory correspondence table; and the container name and the processor identification are used as container information.
22. The device according to claim 20, wherein: The node determination unit is configured to: determine a target central processor based on the container information; and select a scheduling node that meets the target central processor and the quantity from the scheduling node cluster as the target node.
23. An electronic device, characterized in that: include: at least one processor; and a memory communicatively connected to the at least one processor; wherein the memory stores instructions executable by the at least one processor, and the instructions are executed by the at least one processor so that the at least one processor can execute the method described in any one of claims 1-11.
24. A non-transitory computer-readable storage medium storing computer instructions, characterized in that: The computer instructions are used to enable the computer to execute the method according to any one of claims 1 to 11.
25. A computer program product, comprising a computer program, which, when executed by a processor, implements the method of any one of claims 1 to 11.