CN113301087A - Resource scheduling method, device, computing equipment and medium - Google Patents
Resource scheduling method, device, computing equipment and medium Download PDFInfo
- Publication number
- CN113301087A CN113301087A CN202010706309.8A CN202010706309A CN113301087A CN 113301087 A CN113301087 A CN 113301087A CN 202010706309 A CN202010706309 A CN 202010706309A CN 113301087 A CN113301087 A CN 113301087A
- Authority
- CN
- China
- Prior art keywords
- target
- processor core
- application container
- container group
- information
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Granted
Links
- 238000000034 method Methods 0.000 title claims abstract description 79
- 238000013473 artificial intelligence Methods 0.000 claims description 59
- 238000012545 processing Methods 0.000 claims description 25
- 238000012216 screening Methods 0.000 claims description 14
- 238000004590 computer program Methods 0.000 claims description 8
- 238000013528 artificial neural network Methods 0.000 claims description 7
- 239000002699 waste material Substances 0.000 abstract description 10
- 238000010586 diagram Methods 0.000 description 12
- 230000008569 process Effects 0.000 description 9
- 238000005516 engineering process Methods 0.000 description 6
- 238000004891 communication Methods 0.000 description 4
- 230000009471 action Effects 0.000 description 3
- 238000002955 isolation Methods 0.000 description 2
- 238000012986 modification Methods 0.000 description 2
- 230000004048 modification Effects 0.000 description 2
- 238000006467 substitution reaction Methods 0.000 description 2
- 239000004606 Fillers/Extenders Substances 0.000 description 1
- 230000005540 biological transmission Effects 0.000 description 1
- 238000004422 calculation algorithm Methods 0.000 description 1
- 238000004364 calculation method Methods 0.000 description 1
- 238000013461 design Methods 0.000 description 1
- 238000011161 development Methods 0.000 description 1
- 239000000835 fiber Substances 0.000 description 1
- 238000001914 filtration Methods 0.000 description 1
- 230000006870 function Effects 0.000 description 1
- 230000010365 information processing Effects 0.000 description 1
- 230000003287 optical effect Effects 0.000 description 1
- 239000004065 semiconductor Substances 0.000 description 1
- 238000012546 transfer Methods 0.000 description 1
Images
Classifications
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L67/00—Network arrangements or protocols for supporting network services or applications
- H04L67/01—Protocols
- H04L67/10—Protocols in which an application is distributed across nodes in the network
- H04L67/104—Peer-to-peer [P2P] networks
- H04L67/1074—Peer-to-peer [P2P] networks for supporting data block transmission mechanisms
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F9/00—Arrangements for program control, e.g. control units
- G06F9/06—Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
- G06F9/46—Multiprogramming arrangements
- G06F9/50—Allocation of resources, e.g. of the central processing unit [CPU]
- G06F9/5005—Allocation of resources, e.g. of the central processing unit [CPU] to service a request
-
- Y—GENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
- Y02—TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
- Y02D—CLIMATE CHANGE MITIGATION TECHNOLOGIES IN INFORMATION AND COMMUNICATION TECHNOLOGIES [ICT], I.E. INFORMATION AND COMMUNICATION TECHNOLOGIES AIMING AT THE REDUCTION OF THEIR OWN ENERGY USE
- Y02D10/00—Energy efficient computing, e.g. low power processors, power management or thermal management
Landscapes
- Engineering & Computer Science (AREA)
- Software Systems (AREA)
- Theoretical Computer Science (AREA)
- Physics & Mathematics (AREA)
- General Engineering & Computer Science (AREA)
- General Physics & Mathematics (AREA)
- Computer Networks & Wireless Communication (AREA)
- Signal Processing (AREA)
- Management, Administration, Business Operations System, And Electronic Commerce (AREA)
Abstract
The application discloses a resource scheduling method, a resource scheduling device, a computing device and a medium. The method comprises the following steps: acquiring a resource scheduling request aiming at a target application container group, wherein the resource scheduling request comprises a target number of processor cores requested by the target application container group; determining a target working node according to the acquired equipment information of the processors on the working nodes, and determining processor core allocation information of a target application container group based on a preset allocation condition and a target number, wherein the processor core allocation information comprises information of a target processor core allocated for the target application container group in the target working node; the processor core allocation information is stored in the configuration information of the target application container group, so that the target working node obtains the processor core allocation information from the configuration information, and the target processor core is dispatched to the target application container group based on the processor core allocation information. According to the embodiment of the application, the problem of resource waste caused by low utilization rate of the processor core can be solved.
Description
Technical Field
The present application relates to the field of data processing, and in particular, to a resource scheduling method, apparatus, computing device, and medium.
Background
With the rapid development of container technology in cloud computing and the increasing popularity of container technology, more and more applications are involved in container technology. For example, if a certain application container group (pod) requests multiple embedded neural network processors, the container cluster management system can select the idle embedded neural network processors in the computer cluster for use by the application container group. In this manner, all processor cores on the embedded neural network processor are allocated for use by the application container group.
However, some application container groups do not use all processor cores on the assigned embedded neural network processor, and unused processor cores cannot be assigned to other application container groups for use by other application container groups. Therefore, the current resource scheduling method cannot fully utilize the processor core in the processor, resulting in low resource utilization rate.
Disclosure of Invention
The embodiment of the application provides a resource scheduling method, a resource scheduling device, a computing device and a medium, which can solve the problem of resource waste in the related technical field.
According to a first aspect of the present application, there is provided a resource scheduling method, including:
acquiring a resource scheduling request aiming at a target application container group, wherein the resource scheduling request comprises a target number of processor cores requested by the target application container group;
determining a target working node according to the acquired equipment information of the processors on the working nodes, wherein the number of idle processor cores in the target working node is not less than the target number;
determining processor core allocation information of the target application container group based on preset allocation conditions and the target number, wherein the processor core allocation information comprises information of target processor cores allocated for the target application container group in the target working node;
and storing the processor core allocation information into the configuration information of the target application container group, so that the target working node acquires the processor core allocation information from the configuration information, and schedules the target processor core to the target application container group based on the processor core allocation information.
According to a second aspect of the present application, there is provided a resource scheduling method applied to a target work node, including:
acquiring processor core allocation information of a target application container group from configuration information of the target application container group, wherein the processor core allocation information is stored in the configuration information of the target application container group by a preset node, the processor core allocation information is determined by the preset node based on a preset allocation condition and a target number of processor cores requested by the target application container group, the processor core allocation information comprises information of the target processor cores allocated for the target application container group in a target working node, the target working node is determined by the preset node according to the acquired equipment information of processors on the working node, and the number of idle processor cores in the target working node is not less than the target number;
scheduling the target processor core to the target application container group based on the processor core allocation information.
According to a third aspect of the present application, there is provided a resource scheduling method, including:
acquiring a resource scheduling request aiming at a target application container group, wherein the resource scheduling request comprises a target number of a first processor core requested by the target application container group; the first processor core comprises a processor core of an artificial intelligence chip;
determining a target working node according to the acquired equipment information of the artificial intelligence chip on the working node, wherein the number of idle first processor cores in the target working node is not less than the target number;
determining processor core allocation information of the target application container group based on a preset allocation condition and the target number, wherein the processor core allocation information comprises information of a target first processor core allocated for the target application container group in the target work node;
and storing the processor core allocation information into the configuration information of the target application container group, so that the target working node acquires the processor core allocation information from the configuration information, and schedules the target first processor core to the target application container group based on the processor core allocation information.
According to a fourth aspect of the present application, there is provided a resource scheduling method applied to a target work node, including:
acquiring processor core allocation information of a target application container group from configuration information of the target application container group, the processor core allocation information is stored in the configuration information of the target application container group by a predetermined node, the processor core allocation information is determined by the predetermined node based on a preset allocation condition and a target number of the first processor cores requested by the target application container group, the first processor core comprises a processor core of an artificial intelligence chip, the processor core allocation information comprises information of a target first processor core allocated for the target application container group in a target work node, the target working node is determined by the preset node according to the acquired equipment information of the artificial intelligence chip on the working node, the number of idle first processor cores in the target working node is not less than the target number;
scheduling the target first processor core to the target application container set based on the processor core allocation information.
According to a fifth aspect of the present application, there is provided a resource scheduling apparatus comprising:
the system comprises a first acquisition module, a second acquisition module and a third acquisition module, wherein the first acquisition module is used for acquiring a resource scheduling request aiming at a target application container group, and the resource scheduling request comprises the target number of processor cores requested by the target application container group;
the target working node determining module is used for determining a target working node according to the acquired equipment information of the processors on the working nodes, and the number of idle processor cores in the target working node is not less than the target number;
the allocation information determining module is used for determining the allocation information of the processor cores of the target application container group based on preset allocation conditions and the target number, wherein the allocation information of the processor cores comprises the information of the target processor cores allocated for the target application container group in the target work node;
and the first storage module is used for storing the processor core allocation information into the configuration information of the target application container group, so that the target working node acquires the processor core allocation information from the configuration information and dispatches the target processor core to the target application container group based on the processor core allocation information.
According to a sixth aspect of the present application, there is provided a resource scheduling apparatus, which applies a target work node, including:
a second obtaining module, configured to obtain, from configuration information of a target application container group, processor core allocation information of the target application container group, where the processor core allocation information is stored in the configuration information of the target application container group by a predetermined node, the processor core allocation information is determined by the predetermined node based on a preset allocation condition and a target number of processor cores requested by the target application container group, the processor core allocation information includes information of a target processor core allocated for the target application container group in a target work node, the target work node is determined by the predetermined node according to obtained device information of a processor on the work node, and the number of idle processor cores in the target work node is not less than the target number;
and the scheduling module is used for scheduling the target processor core to the target application container group based on the processor core allocation information.
According to a seventh aspect of the present application, there is provided a resource scheduling apparatus comprising:
a first obtaining module, configured to obtain a resource scheduling request for a target application container group, where the resource scheduling request includes a target number of a first processor core requested by the target application container group; the first processor core comprises a processor core of an artificial intelligence chip;
the target working node determining module is used for determining a target working node according to the acquired equipment information of the artificial intelligence chip on the working node, wherein the number of idle first processor cores in the target working node is not less than the target number;
the allocation information determining module is used for determining the allocation information of the processor cores of the target application container group based on preset allocation conditions and the target number, wherein the allocation information of the processor cores comprises information of target first processor cores allocated for the target application container group in the target working node;
and the first storage module is used for storing the processor core allocation information into the configuration information of the target application container group, so that the target working node acquires the processor core allocation information from the configuration information and schedules the target first processor core to the target application container group based on the processor core allocation information.
According to an eighth aspect of the present application, there is provided a resource scheduling apparatus, which applies a target work node, including:
a second obtaining module, configured to obtain processor core allocation information of a target application container group from configuration information of the target application container group, the processor core allocation information is stored in the configuration information of the target application container group by a predetermined node, the processor core allocation information is determined by the predetermined node based on a preset allocation condition and a target number of the first processor cores requested by the target application container group, the first processor core comprises a processor core of an artificial intelligence chip, the processor core allocation information comprises information of a target first processor core allocated for the target application container group in a target work node, the target working node is determined by the preset node according to the acquired equipment information of the artificial intelligence chip on the working node, the number of idle first processor cores in the target working node is not less than the target number;
and the scheduling module is used for scheduling the target first processor core to the target application container group based on the processor core allocation information.
According to a ninth aspect of embodiments herein, there is provided a computing device comprising: a processor and a memory storing computer program instructions;
the processor, when executing the computer program instructions, implements the resource scheduling method as provided in the first, second, third or fourth aspect above.
According to a tenth aspect of embodiments of the present application, there is provided a computer storage medium having computer program instructions stored thereon, which when executed by a processor, implement the resource scheduling method as provided in the first, second, third or fourth aspect described above.
According to the embodiment of the application, the resource scheduling request for the target application container group takes the processor core as a unit, and when the resource is scheduled for the target application container group, the allocation information of the processor core of the target application container group is determined. That is, the unit of the resource requested by the target application container group is the processor core, and the unit of the resource allocated to the target application container group is also the processor core, that is, the minimum unit of the resource requested by the application container group is consistent with the minimum unit of the resource used, so that the waste of the resource can be avoided.
Drawings
In order to more clearly illustrate the technical solutions of the embodiments of the present application, the drawings needed to be used in the embodiments of the present application will be briefly described below, and for those skilled in the art, other drawings can be obtained according to the drawings without creative efforts.
Fig. 1 is a schematic flowchart of a resource scheduling method according to a first embodiment of the present application;
fig. 2 is a flowchart illustrating a resource scheduling method according to a second embodiment of the present application;
fig. 3 is a schematic flowchart of a resource scheduling method according to a third embodiment of the present application;
fig. 4 is a schematic flowchart of a resource scheduling method according to a fourth embodiment of the present application;
fig. 5 is a flowchart illustrating a fifth embodiment of a resource scheduling method provided in the present application;
fig. 6 is a schematic flowchart of a resource scheduling method according to a sixth embodiment of the present application;
fig. 7 is a schematic structural diagram of a resource scheduling apparatus according to a first embodiment of the present application;
fig. 8 is a schematic structural diagram of a resource scheduling apparatus according to a second embodiment of the present application;
fig. 9 is a schematic structural diagram of a resource scheduling apparatus according to a third embodiment of the present application;
fig. 10 is a schematic structural diagram of a resource scheduling apparatus according to a fourth embodiment of the present application;
fig. 11 is a schematic structural diagram of an embodiment of a computing device provided in the present application.
Detailed Description
Features and exemplary embodiments of various aspects of the present application will be described in detail below, and in order to make objects, technical solutions and advantages of the present application more apparent, the present application will be further described in detail below with reference to the accompanying drawings and the embodiments. It should be understood that the specific embodiments described herein are merely illustrative of the present application and are not intended to limit the present application. It will be apparent to one skilled in the art that the present application may be practiced without some of these specific details. The following description of the embodiments is merely intended to provide a better understanding of the present application by illustrating examples thereof.
It is noted that, herein, relational terms such as first and second, and the like may be used solely to distinguish one entity or action from another entity or action without necessarily requiring or implying any actual such relationship or order between such entities or actions. Also, the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or apparatus. Without further limitation, an element defined by the phrase "comprising … …" does not exclude the presence of other identical elements in a process, method, article, or apparatus that comprises the element.
Container (Container) is a lightweight virtualization technology, and has been rapidly developed in recent years. The container technology creates independent operating environments for different application programs, realizes resource isolation, configuration and safety guarantee, and can meet the resource demand of application allocation according to the demand and ensure the isolation and usability of the application.
In order to meet the requirement of large-scale applications, in practice, many containers are often deployed in a computer cluster for unified management and external service provision, and therefore a container cluster management system is needed. For example, a container cluster management system currently has the kubernets. Kubernets is an open source system for automatically deploying, expanding and managing containerized (containerized) applications.
Resource scheduling is an important issue that needs to be addressed by a container cluster management system. The resource scheduling refers to selecting a node suitable for deploying the container into a cluster from a plurality of nodes of a computer cluster through a certain rule for an application container group to be deployed and allocating resources for the application container group to be deployed.
Wherein the application container group comprises one or more containers. An application is enclosed in the application container group. The containers in the application container group are scheduled to run on a node as a whole.
Currently, when scheduling resources for an application container group, a container cluster management system generally performs scheduling at a processor level. That is, if an application container group requests N processors, the container cluster management system can select an idle processor for use by the application container group, and all processor cores (cores) on the N processors are also assigned to the application container group.
As one example, the container cluster management system is kubernets. Fig. 1 shows a schematic diagram of a first embodiment of a resource scheduling method provided by the present application. As shown in fig. 1, kubernets includes a control node 10 and a plurality of working nodes 20. Commands may be sent to each worker node 20 by control node 10. In short, the control node 10 is an administrator, and the work node 20 is an administrator.
The working node 20 or the control node 10 may be a machine or a virtual machine. A plurality of application container groups may be run on top of the working node 20. Pod is the smallest unit managed by Kubernetes, while each Pod can contain multiple containers.
Background services running on the control node 10 generally include an Application Programming Interface server (API server) and a Scheduler (Scheduler).
The API server is a front-end interface to kubernets, and various client tools, as well as other components of kubernets, may manage the various resources of the cluster through the API server. The Scheduler is responsible for deciding on which working node to place the pod for operation and the resources allocated for the pod.
For example, a model predictive application is packaged in the application container group. Referring to fig. 1, a client sends a resource scheduling request of an application container group requesting 1 embedded neural Network Processor (NPU) and 2core to a control node 10. The API server in the control node 10 receives the resource scheduling request sent by the client. Based on the resource scheduling request received by the API server, the Scheduler schedules the application container group to run on the first working node 20, and allocates an NPU on the first working node 20 for use by the application container group. If there are 4 cores (4 cores) on 1 NPU assigned to the application container group, but the application container group only uses 2 cores, and other 2 cores are not used, and the other application container groups cannot use the free 2 cores, which results in waste of resources.
Based on this, the present application provides a resource scheduling method, apparatus, device, and medium, where when allocating resources for an application container group, a processor core is used as a unit, that is, a unit of resources allocated to the application container group is also a processor core, that is, a minimum unit of resources requested by the application container group is consistent with a minimum unit of resources used, so that waste of resources can be avoided.
The resource scheduling method provided by the application is introduced below by combining with a Kubernetes scene.
In an embodiment of the present application, a node, that is, a predetermined node, may be pre-selected from a computer cluster, and a Scheduler extension application (Scheduler extender) is deployed on the node, so that the predetermined node executes the resource scheduling method provided in the present application. For example, one working node may be selected in advance from a plurality of working nodes as the predetermined node.
In the embodiment of the present application, a processor Device plug-in (Device plug-in) may be deployed in each working node in advance. The processor device plug-in is used for acquiring the device information of the processor on the working node where the processor device plug-in is located.
In some embodiments, the device information of the processors on the working node includes information such as a device identification of each processor on the working node, a total number of processor cores on each processor, a total number of free processor cores (unused processor cores) on each processor, and total number information of processor cores. The information processing procedure of only one working node is schematically shown in fig. 2.
With continued reference to fig. 2, for each worker node, when the processor device plug-in on the worker node starts, the processor device plug-in obtains the device information of the processor on the worker node. The processor device plug-in on the working node may report the acquired device information of the processor on the working node to a service process Kubelet in the working node. Meanwhile, the processor device plug-in on the working node may store the acquired device information of the processor on the working node into the configMap resource object on the working node.
The configMap resource object is used for storing configuration information, and is an information temporary exchange place. The service process Kubelet receives and executes the instruction sent by the control node 10, and manages the pod and the container in the pod. The service process Kubelet will register the information of the working node on the API Server, periodically report the resource usage of the working node to the control node 10, and monitor the resources of the working node and the container.
For example, the predetermined node is a working node. As can be seen from fig. 2, the scheduler extension application running on the predetermined node can read the device information of the processor on its own through the configMap resource object and store the device information in its own cache. The scheduler extension application running on the predetermined node can also read the device information of the processors on other working nodes through the configMap resource object on each other working node and store the device information into the cache of the scheduler extension application.
As shown in fig. 2, the API server in the control node 10 receives a resource scheduling request for a target application container group sent by a client. Wherein the resource scheduling request includes a target number of processor cores requested by the target application container group. The predetermined node may obtain the resource scheduling request from the control node 10.
And the predetermined node determines a target working node according to the acquired resource scheduling request and the acquired equipment information of the processor on the working node. And the number of idle processor cores in the target working node is not less than the target number. The target work node is the work node allocated for the target application container group.
Then, the predetermined node determines processor core allocation information of the target application container group based on the preset allocation condition and the target number. Wherein the processor core allocation information comprises information of a target processor core allocated for the target application container group in the target work node.
The predetermined node stores the processor core allocation information in configuration information (pod spec) of the target application container group. Referring to fig. 2, the scheduler extension application in the predetermined node stores processor core allocation information in configuration information (pod spec) of the target application container group. And simultaneously, binding the target application container group to the target work node.
And the target working node acquires the allocation information of the processor cores from the configuration information and schedules the target processor cores to the target application container group based on the allocation information of the processor cores.
Referring to fig. 2, the processor device plug-in the target work node obtains the processor core allocation information of the target application container group from the configuration information of the target application container group, and schedules the target processor core to the target application container group based on the processor core allocation information.
In the embodiment of the application, the resource scheduling request for the target application container group takes the processor core as a unit, and when the resource is scheduled for the target application container group, the processor core allocation information of the target application container group is determined. That is, the unit of the resource requested by the target application container group is the processor core, and the unit of the resource allocated to the target application container group is also the processor core, that is, the minimum unit of the resource requested by the application container group is consistent with the minimum unit of the resource used, so that the waste of the resource can be avoided.
Fig. 3 is a flowchart illustrating a resource scheduling method according to an embodiment of the present application, where an execution subject of the method is a predetermined node in which a scheduler extension application is preconfigured. As shown in fig. 3, the resource scheduling method 300 provided by the present application includes the following steps:
The specific implementation of each of steps 310 to 340 is described below.
In step 310, the set of target application containers includes one or more containers. The target application container group encloses a certain application. For example, a target application container set may have an artificial intelligence application, such as a model prediction application, encapsulated therein.
In an embodiment of the application, in order to improve utilization of processor cores of processors in a work node, a resource level requested by a resource scheduling request for a target application container group is a processor core level. The resource scheduling request for the target application container group therefore includes a target number of processor cores required for the target application container group to operate.
In some embodiments, if the artificial intelligence application is packaged in the target application container group, the processor core requested in the resource scheduling request may be the NPU. Wherein, the NPU comprises at least one processor core.
In other embodiments, the processor on the working node may be a Central Processing Unit (CPU), a Tensor Processing Unit (TPU), or a Field Programmable Gate Array (FpGA) chip. For different processors, each has a respective processor core.
In some embodiments of the present application, if multiple types of processors exist on the work node, the resource scheduling request of the target application container group may include the type and the corresponding number of the processor cores requested by the target application container group.
The specific implementation of step 320 is described below. In the embodiment of the present application, the device information of the processors on the working node includes information about the existence of the processors on the working node (i.e., whether the processors exist on the working node), the number of processors on the working node, a device identifier of each processor, the number of idle processor cores on each processor, the number of processor cores on each processor, and the total number of idle processor cores on the working node.
In some embodiments, the predetermined node may determine the total number of idle processor cores on each working node based on device information of the processors on each working node. If the operation of the target application container group is to be realized, the total number of idle processor cores on the working nodes which need to be allocated to the target application container group is not less than the target number, that is, the total number of processor cores requested by the target application container group.
In some embodiments, the working nodes with the total number of idle processor cores not less than the target number can be screened out based on the total number of idle processor cores on each working node and the target number. If the total number of the idle processor cores is not less than the target number of the working nodes, one working node can be selected as the target working node.
In some embodiments, in order to improve the rationality of resource scheduling, when determining the target working node, information of multiple dimensions on the target working node may be considered comprehensively to achieve load balancing. Thus, in some embodiments, step 320 includes steps 3201 through 3204. Step 3201, acquiring a first working node set, each working node in the first working node set having a processor; step 3202, screening a second working node set from the first working node set, wherein the number of idle processors on each working node in the second working node set is not less than the target number; step 3203, obtaining a first score of each working node in the second working node set based on the first preset scoring condition and the device information of the processor on each working node in the second working node set; the first preset scoring condition is determined based on the number of processors on the working node and the number of idle processor cores in the processors on the working node; step 3204, according to each first score, a target work node is determined.
In the embodiment of the present application, if it is desired to achieve that the target application container group can normally operate, the working node needs to have a processor required by the target application container group.
In some embodiments, the predetermined node may have stored thereon identification information of the working node having the processor in advance. Then, the predetermined node may determine the first working node set according to the pre-stored identification information of the working nodes having the processors.
In further embodiments, the predetermined node may also obtain the first set of working nodes from a scheduler of the control node 10. And the first working node set is screened out by the scheduler based on a preset screening condition. The preset screening condition is determined based on at least one of processor information, memory information and processing performance information in the working node.
For example, the preset filtering condition includes at least one of the processor existing on the working node, the memory usage rate of the working node being greater than a first preset memory usage rate threshold, and the processing performance of the working node being greater than a first preset processing performance parameter.
As an example, the scheduler in the control node 10 may obtain information such as processor information, memory usage, and processing performance information on each work node in the container cluster management system. Then, the scheduler may perform screening based on preset screening conditions and processor information, memory usage rate, and processing performance information on each working node, and screen out working nodes that satisfy the condition that a processor exists, the memory usage rate is greater than a preset memory usage rate threshold, and the processing performance is greater than a preset processing performance parameter, as working nodes in the first working node set.
Referring to fig. 2, a scheduler extension application in a predetermined node may obtain a first set of working nodes from a scheduler. As one example, the scheduler may send identification information of each working node in the first set of working nodes to the predetermined node. For example, the scheduler sends a list of identifications of the working nodes in the first set of working nodes to the scheduler extension application in the predetermined node.
In the embodiment of the application, a part of working nodes with poor performance can be filtered out by acquiring the first working node set screened out based on the preset screening condition from the scheduler, so that the processing performance of the container cluster management system can be improved.
In step 3202, if it is desired to achieve that the target application container group can normally operate, the number of idle processor cores on the working node is required to be not less than the target number.
In the embodiment of the application, working nodes, the total number of which is not less than the target number, of the idle processor cores in the first working node set can be screened out as the working nodes in the second working node set based on the total number of the idle processor cores in each working node and the target number.
In step 3203, there may be multiple working nodes in the second working node set, and in order to improve load balancing, it is necessary to schedule a more suitable working node for the target application container group.
In the embodiment of the present application, the number of idle processor cores on each working node in the second working node set is not less than the target number, but the number of processors on each working node and the number of idle processor cores in each processor are different. Therefore, the combination manner of allocating the target number of processor cores from the work nodes is different for different work nodes.
As an example, working node a has 1 processor, including 4 processor cores, of which 2 processor cores are already occupied, i.e., the number of idle processor cores is 2. The working node B has 2 processors, each of which includes 2 processor cores, and the number of idle processor cores in each processor is 1. If the target application container group requests 2 processor cores, for the working node a, the combination manner of the processor cores satisfying the resource scheduling request of the target application container group includes 2 processor cores in 1 processor on the working node a. Then for the working node B, the combination of the processor cores that satisfy the resource scheduling request of the target application container group includes 1 idle processor core that is owned by each of the 2 processors on the working node B.
Because the different combination modes of the processor cores may cause different efficiency of resource scheduling, the first preset scoring condition may be determined based on the number of processors on the working nodes and the number of idle processor cores in the processors on the working nodes, that is, the first preset scoring condition is determined by using the combination modes of the processor cores on the working nodes, so as to score each working node in the second working node set, and obtain the first score of each working node. The predetermined node may then select the most suitable worker node for the target application container group to operate based on the first score for each worker node in the second set of worker nodes.
As one example, the first preset scoring condition may include at least one of the following conditions:
whether the processor cores allocated to the target application container group by the working node can be correspondingly scored on one processor or not, if so, the scoring corresponding to the number of the idle processor cores left on the processor after the processor cores are allocated to the target application container group and the scoring corresponding to the different numbers of the processors on the working node.
In one embodiment, for example, the first preset scoring condition includes whether the processor core assigned by the worker node for the target application container group can be scored on one processor correspondingly. The predetermined node can determine whether the processor core allocated to the target application container group by the working node can be on one processor or not based on the number of idle processor cores on each working node, so that a corresponding score can be obtained, and the score is used as a first score corresponding to the working node.
In the embodiment of the application, if the processor core allocated to the target application container group by the working node can have a corresponding score on one processor, the score is larger than the score that the processor core allocated to the target application container group by the working node cannot have a corresponding score on one processor. That is, in order to increase the communication bandwidth, the processor cores more likely to be allocated for the target application container group are all in one processor.
As one example, a target application container group, for example, requests 2 processor cores. The working node C includes 2 NPUs, each NPU including 2 cores, but each NPU has only 1 free core, and two NPUs are required to respectively contribute one core to be allocated to the target application container group. Working node D includes 1 NPU, including 2 idle cores. The first score of working node D is higher than the first score of working node C.
Because communication between NPUs reduces bandwidth, there is a general tendency for the processor cores allocated for the target application container group to all be in one processor in order to improve resource scheduling efficiency.
For another example, the first preset scoring condition includes: if the processor cores allocated to the target application container group can be on one processor, the score corresponding to the number of the idle processor cores left on the processor after the processor cores are allocated to the target application container group. The preset node is based on the acquired number of idle processor cores in the processor in the working node, and the number is subtracted from the target number, so that the number of the idle processor cores remaining on the processor after the processor cores are allocated to the target application container group can be obtained, a score corresponding to the number is obtained, and the score is used as a first score corresponding to the working node.
If the processor cores allocated to the target application container group are on one processor, the smaller the number of idle processor cores remaining on the processor after the processor cores allocated to the target application container group are, the higher the score corresponding to the number is. In order to increase the utilization rate of the processor core, the processor cores of the processor which are already partially utilized are preferentially allocated, but a processor which is not utilized is used.
For example, the target application container group requests 2 cores. The working node E includes 1 NPU, which includes 4 cores, with 2 idle cores. Working node F includes 1 NPU, including 5 free cores, and the first score of working node E is higher than the first score of working node F.
For another example, the first preset scoring condition includes scores corresponding to different numbers of processors on the working node. The predetermined node may obtain the total number of processors on the working node to obtain a score corresponding to the number, and use the score as a first score corresponding to the working node.
In some embodiments, the higher the total number of processors on a working node, the lower the score for that number.
For example, the target application container group requests 2 processor cores. The working node M includes 2 NPUs, each NPU including 2 cores, but only 1 free core in each NPU. Working node N includes 1 NPU, including 2 idle cores, and the first score for working node N is higher than the first score for working node M.
In the embodiment of the present application, a score of each working node may be obtained based on the three conditions listed above, and then the obtained scores are added to finally obtain the first score of the working node.
In an embodiment of the present application, the predetermined node may further obtain the first score of the working node by using other preset scoring conditions, which is not specifically limited herein.
In the embodiment of the application, when determining the target working node for the target application container group, working nodes of processor cores on one processor which can be allocated for the target application container group are preferentially inclined, working nodes where partially utilized processors are located are secondly inclined, and working nodes with fewer processors are secondly inclined.
In some embodiments, the first highest-scoring working node in the second set of working nodes may be taken as the target working node.
In other embodiments, to further improve the rationality of resource scheduling, step 1304 includes: sending the first score of each working node in the second working node set to a scheduler, so that the scheduler determines a third score of each working node based on the first score and the second score of each working node in the second working node set, and the scheduler determines target information according to each third score; the second grade of the working node is determined by the dispatcher based on a second preset grade condition; the second preset scoring condition is determined based on the disk information, the memory information and the processing performance information on the working node; receiving target information sent by a scheduler; and determining a target working node according to the target information.
And the target information is used for indicating that the working node with the highest third grade is determined as the target working node.
In some embodiments, the predetermined node obtains a first score for each working node in the second set of working nodes based on a combination of the processor cores. In order to further screen the working nodes in the second working node to obtain the working nodes more suitable for the operation of the target application container group, the screening may be performed again.
Since the size of the disk space, the memory information, and the processing performance information on the working node all affect the operating efficiency of the target application container group, the second scoring condition may be determined based on at least one of the disk information, the memory information, and the processing performance information on the working node.
For example, the second preset scoring condition includes at least one of scores corresponding to different disk remaining spaces, scores corresponding to different memory usage rates, and scores corresponding to different processing performances.
As an example, for each working node, the scheduler may determine a sum of a score corresponding to the disk remaining space of the working node, a score corresponding to the memory usage rate of the working node, and a score corresponding to the processing performance of the working node as the second score of the working node.
And for each working node, the dispatcher performs weighted summation on the first score of the working node and the second score of the working node to obtain a third score of the working node.
In the embodiment of the present application, since the combined manner of the processor cores slightly affects resource scheduling, the weight corresponding to the first score may be preset to be greater than the weight corresponding to the second score.
In an embodiment of the present application, the scheduler determines a third score for each working node in the second set of working nodes and then sends the target information to the predetermined node.
The target information includes identification information of the working node with the highest third score, and the target information is used for indicating that the working node with the highest third score is determined as the target working node. And after the scheduler extension application in the predetermined node receives the target information, determining the working node with the highest third grade as the target working node based on the target information.
Referring to fig. 2, the scheduler extension application in the predetermined node transmits the first score of each working node to the scheduler. And the dispatcher carries out weighted summation on the basis of the first score of the working node and the second score of the working node to obtain a third score of the working node. And the scheduler transmits target information for indicating that the working node with the highest third grade is determined as the target working node to the scheduler extension application in the preset node. The scheduler extension application in the predetermined node determines the highest-ranked working node as the target working node based on the target information.
In the embodiment of the application, the third score of the working node is obtained by combining the first score of the working node determined based on the combination mode of the processor core and the second score of the working node determined based on the performance information of the working node, so that the working node suitable for the target application container group is screened according to the multi-dimension information of the working node. The working nodes suitable for the target application container group are screened by utilizing the information of the multiple dimensions of the working nodes, the considered influence factors are more comprehensive, and the rationality of resource scheduling is improved.
The specific implementation of step 330 is described below.
In a self embodiment, the preset allocation conditions include: the target processor core assigned to the target application container group belongs to at least one processor.
In some embodiments, to increase the communication bandwidth, the preset allocation condition may be: the target processor core allocated by the target work node for the target application container group belongs to one processor. That is, the processor of the target work node may assign a portion of the processor cores to the application container group, but the processor cores requested by the application container group cannot come from two or more processors.
For example: and (3) requesting 3 processor cores by an application container group, wherein 1 processor on the target working node has 4 processor cores, 3 processor cores can be allocated to the application container group, and the rest 1 processor cores can be reserved for other application container groups.
In other embodiments, in order to meet the requirement of large processor core demand, the preset allocation condition may be that the target processor core allocated by the target work node for the target application container group may belong to multiple processors. That is, the processor core requested by an application container group may come from multiple processors, the remaining processor cores of the processors may be allocated for use by other application container groups,
for example: an application container group requests 3 processor cores, and the 3 processor cores can be from one NPU card or from a plurality of NPU cards.
In the embodiment of the application, because the target processor cores allocated to the target application container group may belong to multiple processors, when the number of idle processor cores on each processor on the target work node is less than the number of processor cores requested by the target application container group, the idle processor cores on the multiple processors may be combined and allocated to the target application container group for use, so that the application universality may be improved.
In the embodiment of the application, if a plurality of processor core combination modes exist on the working node and can meet the target application container group, one processor core combination mode can be selected randomly, or the processor core combination mode with the highest priority can be selected according to the preset priorities corresponding to different processor core combination modes.
As an example, the target worker node has 3 processors, the 1 st processor has 3 idle processor cores, the 2 nd processor has 1 idle processor core, and the 3 rd processor has 2 processor cores. If the target application container group requests 3 processor cores, there are 2 processor core combination modes. The first processor core combination mode comprises 3 idle processor cores in the 1 st processor, and the second processor core combination mode comprises 1 idle processor core in the 2 nd processor and 2 idle processor cores in the 3 rd processor.
And if the preset priority of the processor core combination mode from the same processor is higher than the priority of the processor core combination modes from the plurality of processors, the target processor cores distributed to the target application container group by the target node comprise 3 idle processor cores in the 1 st processor.
In the embodiment of the application, the processor core allocation information includes information such as the number of target processor cores allocated for the target application container group in the target work node, the device identification of the processor to which each target processor core belongs, and the position information of each target processor core in the processor to which each target processor core belongs.
The specific implementation of step 340 is described below.
In some embodiments of the present application, referring to fig. 2, the scheduler extension application in the predetermined node stores the processor core allocation information into the configuration information (pod spec) of the target application container group, so that the target working node can obtain the processor core allocation information from the configuration information of the target application container group to implement scheduling of the target application container group.
It should be noted that, before storing the processor core allocation information in the configuration information of the target application container group, the resource scheduling method provided in the embodiment of the present application further includes associating the target application container group with the target working node.
In the embodiment of the present application, associating the target application container group with the target work node is to bind the target application container group to the target work node.
Fig. 4 is a flowchart illustrating a resource scheduling method according to another embodiment of the present application, where an execution subject of the method is a target work node. As shown in fig. 4, the resource scheduling method provided by the present application includes: .
and step 420, scheduling the target processor core to the target application container group based on the processor core allocation information.
In an embodiment of the present application, based on the above-mentioned embodiment of the resource scheduling method applied to the predetermined node side, it is known that the predetermined node stores the processor core allocation information of the target application container group into the configuration information of the target application container group. Therefore, the target work node can acquire the processor core allocation information of the target application container group from the configuration information of the target application container group.
Referring to fig. 2, the processor device plug-in the target work node may obtain the processor core allocation information of the target application container group from the configuration information of the target application container group.
In some embodiments, step 420 comprises: based on the processor core allocation information, mounting the processor to which the target processor core belongs to the target application container group; and injecting the processor core allocation information into the target application container group so that the target application container group runs by using the target processor core.
In the embodiment of the present application, the processor device plug-in on the target work node may obtain, according to the processor core allocation information in the configuration information of the target application container group, the device identifier of the processor to which the target processor core allocated by the target work node for the target application container group belongs. And the processor device plug-in on the target working node mounts the processor to which the target processor core belongs to the target application container group based on the device identification of the processor to which the target processor core belongs.
When the dispatcher deploys the target application container group, information such as processor equipment identification corresponding to the target processor core allocated to the application container group, position information of the target processor core in the processor to which the target processor core belongs and the like is injected through the environment variable, and meanwhile, the value of the environment variable is analyzed in the application container group.
In an embodiment of the present application, prior to step 410, upon startup of the processor device plug-in on the target worker node, the target worker node sends device information of the processor on the target worker node to the predetermined node, so that the predetermined node determines the target worker node based on the device information of the processor on each worker node.
With the maturity of artificial intelligence technology, artificial intelligence chips have also been developed rapidly. In order to improve the utilization rate of the processor core in the artificial intelligence chip, the application also provides a resource scheduling method. Fig. 5 is a flowchart illustrating a resource scheduling method according to a third embodiment of the present application. Fig. 5 shows a resource scheduling method 500 applied to a predetermined node, the method including:
In an embodiment of the present application, the first processor core in step 510 is a processor core of an artificial intelligence chip. In the embodiment of the present application, the artificial intelligence chip refers to a chip that performs accelerated design on an artificial intelligence algorithm, that is, a module that is specially used for processing a large number of calculation tasks in an artificial intelligence application.
In some embodiments, the artificial intelligence chip may be a GPU chip, an NPU chip, an FPGA chip, or an Application Specific Integrated Circuit (ASIC) chip. The artificial intelligence chip includes one or more processor cores. For example, the NPU chip may be used to handle model prediction tasks.
In the embodiment of the present application, the implementation manner of step 510 is similar to the specific implementation manner of step 310, the implementation manner of step 520 is similar to the specific implementation manner of step 320, the implementation manner of step 530 is similar to the specific implementation manner of step 330, and the implementation manner of step 540 is similar to the specific implementation manner of step 340, and is not described herein again. In the resource scheduling method 500, the processor is an artificial intelligence chip, and the target application container group requests a processor core of the artificial intelligence chip.
It should be noted that the device information of the artificial intelligence chip on the working node includes information such as a device identifier of each artificial intelligence chip on the working node, a total number of processor cores on each artificial intelligence chip, a total number of idle processor cores (unused processor cores) on each artificial intelligence chip, and a total number of processor cores.
In the embodiment of the application, the resource scheduling request for the target application container group takes the processor core of the artificial intelligence chip as a unit, and when the resource is scheduled for the target application container group, the allocation information of the processor core of the target application container group is determined. That is, the unit of the target application container group requesting the resource is the processor core of the artificial intelligence chip, and the unit of the resource allocated to the target application container group is also the processor core of the artificial intelligence chip, that is, the minimum unit of the application container group requesting the resource is consistent with the minimum unit of the used resource, so that the waste of the resource can be avoided, and the utilization rate of the processing core in the artificial intelligence chip can be improved.
Fig. 6 is a flowchart illustrating a resource scheduling method according to a fourth embodiment of the present application. The resource scheduling method 600 shown in fig. 6 is applied to a target work node, and the method includes:
In the embodiment of the present application, the implementation manner of step 610 is similar to the specific implementation manner of step 410, and the implementation manner of step 620 is similar to the specific implementation manner of step 420, and is not described herein again. The difference from the resource scheduling method 400 is that in the resource scheduling method 600, the processor is an artificial intelligence chip, and what is requested by the target application container group is a processor core of the artificial intelligence chip.
In the embodiment of the application, the resource scheduling request for the target application container group takes the processor core of the artificial intelligence chip as a unit, and when the resource is scheduled for the target application container group, the allocation information of the processor core of the target application container group is determined. That is, the unit of the target application container group requesting the resource is the processor core of the artificial intelligence chip, and the unit of the resource allocated to the target application container group is also the processor core of the artificial intelligence chip, that is, the minimum unit of the application container group requesting the resource is consistent with the minimum unit of the used resource, so that the waste of the resource can be avoided, and the utilization rate of the processing core in the artificial intelligence chip can be improved.
Fig. 7 is a schematic structural diagram of a resource scheduling apparatus according to an embodiment of the present application. As shown in fig. 7, the resource scheduling apparatus 700 includes:
a first obtaining module 710, configured to obtain a resource scheduling request for a target application container group, where the resource scheduling request includes a target number of processor cores requested by the target application container group;
a target working node determining module 720, configured to determine a target working node according to the acquired device information of the processors on the working nodes, where the number of idle processor cores in the target working node is not less than the target number;
an allocation information determining module 730, configured to determine, based on a preset allocation condition and a target number, processor core allocation information of a target application container group, where the processor core allocation information includes information of a target processor core allocated for the target application container group in a target work node;
the first storage module 740 is configured to store the processor core allocation information into the configuration information of the target application container group, so that the target work node obtains the processor core allocation information from the configuration information, and schedules the target processor core to the target application container group based on the processor core allocation information.
In some embodiments of the present application, the processor core comprises an embedded neural network processor core.
In some embodiments of the present application, the device information of the processor on the worker node includes the number of idle processor cores on the worker node;
the target work node determining module 720 includes:
the system comprises a first working node set acquisition unit, a first working node set acquisition unit and a second working node set acquisition unit, wherein the first working node set acquisition unit is used for acquiring a first working node set, and each working node in the first working node set is provided with a processor;
the screening unit is used for screening a second working node set from the first working node set, and the number of idle processor cores on each working node in the second working node set is not less than the target number;
the first score determining unit is used for obtaining a first score of each working node in the second working node set based on a first preset score condition and equipment information of a processor on each working node in the second working node set; the first preset scoring condition is determined based on the number of processors on the working node and the number of idle processor cores in the processors on the working node;
and the target working node determining unit is used for determining a target working node according to each first score.
In some embodiments of the present application, the target working node determining unit is configured to:
sending the first score of each working node in the second working node set to a scheduler, so that the scheduler determines a third score of each working node based on the first score and the second score of each working node in the second working node set, and the scheduler determines target information according to each third score; the second grade of the working node is determined by the dispatcher based on a second preset grade condition; the second preset scoring condition is determined based on at least one of the disk information, the memory information and the processing performance information on the working node;
receiving target information sent by a scheduler;
determining a target working node according to the target information;
and the target information is used for indicating that the working node with the highest third grade is determined as the target working node.
In some embodiments of the present application, the first working node set obtaining unit is configured to:
acquiring a first working node set from a scheduler, wherein the first working node set is screened out by the scheduler based on a preset screening condition;
the preset screening condition is determined based on at least one of processor information, memory information and processing performance information in the working node.
In some embodiments of the present application, the preset dispensing conditions include:
the target processor core assigned to the target application container group belongs to at least one processor.
In some embodiments of the present application, the resource scheduling apparatus 700 further includes:
and the association module is used for associating the target application container group with the target working node.
Other details of the resource scheduling apparatus 700 according to the embodiment of the present application are similar to the resource scheduling method according to the embodiment of the present specification described above with reference to fig. 3, and are not repeated herein.
Fig. 8 is a schematic structural diagram of a resource scheduling apparatus according to an embodiment of the present application. As shown in fig. 8, the resource scheduling apparatus 800 is applied to a target work node, and includes:
a second obtaining module 810, configured to obtain, from configuration information of a target application container group, processor core allocation information of the target application container group, where the processor core allocation information is stored in the configuration information of the target application container group by a predetermined node, the processor core allocation information is determined by the predetermined node based on a preset allocation condition and a target number of processor cores requested by the target application container group, the processor core allocation information includes information of a target processor core allocated for the target application container group in a target working node, the target working node is determined by the predetermined node according to obtained device information of a processor on the working node, and the number of idle processor cores in the target working node is not less than the target number;
a scheduling module 820 for scheduling the target processor core to the target application container group based on the processor core allocation information.
In some embodiments of the present application, the resource scheduling apparatus 800 further includes:
and the second storage module is used for storing the equipment information of the processor on the target working node into the resource object so that the first working node acquires the equipment information of the processor on the target working node from the resource object.
In some embodiments of the present application, the scheduling module 820 is configured to:
based on the processor core allocation information, mounting the processor to which the target processor core belongs to the target application container group;
and injecting the processor core allocation information into the target application container group so that the target application container group runs by using the target processor core.
Other details of the resource scheduling apparatus 800 according to the embodiment of the present application are similar to the resource scheduling method according to the embodiment of the present specification described above with reference to fig. 4, and are not repeated herein.
Fig. 9 is a schematic structural diagram of a resource scheduling apparatus according to an embodiment of the present application. As shown in fig. 9, the resource scheduling apparatus 900 includes:
a first obtaining module 910, configured to obtain a resource scheduling request for a target application container group, where the resource scheduling request includes a target number of a first processor core requested by the target application container group; the first processor core comprises a processor core of an artificial intelligence chip;
a target working node determining module 920, configured to determine a target working node according to the acquired device information of the artificial intelligence chip on the working node, where the number of idle first processor cores in the target working node is not less than the target number;
an allocation information determining module 930, configured to determine, based on a preset allocation condition and the target number, processor core allocation information of the target application container group, where the processor core allocation information includes information of a target first processor core allocated for the target application container group in the target work node;
a first storing module 940, configured to store the processor core allocation information into the configuration information of the target application container group, so that the target work node obtains the processor core allocation information from the configuration information, and schedules the target first processor core to the target application container group based on the processor core allocation information.
In the embodiment of the application, the resource scheduling request for the target application container group takes the processor core of the artificial intelligence chip as a unit, and when the resource is scheduled for the target application container group, the allocation information of the processor core of the target application container group is determined. That is, the unit of the target application container group requesting the resource is the processor core of the artificial intelligence chip, and the unit of the resource allocated to the target application container group is also the processor core of the artificial intelligence chip, that is, the minimum unit of the application container group requesting the resource is consistent with the minimum unit of the used resource, so that the waste of the resource can be avoided, and the utilization rate of the processing core in the artificial intelligence chip can be improved.
Other details of the resource scheduling apparatus 900 according to the embodiment of the present application are similar to the resource scheduling method according to the embodiment of the present specification described above with reference to fig. 5, and are not repeated herein.
Fig. 10 is a schematic structural diagram of a resource scheduling apparatus according to an embodiment of the present application. As shown in fig. 10, the resource scheduling apparatus 1000 includes:
a second obtaining module 1010, configured to obtain processor core allocation information of a target application container group from configuration information of the target application container group, the processor core allocation information is stored in the configuration information of the target application container group by a predetermined node, the processor core allocation information is determined by the predetermined node based on a preset allocation condition and a target number of the first processor cores requested by the target application container group, the first processor core comprises a processor core of an artificial intelligence chip, the processor core allocation information comprises information of a target first processor core allocated for the target application container group in a target work node, the target working node is determined by the preset node according to the acquired equipment information of the artificial intelligence chip on the working node, the number of idle first processor cores in the target working node is not less than the target number;
a scheduling module 1020 configured to schedule the target first processor core to the target application container group based on the processor core allocation information.
In the embodiment of the application, the resource scheduling request for the target application container group takes the processor core of the artificial intelligence chip as a unit, and when the resource is scheduled for the target application container group, the allocation information of the processor core of the target application container group is determined. That is, the unit of the target application container group requesting the resource is the processor core of the artificial intelligence chip, and the unit of the resource allocated to the target application container group is also the processor core of the artificial intelligence chip, that is, the minimum unit of the application container group requesting the resource is consistent with the minimum unit of the used resource, so that the waste of the resource can be avoided, and the utilization rate of the processing core in the artificial intelligence chip can be improved.
Other details of the resource scheduling apparatus 1000 according to the embodiment of the present application are similar to the resource scheduling method according to the embodiment of the present specification described above with reference to fig. 6, and are not repeated herein.
The resource scheduling method and apparatus according to the embodiments of the present application described in conjunction with fig. 3 to 10 may be implemented by a computing device. Fig. 11 is a hardware architecture diagram of a computing device 1100 according to an embodiment of the application.
As shown in fig. 11, computing device 1100 includes an input device 1101, an input interface 1102, a processor 1103, a memory 1104, an output interface 1105, and an output device 1106. The input interface 1102, the processor 1103, the memory 1104, and the output interface 1105 are connected to each other via a bus 1107, and the input device 1101 and the output device 1106 are connected to the bus 1107 via the input interface 1102 and the output interface 1105, respectively, and further connected to other components of the computing device 1100.
Specifically, the input device 1101 receives input information from the outside and transmits the input information to the processor 1103 through the input interface 1102; the processor 1103 processes the input information based on the computer-executable instructions stored in the memory 1104 to generate output information, stores the output information temporarily or permanently in the memory 1104, and then transmits the output information to the output device 1106 through the output interface 1105; the output device 1106 outputs output information external to the computing device 1100 for use by a user.
Among them, the processor 1103 may include: a processor of the type CPU, NPU, TPU or FpGA chip, etc., which are exemplary only and not limited to the types of processors listed herein.
That is, the computing device shown in fig. 11 may also be implemented to include: a memory storing computer-executable instructions; and a processor which, when executing computer executable instructions, may implement the resource scheduling methods and apparatus described in connection with fig. 3-10.
The embodiment of the application also provides a computer storage medium, wherein the computer storage medium is stored with computer program instructions; the computer program instructions, when executed by a processor, implement the resource scheduling method provided by the embodiments of the present application.
The functional blocks shown in the above structural block diagrams may be implemented as hardware, software, firmware, or a combination thereof. When implemented in hardware, it may be, for example, an electronic circuit, an Application Specific Integrated Circuit (ASIC), suitable firmware, plug-in, function card, or the like. When implemented in software, the elements of the present application are the programs or code segments used to perform the required tasks. The program or code segments may be stored in a machine-readable medium or transmitted by a data signal carried in a carrier wave over a transmission medium or a communication link. A "machine-readable medium" may include any medium that can store or transfer information. Examples of a machine-readable medium include electronic circuits, semiconductor memory devices, ROM, flash memory, Erasable ROM (EROM), floppy disks, CD-ROMs, optical disks, hard disks, fiber optic media, Radio Frequency (RF) links, and so forth. The code segments may be downloaded via computer networks such as the internet, intranet, etc.
It should also be noted that the exemplary embodiments mentioned in this application describe some methods or systems based on a series of steps or devices. However, the present application is not limited to the order of the above-described steps, that is, the steps may be performed in the order mentioned in the embodiments, may be performed in an order different from the order in the embodiments, or may be performed simultaneously.
As will be apparent to those skilled in the art, for convenience and brevity of description, the specific working processes of the systems, modules and units described above may refer to corresponding processes in the foregoing method embodiments, and are not described herein again. It should be understood that the scope of the present application is not limited thereto, and any person skilled in the art can easily conceive various equivalent modifications or substitutions within the technical scope of the present application, and these modifications or substitutions should be covered within the scope of the present application.
Claims (18)
1. A resource scheduling method comprises the following steps:
acquiring a resource scheduling request aiming at a target application container group, wherein the resource scheduling request comprises a target number of processor cores requested by the target application container group;
determining a target working node according to the acquired equipment information of the processors on the working nodes, wherein the number of idle processor cores in the target working node is not less than the target number;
determining processor core allocation information of the target application container group based on a preset allocation condition and the target number, wherein the processor core allocation information comprises information of a target processor core allocated for the target application container group in the target work node;
and storing the processor core allocation information into the configuration information of the target application container group, so that the target working node acquires the processor core allocation information from the configuration information, and schedules the target processor core to the target application container group based on the processor core allocation information.
2. The method of claim 1, wherein the processor core comprises an embedded neural network processor core.
3. The method of claim 1, wherein the device information for processors on the worker node comprises a number of processor cores that are idle on the worker node;
wherein, the determining the target working node according to the acquired device information of the processor on the working node comprises:
acquiring a first working node set, wherein each working node in the first working node set is provided with a processor;
screening a second working node set from the first working node set, wherein the number of idle processor cores on each working node in the second working node set is not less than the target number;
obtaining a first score of each working node in the second working node set based on a first preset scoring condition and equipment information of a processor on each working node in the second working node set; the first preset scoring condition is determined based on the number of processors on a working node and the number of idle processor cores in the processors on the working node;
and determining the target working node according to each first score.
4. The method of claim 3, wherein said determining said target working node according to each of said first scores comprises:
sending the first score of each working node in the second working node set to a scheduler, so that the scheduler determines a third score of each working node based on the first score and the second score of each working node in the second working node set, and the scheduler determines target information according to each third score; the second grade of the working node is determined by the dispatcher based on a second preset grade condition; the second preset scoring condition is determined based on at least one of the disk information, the memory information and the processing performance information on the working node;
receiving target information sent by the scheduler;
determining the target working node according to the target information;
the target information is used for indicating that the working node with the highest third grade is determined as the target working node.
5. The method of claim 3, wherein said obtaining a first set of worker nodes comprises:
acquiring the first working node set from a scheduler, wherein the first working node set is screened out by the scheduler based on a preset screening condition;
the preset screening condition is determined based on at least one of processor information, memory information and processing performance information in the working node.
6. The method of claim 1, wherein the preset allocation condition comprises:
the target processor core allocated for the target application container group belongs to at least one processor.
7. The method of claim 1, wherein prior to storing the processor core allocation information in the configuration information of the target application container set, the method further comprises:
and associating the target application container group with the target working node.
8. A resource scheduling method, which applies a target work node, comprises the following steps:
acquiring processor core allocation information of a target application container group from configuration information of the target application container group, wherein the processor core allocation information is stored in the configuration information of the target application container group by a preset node, the processor core allocation information is determined by the preset node based on a preset allocation condition and a target number of processor cores requested by the target application container group, the processor core allocation information comprises information of target processor cores allocated to the target application container group in a target working node, the target working node is determined by the preset node according to acquired equipment information of processors on the working node, and the number of idle processor cores in the target working node is not less than the target number;
scheduling the target processor core to the target application container set based on the processor core allocation information.
9. The method of claim 8, wherein prior to the obtaining processor core allocation information for a target application container set from configuration information for the target application container set, the method further comprises:
and storing the equipment information of the processor on the target working node into a resource object so that the predetermined node acquires the equipment information of the processor on the target working node from the resource object.
10. The method of claim 8, wherein the scheduling the target processor core to the target application container set based on the processor core allocation information comprises:
based on the processor core allocation information, mounting the processor to which the target processor core belongs to the target application container group;
and injecting the processor core allocation information into the target application container group so as to enable the target application container group to run by using the target processor core.
11. A resource scheduling method comprises the following steps:
acquiring a resource scheduling request aiming at a target application container group, wherein the resource scheduling request comprises a target number of a first processor core requested by the target application container group; the first processor core comprises a processor core of an artificial intelligence chip;
determining a target working node according to the acquired equipment information of the artificial intelligence chip on the working node, wherein the number of idle first processor cores in the target working node is not less than the target number;
determining processor core allocation information of the target application container group based on a preset allocation condition and the target number, wherein the processor core allocation information comprises information of a target first processor core allocated for the target application container group in the target work node;
and storing the processor core allocation information into the configuration information of the target application container group, so that the target working node acquires the processor core allocation information from the configuration information, and schedules the target first processor core to the target application container group based on the processor core allocation information.
12. A resource scheduling method, which applies a target work node, comprises the following steps:
acquiring processor core allocation information of a target application container group from configuration information of the target application container group, the processor core allocation information is stored in the configuration information of the target application container group by a predetermined node, the processor core allocation information is determined by the predetermined node based on a preset allocation condition and a target number of the first processor cores requested by the target application container group, the first processor core comprises a processor core of an artificial intelligence chip, the processor core allocation information comprises information of a target first processor core allocated for the target application container group in a target work node, the target working node is determined by the preset node according to the acquired equipment information of the artificial intelligence chip on the working node, the number of idle first processor cores in the target working node is not less than the target number;
scheduling the target first processor core to the target application container set based on the processor core allocation information.
13. A resource scheduling apparatus, comprising:
a first obtaining module, configured to obtain a resource scheduling request for a target application container group, where the resource scheduling request includes a target number of processor cores requested by the target application container group;
the target working node determining module is used for determining a target working node according to the acquired equipment information of the processors on the working nodes, wherein the number of idle processor cores in the target working node is not less than the target number;
the allocation information determining module is used for determining the allocation information of the processor cores of the target application container group based on preset allocation conditions and the target number, wherein the allocation information of the processor cores comprises the information of the target processor cores allocated to the target application container group in the target working node;
a first storage module, configured to store the processor core allocation information into configuration information of the target application container group, so that the target work node obtains the processor core allocation information from the configuration information, and schedules the target processor core to the target application container group based on the processor core allocation information.
14. A resource scheduling apparatus, applying a target work node, comprising:
a second obtaining module, configured to obtain, from configuration information of a target application container group, processor core allocation information of the target application container group, where the processor core allocation information is stored in the configuration information of the target application container group by a predetermined node, the processor core allocation information is determined by the predetermined node based on a preset allocation condition and a target number of processor cores requested by the target application container group, the processor core allocation information includes information of a target processor core allocated to the target application container group in a target work node, the target work node is determined by the predetermined node according to obtained device information of a processor on the work node, and the number of idle processor cores in the target work node is not less than the target number;
and the scheduling module is used for scheduling the target processor core to the target application container group based on the processor core allocation information.
15. A resource scheduling apparatus, comprising:
a first obtaining module, configured to obtain a resource scheduling request for a target application container group, where the resource scheduling request includes a target number of a first processor core requested by the target application container group; the first processor core comprises a processor core of an artificial intelligence chip;
the target working node determining module is used for determining a target working node according to the acquired equipment information of the artificial intelligence chip on the working node, wherein the number of idle first processor cores in the target working node is not less than the target number;
the allocation information determining module is used for determining the allocation information of the processor cores of the target application container group based on preset allocation conditions and the target number, wherein the allocation information of the processor cores comprises information of target first processor cores allocated for the target application container group in the target working node;
and the first storage module is used for storing the processor core allocation information into the configuration information of the target application container group, so that the target working node acquires the processor core allocation information from the configuration information and schedules the target first processor core to the target application container group based on the processor core allocation information.
16. A resource scheduling apparatus, applying a target work node, comprising:
a second obtaining module, configured to obtain processor core allocation information of a target application container group from configuration information of the target application container group, the processor core allocation information is stored in the configuration information of the target application container group by a predetermined node, the processor core allocation information is determined by the predetermined node based on a preset allocation condition and a target number of the first processor cores requested by the target application container group, the first processor core comprises a processor core of an artificial intelligence chip, the processor core allocation information comprises information of a target first processor core allocated for the target application container group in a target work node, the target working node is determined by the preset node according to the acquired equipment information of the artificial intelligence chip on the working node, the number of idle first processor cores in the target working node is not less than the target number;
and the scheduling module is used for scheduling the target first processor core to the target application container group based on the processor core allocation information.
17. A computing device, wherein the computing device comprises: a processor and a memory storing computer program instructions;
the processor, when executing the computer program instructions, implements the resource scheduling method of any of claims 1-12.
18. A computer storage medium having computer program instructions stored thereon, which when executed by a processor implement the method of resource scheduling according to any one of claims 1-12.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202010706309.8A CN113301087B (en) | 2020-07-21 | 2020-07-21 | Resource scheduling method, device, computing equipment and medium |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202010706309.8A CN113301087B (en) | 2020-07-21 | 2020-07-21 | Resource scheduling method, device, computing equipment and medium |
Publications (2)
Publication Number | Publication Date |
---|---|
CN113301087A true CN113301087A (en) | 2021-08-24 |
CN113301087B CN113301087B (en) | 2024-04-02 |
Family
ID=77318628
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN202010706309.8A Active CN113301087B (en) | 2020-07-21 | 2020-07-21 | Resource scheduling method, device, computing equipment and medium |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN113301087B (en) |
Cited By (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN114416357A (en) * | 2022-01-06 | 2022-04-29 | 北京百度网讯科技有限公司 | Method and device for creating container group, electronic equipment and medium |
CN116028230A (en) * | 2023-02-17 | 2023-04-28 | 浪潮电子信息产业股份有限公司 | Resource allocation method, device, equipment, medium and cloud platform |
CN117971498A (en) * | 2024-03-28 | 2024-05-03 | 麒麟软件有限公司 | Scheduling method for GPU resources in computing cluster, electronic equipment and storage medium |
Citations (11)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US20120130680A1 (en) * | 2010-11-22 | 2012-05-24 | Zink Kenneth C | System and method for capacity planning for systems with multithreaded multicore multiprocessor resources |
CN106371894A (en) * | 2016-08-31 | 2017-02-01 | 华为技术有限公司 | Collocation method, collocation device and data processing server |
CN107040479A (en) * | 2016-02-04 | 2017-08-11 | 华为软件技术有限公司 | A kind of method and apparatus of cloud computing resources regulation |
CN107534583A (en) * | 2015-04-30 | 2018-01-02 | 华为技术有限公司 | The application drive and adaptive unified resource management of data center with multiple resource schedulable unit (MRSU) |
WO2018001004A1 (en) * | 2016-06-27 | 2018-01-04 | 中兴通讯股份有限公司 | Docker based cloud platform control method and apparatus |
CN107729126A (en) * | 2016-08-12 | 2018-02-23 | 中国移动通信集团浙江有限公司 | A kind of method for scheduling task and device of container cloud |
CN108566370A (en) * | 2018-02-11 | 2018-09-21 | 北京奇艺世纪科技有限公司 | A kind of method and device of data Hui Yuan |
CN110545326A (en) * | 2019-09-10 | 2019-12-06 | 杭州数梦工场科技有限公司 | Cluster load scheduling method and device, electronic equipment and storage medium |
WO2020000944A1 (en) * | 2018-06-25 | 2020-01-02 | 星环信息科技(上海)有限公司 | Preemptive scheduling based resource sharing use method, system and |
CN111158879A (en) * | 2019-12-31 | 2020-05-15 | 上海依图网络科技有限公司 | System resource scheduling method, device, machine readable medium and system |
WO2020103465A1 (en) * | 2018-11-23 | 2020-05-28 | 中国银联股份有限公司 | Unified resource scheduling coordinator and method thereof for creating a virtual machine and/or container, and unified resource scheduling system |
-
2020
- 2020-07-21 CN CN202010706309.8A patent/CN113301087B/en active Active
Patent Citations (11)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US20120130680A1 (en) * | 2010-11-22 | 2012-05-24 | Zink Kenneth C | System and method for capacity planning for systems with multithreaded multicore multiprocessor resources |
CN107534583A (en) * | 2015-04-30 | 2018-01-02 | 华为技术有限公司 | The application drive and adaptive unified resource management of data center with multiple resource schedulable unit (MRSU) |
CN107040479A (en) * | 2016-02-04 | 2017-08-11 | 华为软件技术有限公司 | A kind of method and apparatus of cloud computing resources regulation |
WO2018001004A1 (en) * | 2016-06-27 | 2018-01-04 | 中兴通讯股份有限公司 | Docker based cloud platform control method and apparatus |
CN107729126A (en) * | 2016-08-12 | 2018-02-23 | 中国移动通信集团浙江有限公司 | A kind of method for scheduling task and device of container cloud |
CN106371894A (en) * | 2016-08-31 | 2017-02-01 | 华为技术有限公司 | Collocation method, collocation device and data processing server |
CN108566370A (en) * | 2018-02-11 | 2018-09-21 | 北京奇艺世纪科技有限公司 | A kind of method and device of data Hui Yuan |
WO2020000944A1 (en) * | 2018-06-25 | 2020-01-02 | 星环信息科技(上海)有限公司 | Preemptive scheduling based resource sharing use method, system and |
WO2020103465A1 (en) * | 2018-11-23 | 2020-05-28 | 中国银联股份有限公司 | Unified resource scheduling coordinator and method thereof for creating a virtual machine and/or container, and unified resource scheduling system |
CN110545326A (en) * | 2019-09-10 | 2019-12-06 | 杭州数梦工场科技有限公司 | Cluster load scheduling method and device, electronic equipment and storage medium |
CN111158879A (en) * | 2019-12-31 | 2020-05-15 | 上海依图网络科技有限公司 | System resource scheduling method, device, machine readable medium and system |
Non-Patent Citations (1)
Title |
---|
常旭征;焦文彬;: "Kubernetes资源调度算法的改进与实现", 计算机系统应用, no. 07 * |
Cited By (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN114416357A (en) * | 2022-01-06 | 2022-04-29 | 北京百度网讯科技有限公司 | Method and device for creating container group, electronic equipment and medium |
CN116028230A (en) * | 2023-02-17 | 2023-04-28 | 浪潮电子信息产业股份有限公司 | Resource allocation method, device, equipment, medium and cloud platform |
CN117971498A (en) * | 2024-03-28 | 2024-05-03 | 麒麟软件有限公司 | Scheduling method for GPU resources in computing cluster, electronic equipment and storage medium |
CN117971498B (en) * | 2024-03-28 | 2024-05-31 | 麒麟软件有限公司 | Scheduling method for GPU resources in computing cluster, electronic equipment and storage medium |
Also Published As
Publication number | Publication date |
---|---|
CN113301087B (en) | 2024-04-02 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN109684065B (en) | Resource scheduling method, device and system | |
US11243805B2 (en) | Job distribution within a grid environment using clusters of execution hosts | |
CN106708622B (en) | Cluster resource processing method and system and resource processing cluster | |
CN108337109B (en) | Resource allocation method and device and resource allocation system | |
US12118386B2 (en) | Techniques for container scheduling in a virtual environment | |
CN109564528B (en) | System and method for computing resource allocation in distributed computing | |
US20090282413A1 (en) | Scalable Scheduling of Tasks in Heterogeneous Systems | |
CN113301087B (en) | Resource scheduling method, device, computing equipment and medium | |
US9442764B2 (en) | Allocating a global resource to consumers across different regions of a distributed grid environment based on use data and demand data of each consumer | |
US20050132379A1 (en) | Method, system and software for allocating information handling system resources in response to high availability cluster fail-over events | |
WO2011076608A2 (en) | Goal oriented performance management of workload utilizing accelerators | |
CN112631780B (en) | Resource scheduling method and device, storage medium and electronic device | |
CN110838939B (en) | Scheduling method based on lightweight container and edge Internet of things management platform | |
US8468530B2 (en) | Determining and describing available resources and capabilities to match jobs to endpoints | |
CN107430526B (en) | Method and node for scheduling data processing | |
Awada et al. | Edge federation: A dependency-aware multi-task dispatching and co-location in federated edge container-instances | |
CN110914805A (en) | Computing system for hierarchical task scheduling | |
CN105824705B (en) | A task assignment method and electronic device | |
Xiang et al. | Gödel: Unified large-scale resource management and scheduling at ByteDance | |
CN111240824A (en) | CPU resource scheduling method and electronic equipment | |
CA2631255A1 (en) | Scalable scheduling of tasks in heterogeneous systems | |
CN103713852A (en) | Method for processing information, service platform and electronic devices | |
Wu et al. | ABP scheduler: Speeding up service spread in docker swarm | |
CN116643890A (en) | Cluster resource scheduling method, device, equipment and medium | |
KR102014246B1 (en) | Mesos process apparatus for unified management of resource and method for the same |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
PB01 | Publication | ||
PB01 | Publication | ||
SE01 | Entry into force of request for substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
REG | Reference to a national code |
Ref country code: HK Ref legal event code: DE Ref document number: 40057552 Country of ref document: HK |
|
GR01 | Patent grant | ||
GR01 | Patent grant |