Multi-target container scheduling method and system for distributed learning operation of cloud platform
Through the multi-objective scheduling method and the non-dominated sorting improved ant colony algorithm, the container scheduling of distributed learning jobs on the cloud platform is optimized, which solves the problems of low resource utilization and communication efficiency in the traditional scheduling strategy, achieves resource balancing and load balancing, and improves Improve job performance.
Patent Information
- Application Number
- CN202410937923.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-07-12
- Publication Date
- 2024-10-18
AI Technical Summary
The container scheduling strategy of traditional cloud platforms cannot effectively optimize data communication and resource utilization of deep learning jobs, resulting in low job operation efficiency and waste of resources. In particular, heterogeneous GPU resources cannot be fully utilized in distributed learning jobs.
Using a multi-objective scheduling method, the ant colony algorithm improved by non-dominated sorting ideas, combined with resource balance, load balance and communication overhead, design multiple two-dimensional pheromone matrices and pheromone update methods to optimize container scheduling decisions and ensure resource utilization. Balanced usage and load balancing.
It achieves resource usage balance and load balancing, reduces resource fragmentation, quantifies the communication overhead of distributed learning jobs, improves job operation efficiency, and takes into account resource usage efficiency and communication efficiency.
Smart Images

Figure CN118796470A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of container scheduling, and in particular to a multi-objective container scheduling method and system for distributed learning operations on a cloud platform. Background Art
[0002] With the rapid development of deep learning technology, the complexity of models and the size of data have increased significantly, and more and more deep learning jobs are deployed in a distributed manner on cloud platforms in the form of containers. However, the container scheduling strategies of traditional cloud platforms, such as Binpack, Spread, and Random, have relatively simple optimization goals, focusing only on the resource usage of physical nodes, without optimizing data communication during job runtime, and unable to globally guarantee balanced resource utilization and load balancing between nodes, which can easily lead to problems such as low job efficiency and resource waste.
[0003] In addition, distributed learning jobs usually require a large amount of GPU resources to ensure efficient operation of the job. The tasks often need to synchronize parameters through the P / S architecture or RingAllReduce architecture. Different topological connection methods between GPUs have different communication bandwidths, which has a great impact on the operation efficiency of the job. However, traditional scheduling algorithms do not consider the heterogeneity of resources, cannot perceive the topological structure of GPU resources in the node, and it is difficult to ensure efficient use of GPUs. Therefore, there is still a lot of room for improvement in the container scheduling solution for distributed learning jobs on cloud platforms, and further optimization is urgently needed.
[0004] In view of this, the present invention is proposed. Summary of the invention
[0005] The purpose of the present invention is to provide a multi-objective container scheduling method and system for distributed learning jobs on a cloud platform, which minimizes the data communication overhead during job runtime and ensures balanced use of node resources and load balancing through a multi-objective scheduling method.
[0006] The objective of the present invention is achieved through the following technical solutions:
[0007] A multi-objective container scheduling method for distributed learning jobs on a cloud platform, comprising:
[0008] The overall resource balance is calculated using the different resource utilization rates of each node, and the overall load balance is calculated using the utilization rates of different resources in each node. The communication overhead of distributed learning jobs is calculated by quantifying the communication overhead between nodes and the communication overhead of resources within nodes. The overall resource balance, overall load balance, and communication overhead of distributed learning jobs are taken as optimization targets, respectively, to construct a multi-objective optimization function.
[0009] The ant colony algorithm improved by the non-dominated sorting idea is used to make scheduling decisions on the multi-objective optimization function to obtain a container scheduling solution that balances multiple objectives; wherein, the ant colony algorithm improved by the non-dominated sorting idea includes: adding the non-dominated sorting idea to the ant colony algorithm, designing multiple two-dimensional pheromone matrices and modifying the pheromone update method.
[0010] A multi-objective container scheduling system for distributed learning jobs on cloud platforms, including:
[0011] A multi-objective optimization function construction unit is used to calculate the overall resource balance using the different resource utilization rates of each node, calculate the overall load balance using the utilization rates of different resources in each node, and calculate the communication overhead of distributed learning jobs when they are running by quantifying the communication overhead between nodes and the communication overhead of resources within the nodes; the overall resource balance, the overall load balance, and the communication overhead of distributed learning jobs when they are running are used as optimization targets respectively to construct a multi-objective optimization function;
[0012] A multi-objective container scheduling scheme generation unit is used to use an ant colony algorithm improved by a non-dominated sorting idea to make scheduling decisions on the multi-objective optimization function to obtain a container scheduling scheme that balances multiple objectives; wherein the ant colony algorithm improved by a non-dominated sorting idea includes: adding a non-dominated sorting idea to the ant colony algorithm, designing multiple two-dimensional pheromone matrices and modifying the pheromone update method.
[0013] A processing device, comprising: one or more processors; a memory for storing one or more programs;
[0014] When the one or more programs are executed by the one or more processors, the one or more processors implement the aforementioned method.
[0015] A readable storage medium stores a computer program, which implements the above method when the computer program is executed by a processor.
[0016] It can be seen from the technical solution provided by the present invention that (1) the use of resources in various dimensions is fully considered as a whole, which can effectively achieve resource usage balance, reduce resource fragmentation, and ensure cluster load balancing. (2) The communication overhead generated when the distributed learning job is running is quantified, not only considering the communication overhead across nodes between containers, but also taking into account the communication overhead of resources within the container, which can greatly improve the operation efficiency of the job. (3) Through the improved ant colony algorithm for multi-objective optimization and solution, an excellent solution that balances the three objectives at the same time can be obtained, thereby ensuring balanced resource utilization and load balancing in the cluster while minimizing communication overhead, taking into account resource utilization efficiency, and improving job operation performance. BRIEF DESCRIPTION OF THE DRAWINGS
[0017] In order to more clearly illustrate the technical solutions of the embodiments of the present invention, the accompanying drawings required for use in the description of the embodiments will be briefly introduced below. Obviously, the accompanying drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other accompanying drawings can be obtained based on these accompanying drawings without paying creative work.
[0018] Figure 1 A flowchart of a multi-objective container scheduling method for distributed learning jobs on a cloud platform provided by an embodiment of the present invention;
[0019] Figure 2 A schematic diagram of communication overhead modeling provided in an embodiment of the present invention;
[0020] Figure 3 A schematic diagram of a multi-objective container scheduling method for distributed learning jobs on a cloud platform provided by an embodiment of the present invention;
[0021] Figure 4 A schematic diagram of a multi-objective container scheduling system for distributed learning jobs on a cloud platform provided by an embodiment of the present invention;
[0022] Figure 5 A schematic diagram of a processing device provided by an embodiment of the present invention. DETAILED DESCRIPTION
[0023] The following is a clear and complete description of the technical solutions in the embodiments of the present invention in conjunction with the drawings in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the protection scope of the present invention.
[0024] First, the terms that may be used in this article are explained as follows:
[0025] The terms "include", "comprises", "contains", "has" or other descriptions with similar semantics should be interpreted as non-exclusive inclusion. For example, including certain technical feature elements (such as raw materials, components, ingredients, carriers, dosage forms, materials, dimensions, parts, components, mechanisms, devices, steps, procedures, methods, reaction conditions, processing conditions, parameters, algorithms, signals, data, products or products, etc.) should be interpreted as including not only certain technical feature elements explicitly listed, but also other technical feature elements known in the art that are not explicitly listed.
[0026] The term "consisting of..." means excluding any technical feature elements not explicitly listed. If this term is used in a claim, it will make the claim closed, so that it does not contain technical feature elements other than the technical feature elements explicitly listed, except for the conventional impurities related to them. If this term only appears in a clause of a claim, it only limits the elements explicitly listed in the clause, and the elements recorded in other clauses are not excluded from the overall claim.
[0027] The following is a detailed description of a multi-objective container scheduling method and system for distributed learning operations on a cloud platform provided by the present invention. The contents not described in detail in the embodiments of the present invention belong to the prior art known to professional and technical personnel in the field. If no specific conditions are specified in the embodiments of the present invention, they are carried out according to the conventional conditions in the field or the conditions recommended by the manufacturer. The reagents or instruments used in the embodiments of the present invention that do not indicate the manufacturer are all conventional products that can be purchased commercially.
[0028] Embodiment 1
[0029] The embodiment of the present invention provides a multi-objective container scheduling method for distributed learning operations on a cloud platform, such as Figure 1 As shown, it mainly includes the following steps:
[0030] Step 1: Construct a multi-objective optimization function.
[0031] In an embodiment of the present invention, the overall resource balance is calculated using the different resource utilization rates of each node, the overall load balance is calculated using the utilization rates of different resources in each node, and the communication overhead when the distributed learning job is running is calculated by quantifying the communication overhead between nodes and the communication overhead of resources within the node; the overall resource balance, the overall load balance and the communication overhead when the distributed learning job is running are respectively used as optimization targets to construct a multi-objective optimization function.
[0032] Step 2: Use the ant colony algorithm improved by the non-dominated sorting idea to make scheduling decisions on the multi-objective optimization function to obtain a container scheduling solution that balances multiple objectives.
[0033] In an embodiment of the present invention, the ant colony algorithm improved by the non-dominated sorting idea includes: adding the non-dominated sorting idea to the ant colony algorithm, designing multiple two-dimensional pheromone matrices and modifying the pheromone update method, so that the improved ant colony algorithm is more suitable for solving multi-objective problems, so as to obtain a container scheduling solution that balances multiple objectives.
[0034] The above scheme has the following advantages: (1) It fully considers the use of resources in various dimensions as a whole, can effectively achieve resource usage balance, reduce resource fragmentation, and ensure cluster load balancing. (2) It quantifies the communication overhead generated when the distributed learning job is running, not only considering the communication overhead between containers and nodes, but also taking into account the communication overhead of resources within the container, which can greatly improve the operation efficiency of the job. (3) Through the improved ant colony algorithm for multi-objective optimization solution, it can obtain an excellent solution that balances the three objectives at the same time, thereby ensuring balanced resource utilization and load balancing in the cluster while minimizing the communication overhead, taking into account the efficiency of resource utilization and improving the operation performance of the job.
[0035] In order to more clearly demonstrate the technical solution and technical effects provided by the present invention, the method provided by the embodiment of the present invention is described in detail with reference to specific embodiments below.
[0036] 1. Overview of the plan.
[0037] The technical purpose of the present invention is to design a multi-objective scheduling method for the container scheduling problem of distributed learning jobs on cloud platforms to minimize the data communication overhead of the jobs and ensure balanced use of node resources and load balancing.
[0038] In terms of ensuring balanced resource usage and load balancing of cluster nodes, the present invention establishes a global resource allocation optimization model, measures the resource utilization balance by the standard deviation of different resource utilization rates of each node, and measures the load balance by the standard deviation of utilization rates of different resources in each node of the cluster. Secondly, in order to optimize the communication overhead during the operation of distributed learning jobs, we first use communication perception technology to obtain inter-node communication performance indicators (for example, communication bandwidth, communication distance, and communication delay, etc.), and use this to quantify the communication overhead across nodes between containers. In addition, the consideration of resource communication efficiency within the container is also added during the scheduling process, mainly based on a more fine-grained allocation of GPU resources based on GPU resource topology perception technology, aiming to select the optimal GPU combination for the container to ensure efficient operation of the job. Finally, with node resource capacity as a constraint, resource balance, load balancing, and communication overhead as optimization goals, a multi-objective optimization model for container scheduling was constructed. In addition, since the traditional ant colony algorithm cannot balance multiple conflicting optimization objectives well, the idea of non-dominated sorting is added to the ant colony algorithm, multiple two-dimensional pheromone matrices are designed and the pheromone update method is modified, so that the improved ant colony algorithm is more suitable for solving multi-objective problems, so as to obtain a container scheduling solution that balances multiple objectives.
[0039] 2. Introduction to the details of the plan.
[0040] 1. Multi-objective optimization model.
[0041] (1) Note that traditional scheduling algorithms usually only focus on the balanced use of CPU and memory when scheduling jobs, while ignoring other types of resources. This approach may lead to unbalanced resource use, resulting in the so-called bucket effect, and thus resource fragmentation. In order to solve this problem, the present invention comprehensively considers the balanced use of multi-dimensional resources, takes the standard deviation of different resource utilization rates in each node as a measurement indicator, and defines the overall resource balance as:
[0042]
[0043] Among them, RB represents the overall resource balance, N is the number of nodes, m is the resource dimension, and n jk Indicates the utilization rate of resource numbered k on node numbered j. Indicates the average resource utilization of node numbered j.
[0044] (2) When considering node load balancing, we do not simply use the average utilization of node resources as a measure, but consider load balancing for each resource. Specifically, we perform load balancing for different resources separately, and measure the load balancing degree by the standard deviation of the utilization rate of different resources at each node. The overall load balancing degree is defined as:
[0045]
[0046] Among them, LB represents the cluster load balancing degree, N is the number of nodes, m is the resource dimension, and n jk Indicates the utilization rate of resource numbered k on node numbered j. Indicates the average utilization of resource numbered k on all nodes.
[0047] (3) Communication optimization for distributed learning jobs. The present invention first obtains communication performance indicators such as communication distance, communication delay, and communication bandwidth between nodes in the cluster, and quantifies the communication overhead based on this. In addition, the scheduling algorithm of the traditional cloud platform cannot perceive the topological structure of the GPU resources in the node, and is unaware of the different communication efficiencies caused by different GPU combinations. Therefore, the present invention combines resource topology awareness technology to model the communication bandwidth between GPUs in the node and the communication delay across nodes into an undirected weighted graph to quantify the communication overhead.
[0048] like Figure 2 As shown in the figure, it is a communication overhead modeling diagram. Through network communication awareness and GPU topology awareness technology, the communication overhead generated when the distributed learning job is running is quantified. It not only considers the communication overhead across nodes between containers, but also takes the communication overhead of GPU resources in the container into consideration. It also specifies the GPU combination with the highest communication efficiency for the container, which can greatly improve the operation efficiency of the job. Figure 2In the figure, the numbers between nodes represent the weight values of the communication overhead between nodes, and the numbers within a node represent the weight values of the communication overhead between internal GPUs.
[0049] The main process of this part is as follows:
[0050] The communication performance indicators between each node are obtained, and the communication overhead is quantified based on this, which is expressed as:
[0051]
[0052] Based on GPU resource topology awareness technology, the communication overhead of GPU resources within the computing node is expressed as:
[0053]
[0054] The communication overhead of the final distributed learning job is:
[0055] COMM=comm inner +comm outer
[0056] Among them, comm inner Indicates the communication overhead between GPU resources to be allocated in the container, comm outer It represents the communication overhead between containers across nodes, N represents the number of nodes, and N o Indicates the number of GPUs in node numbered o, x pq is a coefficient variable whose value is 1 if and only if GPUs numbered p and q are assigned to the same container, otherwise it is 0; gtopo opq represents the communication overhead between GPUs numbered p and q in node numbered o; J represents the number of jobs in this scheduling cycle, y vw is a coefficient variable, which is 1 if and only if multiple containers of the same job are assigned to nodes numbered v and w at the same time, otherwise it is 0; ntopo vw Represents the communication cost between nodes numbered v and w.
[0057] In the embodiment of the present invention, a container is a task instance that needs to be scheduled and deployed to a node for execution, and the GPU resources in a node refer to the number of GPUs actually available in a node.
[0058] (4) Construct a multi-objective optimization model.
[0059] Based on the above three optimization objectives (1) to (3), a multi-objective optimization model is established for the scheduling problem of distributed learning jobs on the cloud platform. The node resource capacity is used as the constraint condition, and the three optimization objectives of resource balance, load balancing and communication overhead are comprehensively considered.
[0060] In the embodiment of the present invention, the constructed multi-objective optimization model is recorded as the multi-objective optimization function to be optimized, which is expressed as:
[0061] σ=w1RB+w2LB+w3COMM
[0062] w1+w2+w3=1
[0063] minmize(σ)
[0064]
[0065] Among them, σ is a multi-objective optimization function, minmize means minimization, RB, LB, and COMM represent the overall resource balance, the overall load balance, and the communication overhead of the distributed learning job respectively, w1, w2, and w3 are the weight parameters of each optimization goal, and the symbol Indicates any and and represent Node j The resources to be used and their capacity, Node j Represents the node numbered j.
[0066] 2. Use the ant colony algorithm improved by the non-dominated sorting idea to make scheduling decisions.
[0067] (1) Each ant in the ant colony algorithm has a complete allocation plan, and the path ab is defined as scheduling the container numbered b to the node numbered a. In addition, the ant colony algorithm defines three two-dimensional pheromone matrices for the path ab, corresponding to the three optimization objectives. The redefined path pheromone τ ab for:
[0068] τ ab =τ ab-RB ×τ ab-LB ×τ ab-COMM
[0069] Among them, τ ab Represents the pheromone concentration on path ab, and its value is the product of the three optimized target pheromone concentrations. ab-RB , τ ab-LB , τ ab-COMM They respectively represent the contribution of the overall resource balance, the overall load balance and the communication overhead during the runtime of the distributed learning job to the pheromone concentration on the path ab.
[0070] In the embodiment of the present invention, a pheromone matrix is defined for each optimization target. Considering that the concept of pheromone matrix is a concept existing in the traditional ant colony algorithm, the specific application in the algorithm can refer to the traditional ant colony algorithm, and the present invention will not elaborate on it.
[0071] (2) The present invention improves the pheromone concentration update formula in the ant colony algorithm. Using the idea of non-dominated sorting, after one iteration of the ant colony algorithm is completed, all ants are non-dominated sorted, and the dominance relationship and crowding distance are used as the sorting basis to obtain the level of each ant; then the algorithm's various pheromone matrices are updated according to the different levels of the ants. In this way, ants with better solutions can contribute more pheromones to the corresponding pheromone matrix, which can more effectively guide the ant colony to the next round of iterative search. After several such positive feedback cycles, the algorithm can eventually obtain a set of optimal Pareto solutions. The modified pheromone update formula is as follows:
[0072]
[0073]
[0074] Among them, Q is the pheromone constant, rank c is the ant level numbered c after non-dominated sorting, T is the collective name of the three optimization objectives, is the pheromone value that the ant numbered c contributes to path ab in the pheromone matrix of the optimization target T, T c It is the value calculated by optimizing the target T through the ant's allocation plan.
[0075] Those skilled in the art can understand that pheromone is the value of each element in the pheromone matrix. For example, the value of the ath row and the bth column of the pheromone matrix represents the pheromone on the path ab.
[0076] (3) Heuristic factor η in ant colony algorithm ab Make modifications, η ab It represents the attraction of the node numbered a to the container numbered b, and the multi-objective optimization function σ is used as the evaluation index. Thus, through the probability transfer formula of the ant colony algorithm, it can be known that the group of containers and nodes that are more in line with the multi-objective optimization function have a greater binding probability P ab , in order to guide the ant colony algorithm to optimize towards the multi-objective optimization function, the modified relevant calculation formula is as follows:
[0077]
[0078] η ab =σ
[0079] In the formula, represents the probability that the ant numbered c chooses path ab at time t; J c (a) In this algorithm, it represents the set of containers that can be selected by the ant numbered c for the node numbered a, and s represents any element in the set; τ ab(t) is the pheromone concentration value on path ab at time t, η ab (t) represents the attraction of the node numbered a to the container numbered b at time t; α and β are algorithm hyperparameters, representing the importance of pheromone and heuristic factor respectively.
[0080] The specific execution process of the improved ant colony algorithm based on the above three aspects can refer to conventional technology, and the present invention will not elaborate on it.
[0081] 3. Application examples
[0082] The multi-objective scheduling method for distributed learning jobs on cloud platforms proposed in this invention mainly takes all containers to be scheduled in the same scheduling cycle as input after building the communication cost matrix, and solves it through the improved ant colony algorithm. After the solution is completed, resources are allocated according to the final allocation plan. Figure 3 The general process is shown. Taking the k8s cluster as an example, the whole process is mainly divided into the following steps:
[0083] (1) Construct the GPU communication overhead matrix and the inter-node communication overhead matrix.
[0084] First, the nodes in the k8s cluster need to register GPU resources through the relevant device plug-in. The resource registration logic in the device plug-in is mainly improved so that each node runs the built-in commands in the plug-in to obtain GPU topology information, and performs a series of encoding processing on it, and then marks it in the node's annotation. Taking NVIDIA's GPU as an example, there are generally several different connection methods between them, such as NVLINK, PIX, PXB, PHB, NODE and SYS. The communication overhead of different connection methods can be quantified, for example, 1, 3, 5, 7, 9, and 11 respectively. The scheduler can obtain the topology information from the node's annotation and process it into a two-dimensional matrix through our corresponding decoding method, and then return the processing results to the scheduler and dynamically maintain it (that is, when some GPUs are not idle, they are deleted from the matrix). The scheduler can take the communication efficiency between GPU resources into consideration when making scheduling decisions. In addition, tools such as iperf and ping are used in the cluster to measure information such as communication delay and communication bandwidth between nodes, and then quantify them as communication overhead according to specific proportions, and deliver the matrix information to the scheduler. Finally, the scheduler constructs a complete communication overhead matrix based on the communication topology information obtained above for subsequent scheduling decisions.
[0085] (2) Analysis of node resource usage (this part is not included in Figure 3 ).
[0086] First, the scheduler obtains the usage of different types of resources in each node in the cluster and builds a resource usage vector for it. For example, [30,40,50] means that the CPU utilization in a certain node is 30%, the memory utilization is 40%, and the GPU utilization is 50%. Then, the scheduler builds a resource requirement vector for it based on the resource requirements of the container to be scheduled. For example, [1,2,3] means that a container requires 1 CPU, 2Gi of memory, and 3 GPUs. The above resource vector is then saved for subsequent algorithm solutions. Finally, when the subsequent algorithm solves the scheduling plan, it can fully consider the overall resource balance and load balance of the cluster.
[0087] (3) Solving the GPU allocation plan.
[0088] The present invention focuses on the efficiency of GPU resource utilization and allocates GPU resources in a more fine-grained manner. When a container is bound to a node, the algorithm first selects the best n GPU card combinations from the node according to the GPU communication cost matrix and returns the minimum communication cost. Then, the scheduler will mark the selected GPU card information on the annotation of the container. Finally, the corresponding device plug-in will read the information in the container annotation when allocating resources and bind the card according to the specified method in the information.
[0089] (4) Solving the node allocation scheme.
[0090] The solution is mainly obtained through the ant colony algorithm improved by non-dominated sorting. A set of containers to be scheduled is used as the input of the ant colony algorithm, and the solution is obtained according to the improved ant colony algorithm mentioned above. During the solution process, step (3) is also called to calculate the minimum communication overhead and specific allocation scheme of the two bindings, and the improved path transfer formula and pheromone update formula are used for iterative solution. After the algorithm iteration is completed, a map mapping will be returned, corresponding to each node and the list of containers assigned to the node, and at this time, the specific GPU information has been marked in the annotation of each container. Finally, the allocation result is passed to the resource allocator for allocation.
[0091] (5) Final resource allocation.
[0092] Through the resource allocation results returned by steps (3) and (4), each container is bound to the corresponding node, and the card binding operation is performed in a more fine-grained manner according to the GPU combination selected. Since multiple optimization objectives are comprehensively considered in the solution process, the final allocation solution can minimize communication overhead while ensuring balanced resource utilization and load balancing in the cluster, taking into account resource utilization efficiency and improving job operation performance.
[0093] Through the description of the above implementation methods, those skilled in the art can clearly understand that the above embodiments can be implemented by software, or by means of software plus necessary general hardware platforms. Based on such understanding, the technical solutions of the above embodiments can be embodied in the form of software products, which can be stored in a non-volatile storage medium (which can be a CD-ROM, a USB flash drive, a mobile hard disk, etc.), including several instructions for enabling a computer device (which can be a personal computer, a server, or a network device, etc.) to execute the methods described in the various embodiments of the present invention.
[0094] Embodiment 2
[0095] The present invention also provides a multi-objective container scheduling system for distributed learning operations on a cloud platform, which is mainly used to implement the method provided in the above embodiment, such as Figure 4 As shown, the system mainly includes:
[0096] A multi-objective optimization function construction unit is used to calculate the overall resource balance using the different resource utilization rates of each node, calculate the overall load balance using the utilization rates of different resources in each node, and calculate the communication overhead of distributed learning jobs when they are running by quantifying the communication overhead between nodes and the communication overhead of resources within the nodes; the overall resource balance, the overall load balance, and the communication overhead of distributed learning jobs when they are running are used as optimization targets respectively to construct a multi-objective optimization function;
[0097] A multi-objective container scheduling scheme generation unit is used to use an ant colony algorithm improved by a non-dominated sorting idea to make scheduling decisions on the multi-objective optimization function to obtain a container scheduling scheme that balances multiple objectives; wherein the ant colony algorithm improved by a non-dominated sorting idea includes: adding a non-dominated sorting idea to the ant colony algorithm, designing multiple two-dimensional pheromone matrices and modifying the pheromone update method.
[0098] Technical personnel in the relevant field can clearly understand that for the convenience and simplicity of description, only the division of the above-mentioned functional modules is used as an example. In actual applications, the above-mentioned functions can be assigned to different functional modules as needed, that is, the internal structure of the system can be divided into different functional modules to complete all or part of the functions described above.
[0099] Embodiment 3
[0100] The present invention also provides a processing device, such as Figure 5 As shown, it mainly includes: one or more processors; a memory for storing one or more programs; wherein, when the one or more programs are executed by the one or more processors, the one or more processors implement the methods provided in the aforementioned embodiments.
[0101] Furthermore, the processing device also includes at least one input device and at least one output device; in the processing device, the processor, memory, input device, and output device are connected via a bus.
[0102] In the embodiment of the present invention, the specific types of the memory, input device and output device are not limited; for example:
[0103] The input device may be a touch screen, an image acquisition device, a physical button or a mouse, etc.;
[0104] The output device may be a display terminal;
[0105] The memory may be a random access memory (RAM) or a non-volatile memory, such as a disk memory.
[0106] Embodiment 4
[0107] The present invention also provides a readable storage medium storing a computer program, which implements the method provided in the above embodiment when the computer program is executed by a processor.
[0108] In the embodiment of the present invention, the readable storage medium is a computer-readable storage medium and can be set in the aforementioned processing device, for example, as a memory in the processing device. In addition, the readable storage medium can also be a U disk, a mobile hard disk, a read-only memory (ROM), a disk or an optical disk, etc., which can store program codes.
[0109] The above is only a preferred specific embodiment of the present invention, but the protection scope of the present invention is not limited thereto. Any changes or substitutions that can be easily thought of by a person skilled in the art within the technical scope disclosed in the present invention should be included in the protection scope of the present invention. Therefore, the protection scope of the present invention should be based on the protection scope of the claims.
Claims
1. A multi-objective container scheduling method for distributed learning jobs on a cloud platform, characterized in that: include: The overall resource balance is calculated using the different resource utilization rates of each node, and the overall load balance is calculated using the utilization rates of different resources in each node. The communication overhead of distributed learning jobs is calculated by quantifying the communication overhead between nodes and the communication overhead of resources within nodes. The overall resource balance, overall load balance, and communication overhead of distributed learning jobs are taken as optimization targets, respectively, to construct a multi-objective optimization function. The ant colony algorithm improved by the non-dominated sorting idea is used to make scheduling decisions on the multi-objective optimization function to obtain a container scheduling solution that balances multiple objectives; wherein, the ant colony algorithm improved by the non-dominated sorting idea includes: adding the non-dominated sorting idea to the ant colony algorithm, designing multiple two-dimensional pheromone matrices and modifying the pheromone update method.
2. According to claim 1, a multi-objective container scheduling method for distributed learning operations on a cloud platform is characterized in that: The method of calculating the overall resource balance using different resource utilization rates of each node includes: The balanced utilization of multi-dimensional resources is comprehensively considered, and the standard deviation of different resource utilization rates in each node is used as a metric. The overall resource balance is expressed as: Among them, RB represents the overall resource balance, N is the number of nodes, m is the resource dimension, and n jk Indicates the utilization rate of resource numbered k on node numbered j. Indicates the average resource utilization of node numbered j.
3. According to claim 1, a multi-objective container scheduling method for distributed learning operations on a cloud platform is characterized in that: The method of calculating the overall load balancing degree by using the usage rate of different resources at each node includes: Load balancing is performed for different resources respectively, and the load balancing degree is measured by the standard deviation of the utilization rate of different resources in each node. The overall load balancing degree is expressed as: Among them, LB represents the cluster load balancing degree, N is the number of nodes, m is the resource dimension, and n jk Indicates the utilization rate of resource numbered k on node numbered j. Indicates the average utilization of resource numbered k on all nodes.
4. According to claim 1, a multi-objective container scheduling method for distributed learning operations on a cloud platform is characterized in that: The calculation of the communication overhead of the distributed learning job during operation by quantifying the communication overhead between nodes and the communication overhead of resources within the nodes includes: The communication performance indicators between each node are obtained, and the communication overhead is quantified based on this, which is expressed as: Based on GPU resource topology awareness technology, the communication overhead of GPU resources within the computing node is expressed as: The communication overhead of the final distributed learning job is: COMM=comm inner +comm outer Among them, comm inner Indicates the communication overhead of GPU resources within the container, comm outer It represents the communication overhead between containers across nodes, N represents the number of nodes, and N o Indicates the number of GPUs in node numbered o, x pq is a coefficient variable whose value is 1 if and only if GPUs numbered p and q are assigned to the same container, otherwise it is 0; gtopo opq represents the communication overhead between GPUs numbered p and q in node numbered o; J represents the number of jobs in this scheduling cycle, y vw is a coefficient variable, which is 1 if and only if multiple containers of the same job are assigned to nodes numbered v and w at the same time, otherwise it is 0; ntopo vw represents the communication cost between nodes numbered v and w.
5. A multi-objective container scheduling method for distributed learning operations on a cloud platform according to any one of claims 1 to 4, characterized in that: The overall resource balance, the overall load balance and the communication overhead of the distributed learning job are taken as optimization objectives respectively, and the multi-objective optimization function is constructed as follows: σ=w1RB+w2LB+w3COMM w1+w2+w3=1 minmize(σ) Among them, σ is a multi-objective optimization function, minmize means minimization, RB, LB, and COMM represent the overall resource balance, the overall load balance, and the communication overhead of the distributed learning job respectively, and w1, w2, and w3 are the weight parameters of each optimization objective. and Respectively represent Node j The resources to be used and their capacity, Node j Represents the node numbered j.
6. According to claim 1, a multi-objective container scheduling method for distributed learning operations on a cloud platform is characterized in that: The method of adding the non-dominated sorting idea to the ant colony algorithm, designing multiple two-dimensional pheromone matrices and modifying the pheromone update method includes: Three two-dimensional pheromone matrices are defined for the ant colony algorithm, corresponding to the three optimization objectives. The redefined path pheromone τ ab for: t ab =t ab-RB ×t ab-LB ×t ab-COMM Among them, τ ab represents the pheromone concentration on path ab, τ ab-RB , τ ab-LB , τ ab-COMM They represent the contribution of the overall resource balance, the overall load balance, and the communication overhead of the distributed learning job to the pheromone concentration on the path ab. The path ab is represented by scheduling the container numbered b to the node numbered a. Using the idea of non-dominated sorting, after one iteration of the ant colony algorithm is completed, all ants are non-dominated sorted, and the dominance relationship and crowding distance are used as the sorting basis to obtain the level of each ant; then the pheromone matrix is updated according to the different levels of the ants; the modified pheromone update formula is as follows: Among them, Q is the pheromone constant, rank c is the ant level numbered c after non-dominated sorting, T is the collective name of the three optimization objectives, is the pheromone value that the ant numbered c contributes to path ab in the pheromone matrix of the optimization target T, T c It is the value calculated by optimizing the target T through the ant's allocation plan.
7. According to claim 1, a multi-objective container scheduling method for distributed learning operations on a cloud platform is characterized in that: The method also includes: The heuristic factor η in the ant colony algorithm ab Make modifications, η ab It represents the attraction of the node numbered a to the container numbered b. The multi-objective optimization function σ is used as the evaluation index. The more a group of containers and nodes that fit the multi-objective optimization function have a greater binding probability P ab , in order to guide the ant colony algorithm to optimize towards the multi-objective optimization function, the modified relevant calculation formula is as follows: or ab =s In the formula, represents the probability that the ant numbered c chooses path ab at time t; J c (a) represents the set of containers that can be selected by the ant numbered c for the node numbered a, and s represents the set J c Any element in (a); τ ab (t) is the pheromone concentration value on path ab at time t, η ab (t) represents the attraction of the node numbered a to the container numbered b at time t; α and β are algorithm hyperparameters, representing the importance of pheromone and heuristic factor respectively.
8. A multi-objective container scheduling system for distributed learning jobs on cloud platforms, characterized in that: include: A multi-objective optimization function construction unit is used to calculate the overall resource balance using the different resource utilization rates of each node, calculate the overall load balance using the utilization rates of different resources in each node, and calculate the communication overhead of distributed learning jobs when they are running by quantifying the communication overhead between nodes and the communication overhead of resources within the nodes; the overall resource balance, the overall load balance, and the communication overhead of distributed learning jobs when they are running are used as optimization targets respectively to construct a multi-objective optimization function; A multi-objective container scheduling scheme generation unit is used to use an ant colony algorithm improved by a non-dominated sorting idea to make scheduling decisions on the multi-objective optimization function to obtain a container scheduling scheme that balances multiple objectives; wherein the ant colony algorithm improved by a non-dominated sorting idea includes: adding a non-dominated sorting idea to the ant colony algorithm, designing multiple two-dimensional pheromone matrices and modifying the pheromone update method.
9. A processing device, characterized in that: include: one or more processors; A memory for storing one or more programs; When the one or more programs are executed by the one or more processors, the one or more processors implement the method according to any one of claims 1 to 7.
10. A readable storage medium storing a computer program, characterized in that: When the computer program is executed by a processor, the method according to any one of claims 1 to 7 is implemented.
Citation Information
Cited By
Intelligent computing power dynamic scheduling method and system applied to vGPU
CN119201475A
Multi-target distributed deep learning container scheduling method and system and storage medium
CN120029720A
Multi-objective Distributed Deep Learning Container Scheduling Method, System and Storage Medium
CN120029720B
