CN116360922A - Cluster resource scheduling method, device, computer equipment and storage medium - Google Patents

Cluster resource scheduling method, device, computer equipment and storage medium Download PDF

Info

Publication number
CN116360922A
CN116360922A CN202310253425.2A CN202310253425A CN116360922A CN 116360922 A CN116360922 A CN 116360922A CN 202310253425 A CN202310253425 A CN 202310253425A CN 116360922 A CN116360922 A CN 116360922A
Authority
CN
China
Prior art keywords
node
container group
long
evicted
nodes
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.)
Pending
Application number
CN202310253425.2A
Other languages
Chinese (zh)
Inventor
王耀东
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Guangzhou Weride Technology Co Ltd
Original Assignee
Guangzhou Weride Technology Co Ltd
Priority date (The priority date 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 date listed.)
Filing date
Publication date
Application filed by Guangzhou Weride Technology Co Ltd filed Critical Guangzhou Weride Technology Co Ltd
Priority to CN202310253425.2A priority Critical patent/CN116360922A/en
Publication of CN116360922A publication Critical patent/CN116360922A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements 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/44Arrangements for executing specific programs
    • G06F9/455Emulation; Interpretation; Software simulation, e.g. virtualisation or emulation of application or operating system execution engines
    • G06F9/45533Hypervisors; Virtual machine monitors
    • G06F9/45558Hypervisor-specific management and integration aspects
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements 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/46Multiprogramming arrangements
    • G06F9/50Allocation of resources, e.g. of the central processing unit [CPU]
    • G06F9/5005Allocation of resources, e.g. of the central processing unit [CPU] to service a request
    • G06F9/5027Allocation of resources, e.g. of the central processing unit [CPU] to service a request the resource being a machine, e.g. CPUs, Servers, Terminals
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements 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/46Multiprogramming arrangements
    • G06F9/50Allocation of resources, e.g. of the central processing unit [CPU]
    • G06F9/5061Partitioning or combining of resources
    • G06F9/5077Logical partitioning of resources; Management or configuration of virtualized resources
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements 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/44Arrangements for executing specific programs
    • G06F9/455Emulation; Interpretation; Software simulation, e.g. virtualisation or emulation of application or operating system execution engines
    • G06F9/45533Hypervisors; Virtual machine monitors
    • G06F9/45558Hypervisor-specific management and integration aspects
    • G06F2009/4557Distribution of virtual machine instances; Migration and load balancing
    • YGENERAL 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
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02DCLIMATE 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/00Energy 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)
  • Management, Administration, Business Operations System, And Electronic Commerce (AREA)

Abstract

The application provides a cluster resource scheduling method, a cluster resource scheduling device, computer equipment and a storage medium. The method comprises the following steps: classifying all nodes of the cluster to obtain more than one long-term node and common nodes; the long-term nodes are preferentially allocated to run the long-term task container groups, and the common nodes are preferentially allocated to run the short-term task container groups; determining a common node running a long-term task container group as a first target node; expelling a long-term task container group on the first target node that is not in use; the evicted set of containers is rescheduled. The method can enable the resource distribution in the cluster to be more reasonable, save the machine cost, reduce the fragmentation of GPU resources in the cluster and the whole queuing and running time of new requests, and improve the user research and development efficiency.

Description

Cluster resource scheduling method, device, computer equipment and storage medium
Technical Field
The present disclosure relates to the field of cluster resource optimization technologies, and in particular, to a cluster resource scheduling method, device, computer device, and storage medium.
Background
Kubernetes is used as the most mainstream container automation operation platform at present, provides a series of complete functions such as deployment operation, resource scheduling, service discovery, dynamic expansion and contraction and the like for containerized application on the basis of container technology, and improves the convenience of large-scale container cluster management. In Kubernetes, container groups (Pod) are the smallest deployment units, each container group consisting of one or more containers. The scheduler in Kubernetes binds the container groups into the working nodes in the cluster according to a certain scoring strategy and scheduling algorithm.
However, since the computing resources in the cluster are limited, such as GPU resources, and the container group, once bound, does not trigger rescheduling, the resources in the cluster are easily fragmented and distributed, so that there are insufficient resources to respond to the newly arrived request in time.
Disclosure of Invention
The present application aims to solve at least one of the above technical drawbacks, and particularly to solve the problem that in the prior art, the hard page fault is frequently generated during the automatic driving process.
In a first aspect, an embodiment of the present application provides a method for scheduling cluster resources, including: classifying all nodes of the cluster to obtain more than one long-term node and common nodes; the long-term nodes are preferentially allocated to run the long-term task container groups, and the common nodes are preferentially allocated to run the short-term task container groups; determining a common node running a long-term task container group as a first target node; expelling a long-term task container group on the first target node that is not in use; the evicted set of containers is rescheduled.
In one embodiment, classifying each node of the cluster to obtain more than one long-term node and common node includes: every first period, randomly classifying the nodes of the cluster according to a first proportion.
In one embodiment, before rescheduling the evicted container group, the method further comprises: obtaining the GPU use quantity of each node; determining nodes with GPU use numbers lower than a first threshold as second target nodes; the set of containers on the second target node that are not in use is evicted.
In one embodiment, rescheduling an evicted set of containers comprises: for any one of the evicted container groups, scoring each node according to the matching degree between the type of the evicted container group and the type of the node to obtain the type score of each node; the evicted set of containers is scheduled according to the type score.
In one embodiment, scheduling the evicted container group according to the type score includes: if the highest type score node in the nodes is enough to accommodate the evicted container group, the evicted container group is centrally scheduled to the highest type score node; if the node with the highest type score in the nodes is insufficient to accommodate the evicted container group, the containers in the evicted container group are distributed and scheduled in sequence according to the order of the type scores from high to low in the nodes with less than full load.
In one embodiment, evicting a long-term task container group on a first target node that is not in use comprises: for any container group of the first target node, judging whether the container group is in a using state; if not, judging whether the type of the task executed by the container group is a first preset type; if yes, the container group is evicted.
In one embodiment, the method further comprises: when any one container group is evicted, a notification message is sent to the users of the container groups.
In a second aspect, an embodiment of the present application provides a cluster resource scheduling device, including: the classification module is used for classifying each node of the cluster to obtain more than one long-term node and common nodes; the long-term nodes are preferentially allocated to run the long-term task container groups, and the common nodes are preferentially allocated to run the short-term task container groups; an eviction node determining module, configured to determine a common node running a long-term task container set as a first target node; an eviction module for evicting a long-term task container group that is not in use on the first target node; and the rescheduling module is used for rescheduling the evicted container group.
In a third aspect, an embodiment of the present application provides a computer device, including one or more processors, and a memory, where computer readable instructions are stored, which when executed by the one or more processors, perform the steps of the cluster resource scheduling method in any of the foregoing embodiments.
In a fourth aspect, embodiments of the present application provide a storage medium having stored therein computer readable instructions, which when executed by one or more processors, cause the one or more processors to perform the steps of the cluster resource scheduling method in any of the embodiments described above.
From the above technical solutions, the embodiments of the present application have the following advantages:
based on any of the above embodiments, the nodes on the cluster are divided into long-term nodes and normal nodes, the long-term nodes will be preferentially allocated to long-term task container groups, the short-term nodes will be preferentially allocated to short-term task container groups, and the container groups which expect to occupy cluster resources for a long time are concentrated on the long-term nodes, so that more complete nodes can wait for new requests to arrive. For the first target node which does not accord with the resource distribution condition, the long-term task container group running on the first target node is evicted, and the scheduling mechanism of the cluster can redistribute the evicted container group according to the expectations, so that the resource distribution in the cluster is more reasonable, the machine cost is saved, the fragmentation of GPU resources in the cluster and the whole queuing and running time of new requests are reduced, and the user research and development efficiency is improved.
Drawings
In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the drawings that are required in the embodiments or the description of the prior art will be briefly described below, it being obvious that the drawings in the following description are only some embodiments of the present application, and that other drawings may be obtained according to these drawings without inventive faculty for a person skilled in the art.
Fig. 1 is a flow chart of a cluster resource scheduling method according to an embodiment of the present application;
fig. 2 is a schematic block diagram of a cluster resource scheduling device according to an embodiment of the present application;
fig. 3 is an internal structural diagram of a computer device according to an embodiment of the present application.
Detailed Description
The following description of the embodiments of the present application will be made clearly and fully with reference to the accompanying drawings, in which it is evident that the embodiments described are only some, but not all, of the embodiments of the present application. All other embodiments, which can be made by one of ordinary skill in the art without undue burden from the present disclosure, are within the scope of the present disclosure.
The embodiment of the application provides a cluster resource scheduling method, and the cluster resource aimed at by the following description is mainly GPU resource, namely, each node in the cluster is configured with a plurality of GPUs. But the present application is applicable to other cluster resources similar to GPU resources. Referring to fig. 1, the scheduling method includes steps S102 to S108.
S102, classifying all nodes of the cluster to obtain more than one long-term node and common nodes.
It will be appreciated that for a newly arrived container group request, the task performed by the container group may be determined from the container group request, and thus the type of the container group may be determined. Specifically, if the task type corresponding to the container group is a long-term task, the container group corresponding to the container group request is a long-term task container group. If the task type corresponding to the container group is a short-term task, the container group corresponding to the container group request is a short-term task container group. When determining whether the task executed by the container group is a long-term task or a short-term task, a first preset type corresponding to the long-term task and a second preset type corresponding to the short-term task can be set according to the historical time-consuming condition of each task. And when the task executed by the container group belongs to the first preset type, judging that the container group is a long-term task container group. And when the task executed by the container group belongs to a second preset type, judging that the container group is a short-term task container group. In some embodiments, the first preset type includes a user personal cloud service, a distributed training task, and the like. The customer personal cloud service load is low and may take days from distribution to reclamation. The distributed training task is that a plurality of GPUs are needed for training in one container group, and the large distributed training task can be as long as tens of hours. The second preset type includes an inference task, a single GPU training task, and the like. The time consumed by the reasoning task is often on the order of seconds and minutes. Single GPU training tasks tend to be on the order of hours.
The scheduling mechanism compares the container group type corresponding to the container group request with the type of each node, and will preferentially allocate the long-term task container group to the long-term node for operation and will preferentially allocate the short-term task container group to the ordinary node for operation. The priority allocation here refers to that if both types of nodes can meet the operation condition of the container group request, the corresponding type of nodes are preferentially selected for allocation, and if only the nodes of the non-corresponding type meet the operation condition, the container group is also allocated to the nodes of the non-corresponding type. I.e. the boundary between the two classes of nodes is a soft constraint, the long-term task container group may run on common nodes, and the short-term task container group may also run on long-term nodes.
In addition, the duty ratio of the long-term node and the common node can be adjusted according to the needs. The long-term nodes and the common nodes may remain unchanged after classification. However, considering that the long-term node may be preferentially allocated to a container group running the long-term task, the long-term node may remain in an active state for a long time, which may cause the device corresponding to the long-term node to be excessively used. To balance the GPU load of the cluster, in some embodiments, each node of the cluster is randomly classified according to a first scale every first period. That is, the nodes in the cluster are periodically reclassified, each node has the opportunity to become a long-term node, and adverse consequences caused by long-term active state of some nodes are prevented.
And S104, determining a common node running with the long-term task container group as a first target node.
It can be appreciated that the present application contemplates short-term task container groups that take less time, quickly release the cluster resources they occupy, and do not easily result in a fragmented distribution of resources within the cluster. The long-term task container group is easy to cause that each node has the long-term task container group because the long-term task container group needs to occupy the resources of the node for a long time, and when the request for the complete node to provide the resources comes, the response to the request is difficult. Therefore, it is desirable for the long-term task container set to be as centralized as possible on the long-term nodes, so that there can be complete common nodes to respond to the newly arrived requests to solve the problem of cluster resource fragmentation. The first target node is the node needing to carry out resource rescheduling. Since the boundary between the long-term node and the normal node is a soft constraint, there may not be a suitable long-term node at the time of the initial allocation of the long-term task container group, and the long-term task container group may be allocated to the normal node. This is not consistent with the goal of reducing resource fragmentation, and therefore, the regular nodes in this case need to be rescheduled.
S106, expelling the long-term task container group which is not in use on the first target node.
It will be appreciated that the long-term task container group on the first target node is expected to run on the long-term node and therefore needs to be reassigned after being evicted. The container group may be in use by the user while running on the node, i.e., in use. The eviction of the container group may result in the container group being temporarily unavailable and the data generated during use may be lost. Thus, in order not to affect the normal use of the user, the long-term task container group on the first target node that needs to be evicted should be a long-term task container group that is not in use.
S108, rescheduling the evicted container group.
When a container group is evicted, the container group is reassigned by the scheduling mechanism of the cluster, and the assignment of the container group on each node is expected to be more desirable during rescheduling. In a specific embodiment, for any one of the evicted container groups, scoring is performed on each node according to the matching degree between the type of the evicted container group and the type of the node, so as to obtain the type score of each node. Specifically, the score when the type of the container group matches the type of the node is higher than the score when the type of the container group does not match the type of the node. I.e., long-term task container groups may be scored high for long-term nodes, but low for ordinary nodes. Short-term task container groups may be scored high for common nodes, but low for long-term nodes. And finally, the container groups to be evicted are reassigned based on the score, so that the assignment of the container groups on the nodes is more desirable. Taking the long-term task container group from the first target node as an example, it will be preferentially allocated to the long-term nodes when reallocated, so that the long-term task container group in the entire cluster is more concentrated in the long-term nodes.
It should be noted that, steps S104 to S108 may be performed periodically, i.e. periodically determining whether the first target node exists in the cluster, and rescheduling the first target node. The periodic execution of steps S104 to S108 may be synchronized with the re-classification of the node, i.e. also at intervals of the first period. A second period different from the first period may also be selected.
Based on the cluster resource scheduling method in this embodiment, the nodes on the cluster are divided into long-term nodes and common nodes, the long-term nodes are to be preferentially allocated to long-term task container groups, the short-term nodes are to be preferentially allocated to short-term task container groups, and the container groups which expect to occupy cluster resources for a long time are concentrated on the long-term nodes, so that more complete nodes can wait for new requests to arrive. For the first target node which does not accord with the resource distribution condition, the long-term task container group running on the first target node is evicted, and the scheduling mechanism of the cluster can redistribute the evicted container group according to the expectations, so that the resource distribution in the cluster is more reasonable, the machine cost is saved, the fragmentation of GPU resources in the cluster and the whole queuing and running time of new requests are reduced, and the user research and development efficiency is improved.
In one embodiment, before rescheduling the evicted container group, the method further comprises:
(1) And obtaining the GPU use quantity of each node.
(2) And determining the node of which the GPU use number is lower than the first threshold value as a second target node.
(3) The set of containers on the second target node that are not in use is evicted.
It will be appreciated that multiple GPUs will be configured on each node, and that the set of containers on each node may only require a portion of the GPUs. Therefore, the number of GPU usage on each node can reflect the resource usage rate of the node, if the number of GPU usage of a certain node is lower than a first threshold, the resource usage rate of the node can be considered to be lower, the container group of the node can be moved to other nodes so as to enable the node to be a complete and abundant resource, new requests with high requirements on the number of GPU can be responded more quickly, and the problem of resource fragmentation is further reduced. In addition, in some embodiments, after determining the first target node and/or the second target node, if the container group in the above conditions meets the GPU model requirement, before performing the eviction, it should be determined whether other nodes have GPUs with the same model as the container group needs, if yes, the eviction is performed, and if not, the first target node and/or the second target node remain unchanged.
In one embodiment, scheduling the evicted container group according to the type score includes:
(1) If the highest type score node is sufficient to accommodate the evicted container group, the evicted container group is centrally scheduled to the highest type score node.
It will be appreciated that, in order to further solve the problem of resource fragmentation, the present embodiment desirably operates the container groups in a complete set on the same node, i.e. the number of GPUs available on the allocated node is greater than or equal to the number of GPUs required for the evicted container group, i.e. the node is considered to be sufficient to accommodate the evicted container group. And, it is also desirable to assign the container groups to nodes that more closely match the type of task being performed by itself. Thus, the nodes under full load are ranked by type score, and nodes sufficient to accommodate the evicted container group are screened from the top-ranked nodes. If there are a plurality of such nodes, one may be optionally allocated a set of evicted containers. If there is only one, then the evicted container group is directly assigned to that node.
(2) If the node with the highest type score in the nodes is insufficient to accommodate the evicted container group, the containers in the evicted container group are sequentially and dispersedly scheduled in the nodes according to the order of the type scores from high to low.
It will be appreciated that if the evicted container groups cannot be centrally run in the same node, the evicted container groups are rescheduled in a policy that distributes the evicted container groups over as few nodes as possible. Namely, firstly, partial containers of the evicted container group are distributed to the node with the highest type score, and after all GPU of the node are used, the next node is selected from high to low according to the type score until all containers of the evicted container group are distributed to a plurality of nodes.
In one embodiment, evicting a long-term task container group on a first target node that is not in use comprises:
(1) For any one of the container groups of the first target node, it is determined whether the container group is in use.
(2) If not, judging whether the type of the task executed by the container group is a first preset type.
(3) If yes, the container group is evicted.
It will be appreciated that for each container group running on the first target node, a determination is first made as to whether the container group is in use. The judgment can be performed by judging whether the container group has an active ssh client or not, and also can be performed by judging whether the GPU corresponding to the container group has a task running or not. And after the container group is not in the use state, acquiring the type of the task executed by the container group, if the type is a first preset type corresponding to the long-term task, determining the type of the container group as the long-term task container group, and expelling the type of the container group.
In one embodiment, the cluster resource scheduling method further includes: when any one container group is evicted, a notification message is sent to the users of the container groups. It can be understood that there is a correspondence between the container group and the user, the user has a right to use the container group under his name, and when the container group under a certain user name is evicted, the service corresponding to the container group will be temporarily unavailable. In order to improve the experience of the user, when the container group under a certain user name is evicted, the user is informed through a notification message, so that the situation that the user cannot obtain a response due to unknowing and submitting a request in a scheduling period is avoided.
An embodiment of the present application provides a cluster resource scheduling apparatus, please refer to fig. 2, including a classification module 210, an eviction node determining module 220, an eviction module 230, and a rescheduling module 240.
The classification module 210 is configured to classify each node of the cluster to obtain more than one long-term node and a common node. The long-term nodes are preferentially allocated to run long-term task container groups, and the common nodes are preferentially allocated to run short-term task container groups. The eviction node determination module 220 is configured to determine a common node running a long-term task container group as a first target node. The eviction module 230 is configured to evict a long-term task container group on the first target node that is not in use. Rescheduling module 240 is configured to reschedule the evicted container group.
In one embodiment, the classification module 210 is configured to randomly classify the nodes of the cluster according to a first proportion every first period.
In one embodiment, the eviction node determining module 220 is configured to obtain the GPU usage number of each node; determining nodes with GPU use numbers lower than a first threshold as second target nodes; the set of containers on the second target node that are not in use is evicted.
In one embodiment, the rescheduling module 240 is configured to score each node for any of the evicted container groups according to the matching degree between the type of the evicted container group and the type of the node, so as to obtain a type score of each node; the evicted set of containers is scheduled according to the type score.
In one embodiment, the rescheduling module 240 is configured to centrally schedule the evicted container group to the node with the highest type score if the node with the highest type score is sufficient to accommodate the evicted container group; if the node with the highest type score in the nodes is insufficient to accommodate the evicted container group, the containers in the evicted container group are distributed and scheduled in sequence according to the order of the type scores from high to low in the nodes with less than full load.
In one embodiment, the eviction module 230 is configured to determine, for any container group of the first target node, whether the container group is in use; if not, judging whether the type of the task executed by the container group is a first preset type; if yes, the container group is evicted.
In one embodiment, the cluster resource scheduling device further includes a notification module. The notification module is used for sending a notification message to a user of the container group when any one of the container groups is evicted.
The specific limitation of the cluster resource scheduling device can be referred to the limitation of the cluster resource scheduling method in the above description, and will not be repeated here. The modules in the cluster resource scheduling device may be implemented in whole or in part by software, hardware, or a combination thereof. The above modules may be embedded in hardware or may be independent of a processor in the computer device, or may be stored in software in a memory in the computer device, so that the processor may call and execute operations corresponding to the above modules. It should be noted that, in the embodiment of the present application, the division of the modules is schematic, which is merely a logic function division, and other division manners may be implemented in actual implementation.
Embodiments of the present application provide a computer device comprising one or more processors, and a memory having stored therein computer readable instructions that, when executed by the one or more processors, perform: classifying all nodes of the cluster to obtain more than one long-term node and common nodes; the long-term nodes are preferentially allocated to run the long-term task container groups, and the common nodes are preferentially allocated to run the short-term task container groups; determining a common node running a long-term task container group as a first target node; expelling a long-term task container group on the first target node that is not in use; the evicted set of containers is rescheduled.
In one embodiment, computer-readable instructions, when executed by one or more processors, perform: every first period, randomly classifying the nodes of the cluster according to a first proportion.
In one embodiment, computer-readable instructions, when executed by one or more processors, perform: obtaining the GPU use quantity of each node; determining nodes with GPU use numbers lower than a first threshold as second target nodes; the set of containers on the second target node that are not in use is evicted.
In one embodiment, computer-readable instructions, when executed by one or more processors, perform: for any one of the evicted container groups, scoring each node according to the matching degree between the type of the evicted container group and the type of the node to obtain the type score of each node; the evicted set of containers is scheduled according to the type score.
In one embodiment, computer-readable instructions, when executed by one or more processors, perform: if the highest type score node in the nodes is enough to accommodate the evicted container group, the evicted container group is centrally scheduled to the highest type score node; if the node with the highest type score in the nodes is insufficient to accommodate the evicted container group, the containers in the evicted container group are distributed and scheduled in sequence according to the order of the type scores from high to low in the nodes with less than full load.
In one embodiment, computer-readable instructions, when executed by one or more processors, perform: for any container group of the first target node, judging whether the container group is in a using state; if not, judging whether the type of the task executed by the container group is a first preset type; if yes, the container group is evicted.
In one embodiment, computer-readable instructions, when executed by one or more processors, perform: when any one container group is evicted, a notification message is sent to the users of the container groups.
Schematically, as shown in fig. 3, fig. 3 is a schematic internal structure of a computer device provided in an embodiment of the present application, where the computer device 300 may be configured in an autonomous vehicle. Referring to FIG. 3, a computer device 300 includes a processing component 302 that further includes one or more processors, and memory resources represented by memory 301, for storing instructions, such as applications, executable by the processing component 302. The application program stored in the memory 301 may include one or more modules each corresponding to a set of instructions. Further, the processing component 302 is configured to execute instructions to perform the steps of the cluster resource scheduling method of any of the embodiments described above.
The computer device 300 may also include a power supply component 303 configured to perform power management of the computer device 300, a wired or wireless network interface 304 configured to connect the computer device 300 to a network, and an input output (I/O) interface 305. The computer device 300 may operate based on an operating system stored in memory 301, such as Windows Server TM, mac OS XTM, unix TM, linux TM, free BSDTM, or the like.
It will be appreciated by those skilled in the art that the structure shown in fig. 3 is merely a block diagram of some of the structures associated with the present application and is not limiting of the computer device to which the present application may be applied, and that a particular computer device may include more or fewer components than shown, or may combine certain components, or have a different arrangement of components.
Embodiments of the present application provide a storage medium having stored therein computer readable instructions that, when executed by one or more processors, cause the one or more processors to perform: classifying all nodes of the cluster to obtain more than one long-term node and common nodes; the long-term nodes are preferentially allocated to run the long-term task container groups, and the common nodes are preferentially allocated to run the short-term task container groups; determining a common node running a long-term task container group as a first target node; expelling a long-term task container group on the first target node that is not in use; the evicted set of containers is rescheduled.
In one embodiment, computer-readable instructions, when executed by one or more processors, cause the one or more processors to perform: every first period, randomly classifying the nodes of the cluster according to a first proportion.
In one embodiment, computer-readable instructions, when executed by one or more processors, cause the one or more processors to perform: obtaining the GPU use quantity of each node; determining nodes with GPU use numbers lower than a first threshold as second target nodes; the set of containers on the second target node that are not in use is evicted.
In one embodiment, computer-readable instructions, when executed by one or more processors, cause the one or more processors to perform: for any one of the evicted container groups, scoring each node according to the matching degree between the type of the evicted container group and the type of the node to obtain the type score of each node; the evicted set of containers is scheduled according to the type score.
In one embodiment, computer-readable instructions, when executed by one or more processors, cause the one or more processors to perform: if the highest type score node in the nodes is enough to accommodate the evicted container group, the evicted container group is centrally scheduled to the highest type score node; if the node with the highest type score in the nodes is insufficient to accommodate the evicted container group, the containers in the evicted container group are distributed and scheduled in sequence according to the order of the type scores from high to low in the nodes with less than full load.
In one embodiment, computer-readable instructions, when executed by one or more processors, cause the one or more processors to perform: for any container group of the first target node, judging whether the container group is in a using state; if not, judging whether the type of the task executed by the container group is a first preset type; if yes, the container group is evicted.
In one embodiment, computer-readable instructions, when executed by one or more processors, cause the one or more processors to perform: when any one container group is evicted, a notification message is sent to the users of the container groups.
Finally, it is further noted that relational terms such as first and second, and the like are 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. Moreover, 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 one … …" does not exclude the presence of other like elements in a process, method, article, or apparatus that comprises the element.
In the present specification, each embodiment is described in a progressive manner, and each embodiment focuses on the difference from other embodiments, and may be combined according to needs, and the same similar parts may be referred to each other.
The previous description of the disclosed embodiments is provided to enable any person skilled in the art to make or use the present application. Various modifications to these embodiments will be readily apparent to those skilled in the art, and the generic principles defined herein may be applied to other embodiments without departing from the spirit or scope of the application. Thus, the present application is not intended to be limited to the embodiments shown herein but is to be accorded the widest scope consistent with the principles and novel features disclosed herein.

Claims (10)

1. The cluster resource scheduling method is characterized by comprising the following steps of:
classifying all nodes of the cluster to obtain more than one long-term node and common nodes; the long-term nodes are preferentially allocated to run long-term task container groups, and the common nodes are preferentially allocated to run short-term task container groups;
determining the common node running the long-term task container group as a first target node;
expelling the long-term task container group not in use on the first target node;
the evicted set of containers is rescheduled.
2. The method of claim 1, wherein classifying each node of the cluster to obtain more than one long-term node and common node comprises:
each node of the cluster is randomly classified according to a first proportion every first period.
3. The method of claim 1, wherein prior to rescheduling the evicted container group, further comprising:
obtaining the GPU use quantity of each node;
determining the node of which the GPU usage number is lower than a first threshold value as a second target node;
and expelling the container group which is not in use on the second target node.
4. A method according to any of claims 1-3, wherein rescheduling the evicted set of containers comprises:
for any one of the evicted container groups, scoring each node according to the matching degree between the type of the evicted container group and the type of the node, and obtaining the type score of each node;
scheduling the evicted container group according to the type score.
5. The method of claim 4, wherein the scheduling the evicted container group according to the type score comprises:
if one of the nodes with the highest type score is enough to accommodate the evicted container group, the evicted container group is centrally scheduled to one of the nodes with the highest type score;
and if the node with the highest type score in the nodes is insufficient to accommodate the evicted container group, sequentially performing decentralized scheduling on containers in the evicted container group in the order from high to low in the nodes with the underload.
6. The method of claim 1, wherein said evicting the long-term task container group on the first target node that is not in use comprises:
for any container group of the first target node, judging whether the container group is in a using state;
if not, judging whether the type of the task executed by the container group is a first preset type;
if yes, the container group is evicted.
7. The method as recited in claim 1, further comprising:
and when any container group is evicted, sending a notification message to a user of the container group.
8. A cluster resource scheduling apparatus, comprising:
the classification module is used for classifying each node of the cluster to obtain more than one long-term node and common nodes; the long-term nodes are preferentially allocated to run long-term task container groups, and the common nodes are preferentially allocated to run short-term task container groups;
an eviction node determining module, configured to determine the common node running the long-term task container group as a first target node;
an eviction module configured to evict the long-term task container group that is not in use on the first target node;
and the rescheduling module is used for rescheduling the evicted container group.
9. A computer device comprising one or more processors and a memory having stored therein computer readable instructions which, when executed by the one or more processors, perform the steps of the cluster resource scheduling method of any one of claims 1-7.
10. A storage medium having stored therein computer readable instructions which, when executed by one or more processors, cause the one or more processors to perform the steps of the cluster resource scheduling method of any of claims 1-7.
CN202310253425.2A 2023-03-15 2023-03-15 Cluster resource scheduling method, device, computer equipment and storage medium Pending CN116360922A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202310253425.2A CN116360922A (en) 2023-03-15 2023-03-15 Cluster resource scheduling method, device, computer equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202310253425.2A CN116360922A (en) 2023-03-15 2023-03-15 Cluster resource scheduling method, device, computer equipment and storage medium

Publications (1)

Publication Number Publication Date
CN116360922A true CN116360922A (en) 2023-06-30

Family

ID=86927564

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202310253425.2A Pending CN116360922A (en) 2023-03-15 2023-03-15 Cluster resource scheduling method, device, computer equipment and storage medium

Country Status (1)

Country Link
CN (1) CN116360922A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN117331650A (en) * 2023-10-31 2024-01-02 中科驭数(北京)科技有限公司 Container set scheduling method, device, equipment and storage medium

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN117331650A (en) * 2023-10-31 2024-01-02 中科驭数(北京)科技有限公司 Container set scheduling method, device, equipment and storage medium

Similar Documents

Publication Publication Date Title
CN109960585B (en) Resource scheduling method based on kubernets
US8185908B2 (en) Dynamic scheduling in a distributed environment
CN105159769A (en) Distributed job scheduling method suitable for heterogeneous computational capability cluster
Wided et al. Load balancing with Job Migration Algorithm for improving performance on grid computing: Experimental Results
CN111861412B (en) Completion time optimization-oriented scientific workflow scheduling method and system
CN108509280B (en) Distributed computing cluster locality scheduling method based on push model
CN109783225B (en) Tenant priority management method and system of multi-tenant big data platform
US8539495B2 (en) Recording medium storing therein a dynamic job scheduling program, job scheduling apparatus, and job scheduling method
CN113867959A (en) Training task resource scheduling method, device, equipment and medium
CN106201701A (en) A kind of workflow schedule algorithm of band task duplication
CN116360922A (en) Cluster resource scheduling method, device, computer equipment and storage medium
CN116010064A (en) DAG job scheduling and cluster management method, system and device
CN112799837A (en) Container dynamic balance scheduling method
Qureshi et al. Grid resource allocation for real-time data-intensive tasks
CN111767145A (en) Container scheduling system, method, device and equipment
CN111796933A (en) Resource scheduling method, device, storage medium and electronic equipment
CN117539612A (en) AI training platform task scheduling method and system based on chaotic sparrow algorithm
CN108983712A (en) A kind of optimization mixes the method for scheduling task of crucial real-time system service life
Naik et al. Scheduling tasks on most suitable fault tolerant resource for execution in computational grid
CN116263715A (en) Automatic scaling system and method for cloud native intelligent typesetting service
CN114995974A (en) Task scheduling method and device, storage medium and computer equipment
CN115562841A (en) Cloud video service self-adaptive resource scheduling system and method
CN115629854A (en) Distributed task scheduling method, system, electronic device and storage medium
CN112286631B (en) Kubernetes resource scheduling method and device and electronic equipment
CN112291320A (en) Distributed two-layer scheduling method and system for quantum computer cluster

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