Cluster energy saving method and device

By obtaining indicator information on the idle state of the computing cluster resource and adjusting the number of normal nodes and prepared sleeping nodes, the problem that the computing cluster cannot achieve energy saving is solved, and the energy saving and energy consumption reduction of the computing cluster is achieved.

CN114710563BActive Publication Date: 2025-03-11HUAWEI TECH CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202011491236.1
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2020-12-17
Publication Date
2025-03-11
Estimated Expiration
2040-12-17

AI Technical Summary

Technical Problem

In a compute cluster, the management node cannot determine the idle node without task execution, so it cannot set it to sleep, resulting in the compute cluster being unable to achieve energy saving.

Method used

By obtaining indicator information that characterizes the idle state of the resource calculation cluster, and when determining that the idle state of the resource calculation cluster reaches the set indicator, adjust the number of normal nodes and ready-to-door nodes in the calculation cluster, so that the target number of ready-to-door nodes are ready to enter the dormant state.

Benefits of technology

It realizes energy saving in the computing cluster, reduces energy consumption, and does not interrupt operations to ensure that users are insensitive.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN114710563B_ABST
    Figure CN114710563B_ABST
Patent Text Reader

Abstract

A cluster energy-saving method and device are used to achieve energy saving of a computing cluster. In the present application, index information for characterizing the resource idle state of a computing cluster is obtained, wherein the index information is determined based on the total resources of the computing cluster and the resources occupied by the currently running tasks; the computing cluster includes normal nodes and ready-to-sleep nodes, and the resource scheduling priority of the normal nodes is higher than the resource scheduling priority of the ready-to-sleep nodes; according to the index information, when the resource idle state of the computing cluster reaches a set index, the target number of ready-to-sleep nodes that need to be included in the computing cluster is determined; when the target number is greater than the number of ready-to-sleep nodes currently included in the computing cluster, a first number of normal nodes in the computing cluster is converted into ready-to-sleep nodes, and the first number is the difference between the target number and the number of ready-to-sleep nodes currently included in the computing cluster.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of computer technology, and in particular to a cluster energy-saving method and device. Background Art

[0002] The energy consumption of servers is an issue that is widely studied in the industry. Especially for large-scale computing cluster scenarios, good energy-saving methods are of great significance for enterprises to reduce costs.

[0003] During resource scheduling, the management node distributes tasks based on the load balancing strategy. Specifically, according to the load status of each computing node in the computing cluster, the scheduled tasks are distributed to the computing nodes with smaller loads, and each computing node in the computing cluster has tasks to execute. In this scenario, the management node cannot determine the idle nodes in the computing cluster that have no tasks to execute, and therefore cannot set the idle nodes to sleep, and cannot achieve energy saving in the computing cluster. Summary of the invention

[0004] The present application provides a cluster energy saving method and device for realizing energy saving of a computing cluster.

[0005] In a first aspect, the present application provides a cluster energy-saving method, comprising: obtaining indicator information used to characterize a resource idle state of a computing cluster, the indicator information being determined based on the total resources of the computing cluster and the resources occupied by currently running tasks; the computing cluster includes normal nodes and ready-to-sleep nodes, and the resource scheduling priority of the normal nodes is higher than the resource scheduling priority of the ready-to-sleep nodes; according to the indicator information, determining a target number of ready-to-sleep nodes that need to be included in the computing cluster when the resource idle state of the computing cluster reaches a set indicator; when the target number is greater than the number of ready-to-sleep nodes currently included in the computing cluster, converting a first number of normal nodes in the computing cluster into ready-to-sleep nodes, the first number being the difference between the target number and the number of ready-to-sleep nodes currently included in the computing cluster.

[0006] A possible implementation method also includes: when the target number is less than the number of nodes ready to sleep currently included in the computing cluster, converting a second number of nodes ready to sleep in the computing cluster into normal nodes, the second number being the difference between the target number and the number of nodes ready to sleep currently included in the computing cluster.

[0007] In the above technical solution, according to the indicator information of the idle state of resources in the computing cluster, the target number of nodes ready to sleep that need to be included in the computing cluster is determined, and then the number of nodes ready to sleep in the computing cluster is adjusted to the target number, so that the target number of nodes ready to sleep are ready to sleep. Further, the resource scheduling priority of the normal node is higher than the resource scheduling priority of the node ready to sleep. When distributing the tasks to be scheduled, the tasks to be scheduled are preferentially distributed to the normal nodes, and the nodes ready to sleep can receive as few new tasks as possible, thereby quickly clearing the tasks running therein, so that the nodes ready to sleep enter the sleep state. This method can be applied to various scenarios. For example, this method can be applied to load balancing scenarios. Based on load balancing, tasks are preferentially distributed to normal nodes with lower loads, without being distributed to nodes ready to sleep. Moreover, in this method, there is no need to move the tasks being executed from one node to another node, so that the job is not interrupted and the job operation efficiency is not affected, so that the user does not feel it.

[0008] In one possible implementation, before obtaining the indicator information used to characterize the resource idle state of the computing cluster, it also includes: distributing the task to be scheduled to the target node in the computing cluster that matches the task to be scheduled; or determining that a task on any normal node in the computing cluster has been completed or a task on any node that is ready to sleep has been completed, and releasing the resources occupied by the completed task.

[0009] In the above technical scheme, when it is determined that a new task is distributed to the target node, or the resources occupied by the completed task are released after the task is executed, the resource change in the computing cluster can be triggered, and the distribution of the new task to the target node or the release of the resources occupied by the completed task after the task is executed is used as a trigger condition. The trigger condition can be detected by the management node (or scheduler), so that the management node (or scheduler) determines the indicator information of the computing cluster based on the triggering of the trigger condition.

[0010] A possible implementation method also includes: obtaining a task to be scheduled, the task to be scheduled corresponding to a resource requirement; based on the resource requirement, if a target node matching the task to be scheduled is not determined from the normal nodes, determining the target node from the nodes to be prepared for sleep, and converting the target node into a normal node; distributing the task to be scheduled to the target node converted into a normal node.

[0011] In one possible implementation, the computing cluster also includes dormant nodes, and the method further includes: if the target node is not determined from the nodes to be prepared for dormancy, determining the target node from the dormant nodes; converting the target node into a normal node, and distributing the tasks to be scheduled to the target node converted into a normal node.

[0012] In the above technical solution, when distributing the tasks to be scheduled, it is determined whether the target node can be determined from the normal nodes, the nodes ready for sleep and the nodes already in sleep. Based on this, the nodes ready for sleep will be converted to normal nodes only when necessary, or the nodes already in sleep will be converted to normal nodes, which helps to make full use of the computing resources in the computing cluster.

[0013] In one possible implementation, the indicator information may be a resource idle rate of a computing cluster; obtaining indicator information used to characterize the resource idle state of the computing cluster includes: determining the total amount of occupied resources of the computing cluster based on the amount of resources occupied by running tasks in each normal node in the computing cluster and the amount of resources occupied by running tasks in each node ready to sleep; determining the resource idle rate of the computing cluster based on the total amount of occupied resources of the computing cluster and the total amount of resources of the computing cluster, wherein the total amount of resources of the computing cluster is determined based on the total amount of resources of each normal node in the computing cluster and the total amount of resources of each node ready to sleep.

[0014] In the above technical solution, the resource idle rate of the computing cluster is determined by calculating the amount of resources occupied by running tasks in each normal node and each node ready to sleep and the total amount of node resources in the computing cluster. The resource idle rate of the computing cluster is used as indicator information of the resource idle state in the computing cluster, which can more accurately evaluate the resource idle state in the current computing cluster.

[0015] In a possible implementation, after converting a first number of normal nodes in the computing cluster into ready-to-sleep nodes, it also includes: determining ready-to-sleep nodes that meet preset sleep conditions from the target number of ready-to-sleep nodes; and controlling the ready-to-sleep nodes that meet the preset sleep conditions to sleep.

[0016] In one possible implementation, a ready-to-sleep node that meets a preset sleep condition is determined from a target number of ready-to-sleep nodes, including: if it is determined that no task is running in the first ready-to-sleep node, and the duration of the non-running task reaches a preset duration, then it is determined that the first ready-to-sleep node meets the preset sleep condition, and the first ready-to-sleep node is any one of the target number of ready-to-sleep nodes.

[0017] In the above technical solution, from the target number of sleep-ready nodes, the sleep-ready nodes that have not run any tasks and have not run any tasks for a preset period of time are determined, indicating that the sleep-ready nodes have not been assigned any tasks for a period of time, and the current normal nodes can provide relatively sufficient computing resources for the running of tasks in the current computing cluster, so the sleep-ready nodes can be put to sleep, which helps to achieve cluster energy saving and reduce the number of times the sleep-ready nodes are awakened.

[0018] In a second aspect, the present application provides a cluster energy-saving device, comprising:

[0019] A monitoring unit is used to obtain indicator information for characterizing the idle state of resources of a computing cluster, where the indicator information is determined based on the total resources of the computing cluster and the resources occupied by the currently running tasks; the computing cluster includes normal nodes and nodes ready to sleep, and the resource scheduling priority of the normal nodes is higher than the resource scheduling priority of the nodes ready to sleep;

[0020] A scheduling unit is used to determine, based on the indicator information, a target number of nodes ready to sleep that need to be included in the computing cluster when the resource idle state of the computing cluster reaches a set indicator; and when the target number is greater than the number of nodes ready to sleep currently included in the computing cluster, convert a first number of normal nodes in the computing cluster into nodes ready to sleep, the first number being the difference between the target number and the number of nodes ready to sleep currently included in the computing cluster.

[0021] In one possible implementation, the scheduling unit is also used to: when the target number is less than the number of nodes ready to sleep currently included in the computing cluster, convert a second number of nodes ready to sleep in the computing cluster into normal nodes, the second number being the difference between the target number and the number of nodes ready to sleep currently included in the computing cluster.

[0022] In one possible implementation, the scheduling unit is further used to: distribute the tasks to be scheduled to target nodes in the computing cluster that match the tasks to be scheduled before the monitoring unit obtains indicator information used to characterize the idle state of resources of the computing cluster; or before the monitoring unit obtains indicator information used to characterize the idle state of resources of the computing cluster, determine whether a task has been completed on any normal node in the computing cluster or whether a task has been completed on any node that is ready to sleep, and release the resources occupied by the completed tasks.

[0023] In one possible implementation, the scheduling unit is also used to: obtain tasks to be scheduled, corresponding to resource requirements; based on the resource requirements, if a target node matching the task to be scheduled is not determined from the normal nodes, determine the target node from the nodes that are ready to sleep, and convert the target node into a normal node; and distribute the task to be scheduled to the target node converted into a normal node.

[0024] In one possible implementation, the computing cluster also includes dormant nodes; the scheduling unit is also used to: if the target node is not determined from the nodes to be put into dormancy, determine the target node from the dormant nodes and convert the target node into a normal node; and distribute the tasks to be scheduled to the target nodes converted into normal nodes.

[0025] In one possible implementation, the indicator information may be a resource idle rate of a computing cluster; the monitoring unit is specifically used to: determine the total amount of occupied resources of the computing cluster based on the amount of resources occupied by running tasks in each normal node in the computing cluster and the amount of resources occupied by running tasks in each node ready to sleep; determine the resource idle rate of the computing cluster based on the total amount of occupied resources of the computing cluster and the total amount of resources of the computing cluster, the total amount of resources of the computing cluster being determined based on the total amount of resources of each normal node in the computing cluster and the total amount of resources of each node ready to sleep.

[0026] In one possible implementation, the scheduling unit is also used to: after converting a first number of normal nodes in the computing cluster into ready-to-sleep nodes, determine the ready-to-sleep nodes that meet preset sleep conditions from the target number of ready-to-sleep nodes; and control the ready-to-sleep nodes that meet the preset sleep conditions to sleep.

[0027] In one possible implementation, the scheduling unit is specifically used to: if it is determined that no tasks are running in the first ready-to-sleep node and the duration of no tasks running reaches a preset duration, then it is determined that the first ready-to-sleep node meets the preset sleep condition, and the first ready-to-sleep node is any one of the target number of ready-to-sleep nodes.

[0028] In a third aspect, the present application provides a computer-readable storage medium, in which a computer program or instructions are stored. When the computer program or instructions are executed by a computing device, the above-mentioned first aspect or any possible implementation of the first aspect is executed.

[0029] In a fourth aspect, the present application provides a computing device, comprising a processor, wherein the processor is connected to a memory, the memory stores a computer program, and the processor is used to execute the computer program stored in the memory, so that the computing device performs the method in the above-mentioned first aspect or any possible implementation of the first aspect.

[0030] In a fifth aspect, the present application provides a chip comprising at least one processor and an interface; the interface is used to provide program instructions or data to the at least one processor; the at least one processor is used to execute the program line instructions to implement the method in the above-mentioned first aspect or any possible implementation of the first aspect.

[0031] In a sixth aspect, the present application provides a computer program product, which includes a computer program or instructions. When the computer program or instructions are executed by a computing device, the method in the above-mentioned first aspect or any possible implementation of the first aspect is implemented.

[0032] In a seventh aspect, the present application provides a computing cluster system, comprising normal nodes, nodes ready for sleep, nodes already in sleep, and the cluster energy-saving device in the second aspect above, wherein the cluster energy-saving device is used to control the normal nodes, the nodes ready for sleep, and the nodes already in sleep.

[0033] The technical effects that can be achieved in any of the second to seventh aspects mentioned above can refer to the description of the beneficial effects in any possible implementation method of the first aspect mentioned above, and will not be repeated here. BRIEF DESCRIPTION OF THE DRAWINGS

[0034] Figure 1 A schematic diagram of the architecture of a computing cluster system provided for this application;

[0035] Figure 2 A schematic diagram of the architecture of another computing cluster system provided for this application;

[0036] Figure 3 A schematic diagram of the process of the first cluster energy saving method provided for this application;

[0037] Figure 4 A flow chart of the second cluster energy saving method provided in this application;

[0038] Figure 5 A flowchart of the third cluster energy saving method provided for this application;

[0039] Figure 6 A flowchart of a method for executing a job provided in this application;

[0040] Figure 7 A flowchart of the fourth cluster energy saving method provided in this application;

[0041] Figure 8 A flowchart of the fifth cluster energy saving method provided for this application;

[0042] Fig. 9 A schematic diagram of the architecture of another computing cluster system provided in this application;

[0043] Fig.10 A schematic diagram of the structure of a cluster energy-saving device provided in this application;

[0044] Fig.11 A schematic diagram of the structure of another cluster energy-saving device provided in this application. DETAILED DESCRIPTION

[0045] In order to better explain the embodiments of the present application, the professional terms in the embodiments of the present application are explained as follows:

[0046] South Bridge: South Bridge is an important part of the motherboard chipset, usually located below the motherboard, far from the central processing unit (CPU) slot. South Bridge is responsible for the communication between input / output (IO) buses, such as peripheral component interconnect (PCI) bus, universal serial bus (USB), local area network (LAN), advanced technology attachment (ATA), serial advanced technology attachment (SATA), audio controller, keyboard controller, real-time clock controller, advanced power management, etc.

[0047] Load balancing: Balancing the load (work tasks) and distributing them to multiple operating units (such as computing nodes or servers) for execution, so that multiple operating units can complete the work tasks together.

[0048] Batch processing: A method of executing programs in a computer system that can execute a series of predefined or randomly input programs in an orderly manner according to specified rules without human intervention. Batch execution is often used in various scheduling systems. It can improve resource utilization and reduce human-computer interaction overhead.

[0049] Job: A collection of program instances that need to be executed to complete a specific computing business, usually corresponding to a set of processes, containers, or other running entities on one or more computers. In batch processing systems, jobs are also called "batch jobs".

[0050] Task: An individual instance in a collection of program instances within a job, usually corresponding to a process, container, or other runtime entity on a computer.

[0051] The embodiments of the present application will be described in detail below with reference to the accompanying drawings.

[0052] Figure 1An exemplary architecture diagram of a computing cluster system is provided, which includes a management node, a switch, and a resource pool. Exemplarily, the management node receives a job submitted by a user, divides the job into multiple tasks to be scheduled, and then determines the computing node corresponding to the task to be scheduled according to the resource requirements of each task to be scheduled, distributes the task to be scheduled to the corresponding computing node via the switch, and the computing node executes the received task.

[0053] Combination Figure 1 The computing cluster system shown is Figure 2 Another exemplary architecture diagram of a computing cluster system is provided, which may be a high performance computing (HPC) cluster, a big data computing cluster system, an artificial intelligence (AI) computing cluster system, or other business computing cluster system. In addition, the computing cluster system may also be an HPC cluster that supports big data, AI, or other businesses.

[0054] The computing cluster system includes a submission node, k management nodes and a resource pool consisting of m computing nodes, wherein m is an integer greater than or equal to 1, k is an integer greater than or equal to 1, and the nodes are connected through a communication network.

[0055] Specifically, the computing nodes have computing resources, such as CPU resources, graphics processing unit (GPU) resources, memory resources, etc. The computing nodes are used to run tasks distributed from the management nodes, such as Figure 2 In computing node 1, tasks 11 to 1n are run; in computing node 2, tasks 21 to 2n are run, and so on; in computing node m, tasks m1 to mn are run, where 1n, 2n, ..., mn are all integers greater than or equal to 1.

[0056] The computing cluster system can include two management nodes, the master and the backup. The scheduler can be deployed in the management node. The scheduler is used to receive jobs submitted by users, divide the jobs into multiple tasks to be scheduled, and then determine the computing node corresponding to the task to be scheduled according to the resource requirements of each task to be scheduled. The task to be scheduled is distributed to the corresponding computing node. In addition, the scheduler is also used for the following functions: computing node management, to achieve management of all managed computing nodes, such as sleep, wake-up, etc.; node monitoring, real-time monitoring of the status of running jobs on each computing node; job lifecycle management, start jobs, terminate jobs, suspend jobs, resume jobs, etc.

[0057] The submission node is used by users to submit jobs to the management node. For example, users can establish a connection with the computing cluster service and use the service on the submission node through various methods such as application programming interface (API), command line, software development kit (SDK), etc. The submission node can be a separate node, or integrated into the management node, or integrated into any computing node.

[0058] During the job execution process, tasks received from the management node are run on the computing nodes in the resource pool. The management node monitors the resource idle status of the computing nodes, where the resource idle status of the computing nodes is used to indicate the load of the tasks running in the computing nodes, or to indicate the status of the available computing resources in the computing nodes.

[0059] The user submits a job to the management node through the submission node. The management node receives the job from the submission node and divides the job into multiple tasks to be scheduled. For each task to be scheduled, the management node determines the target node that meets the resource requirements of the task to be scheduled from multiple computing nodes based on the resource requirements of the task to be scheduled and the resource idle status of each computing node, and distributes the task to be scheduled to the corresponding target node.

[0060] Each computing node in the resource pool has energy consumption problems. The energy consumption of computing nodes usually includes dynamic and static parts. The dynamic part includes energy consumption of CPU, cache, memory, data transmission, etc.; the static part includes energy consumption of south bridge chip. In order to reduce the energy consumption of computing nodes, two dimensions of cluster energy saving methods are provided. One is dynamic energy consumption optimization, such as dynamic voltage and frequency scaling (DVFS), and the other is static energy consumption optimization, such as the management node determines to put the computing node to sleep according to the idle state of the computing node's resources, and then wakes up the computing node in sleep state when needed, that is, the computing node is in wake-up state.

[0061] In static energy consumption optimization, the management node is exemplarily as follows Figure 1 The management node is Figure 1 Any one or more of the resource pools in the . Or the management node is as follows Figure 2 Any one or more of the management nodes 1 to k in the process, the computing node is as follows Figure 2 Any one or more of computing nodes 1 to computing nodes m.

[0062] It is noted in advance that the computing nodes in the resource pool can be in multiple operating states. In an optional manner, the operating state includes a dormant state and a wake-up state, and the wake-up state further includes an idle state and a load state, wherein a computing node in an idle state refers to a computing node that is not running a task, and a computing node in a load state refers to a computing node that is running a task. For the convenience of description, a computing node in a dormant state can be referred to as a dormant node, and a computing node in a wake-up state can be referred to as a wake-up node. Further, the wake-up node can include a wake-up node in an idle state (which can be referred to as an idle node) and a wake-up node in a load state (which can be referred to as a load node).

[0063] In this application, the management node can adjust the current operating state of a computing node.

[0064] Exemplarily, the management node can set the state of the wake-up node to change from the wake-up state to the sleep state, which is understood as the management node setting the wake-up node to a sleep node, or the management node adjusting the state of the wake-up node to the sleep state and putting the wake-up node to sleep, wherein sleeping a node may be performing a power-off operation or a power-off operation on the node, so that the sleep node no longer runs tasks.

[0065] As another example, the management node can set the state of a dormant node to change from a dormant state to an awake state, which is understood as the management node setting the dormant node to an awakened node, or in other words, the management node adjusts the state of the dormant node to an awakened state and wakes up the dormant node, where waking up a node can be performing a power-on operation on the node, etc., so that the awakened node can run tasks.

[0066] The first cluster energy saving method exemplarily provided in the present application is that the management node sets the awakened node that has been in an idle state for a period longer than a time threshold from the awakened state to the dormant state, that is, determines the awakened node as a dormant node.

[0067] like Figure 3 The flowchart of the first cluster energy-saving method provided as an example in the present application is as follows. The computing cluster includes a management node and multiple wake-up nodes. By way of example, the multiple wake-up nodes are node 1 to node 6.

[0068] like Figure 3 In case 1, the management node determines the idle state of each awake node in the resource pool, and determines that there are no tasks to be executed in nodes 1 to 3, that is, nodes 1 to 3 are all in an idle state, and nodes 4 to 6 are in a loaded state. The management node determines that the duration of node 1 being in an idle state is greater than the time threshold, and sets node 1 from the awake state to the sleep state. Similarly, it sets nodes 2 and 3 from the awake state to the sleep state.

[0069] In the above technical solution, the management node sets the awakened nodes that have been in an idle state for a duration greater than a time threshold to a sleep state, which is mainly applicable to non-load balancing scenarios. Exemplarily, in a non-load balancing scenario, when distributing tasks, the management node distributes them in the order of nodes 1 to 6. For example, when the management node determines that there are idle resources in node 1, it distributes task 1 to node 1; when the management node distributes task 2, if it determines that node 1 is fully occupied and there are idle resources in node 2, it distributes task 2 to node 2; when the management node submits task 3, if it determines that there are still idle resources in node 2, it distributes task 3 to node 2, and the same applies to others. Then the management node determines the nodes that have been in an idle state for a duration greater than the time threshold from nodes 1 to 6, and sets them to a sleep state.

[0070] In the second cluster energy-saving method exemplarily provided in the present application, the management node sets the awakened node whose resource utilization is lower than the resource utilization threshold from the awakened state to the dormant state, that is, determines the awakened node as a dormant node.

[0071] like Figure 4 The flowchart of the second cluster energy-saving method provided as an example in the present application is as follows. The computing cluster includes a management node and multiple wake-up nodes. By way of example, the multiple wake-up nodes are node 1 to node 6.

[0072] like Figure 4 In case 1, the management node determines the resource idle state of each awakening node in the resource pool, and specifically can determine the resource idle rate (or idle resource margin percentage) of each awakening node, where the resource idle rate of the awakening node can be understood as the ratio of the amount of unoccupied resources to the total amount of resources in the awakening node. If the resource idle rates of nodes 1 to 3 are all higher than the node idle rate threshold, it is determined that nodes 1 to 3 are in a low load situation, and if the resource idle rates of nodes 4 to 6 are all not higher than the node idle rate threshold, it is determined that nodes 4 to 6 are in a high load situation. The management node transfers the tasks running in nodes 1 to 3 to nodes 4 to 6, so that nodes 1 to 3 are in an idle state. The management node sets nodes 1 to 3 in an idle state from an awake state to a sleep state.

[0073] In the above technical solution, the management node transfers the task bodies in the wake-up nodes whose resource utilization is lower than the resource utilization threshold to other wake-up nodes, which depends on two conditions: the management node supports the management capabilities of job expulsion and job interruption. Job expulsion and interruption are acceptable for distributed, stateless, and long-cycle service scheduling, such as distributed Nginx service. The distributed Nginx service is a computing cluster composed of multiple Nginx servers, which provides a unified service to the outside world. Shutting down one of the Nginx will not cause interruption of external services. In other words, this method is suitable for computing clusters where the management node supports job expulsion and job interruption.

[0074] In addition, in the above two cluster energy-saving methods, the management node may also set the dormant node from the dormant state to the awakened state. Specifically, the management node receives the job submitted by the user, divides the job into multiple tasks to be scheduled, and for any of the multiple tasks to be scheduled, if it is determined that all awakened nodes in the current resource pool cannot meet the resource requirements of the task to be scheduled, then a dormant node that can meet the resource requirements of the task to be scheduled is determined from the dormant nodes, the dormant node is awakened, and the task to be scheduled is distributed to the awakened node.

[0075] For details, please refer to Figure 3 Case 2 and / or Figure 4 In the second case, nodes 1 to 3 are in a dormant state, and nodes 4 to 6 are in an awake state. The management node receives the job submitted by the user and divides the job into multiple tasks to be scheduled. For any task to be scheduled, if the awakened node for executing the task to be scheduled cannot be determined from nodes 4 to 6, a node is selected from nodes 1 to 3 in a dormant state to be awakened. For example, node 3 is selected to be awakened, and the task to be scheduled is distributed to node 3.

[0076] This application provides a third cluster energy saving method, which can be applied to various types of scenarios. For details, please refer to Figure 5 The process can be executed by the management node or the scheduler deployed on the management node. The management node can be Figure 1 Management node in the Figure 2 Any one or more of management nodes 1 to management node k.

[0077] Step 501: The management node obtains indicator information for characterizing the idle state of resources of the computing cluster.

[0078] In the present application, the computing cluster includes multiple computing nodes, which can be further divided into wake-up nodes and dormant nodes. Furthermore, the wake-up nodes can include wake-up nodes in a ready-to-sleep state (which can be simply referred to as ready-to-sleep nodes) and wake-up nodes in a normal state (which can be simply referred to as normal nodes).

[0079] Among them, the resource scheduling priority of the awakened node is higher than the resource scheduling priority of the dormant node. The management node will distribute the task to be scheduled to the dormant node only when it is determined that there is no awakened node that meets the resource requirements of the task to be scheduled. Furthermore, among the awakened nodes, the resource scheduling priority of the normal node is higher than the resource scheduling priority of the node to be dormant. The management node will distribute the task to be scheduled to the node to be dormant only when it is determined that there is no normal node that meets the resource requirements of the task to be scheduled.

[0080] The indicator information of the resource idle state of the computing cluster (which can be referred to as the indicator information of the computing cluster for short) is determined by the management node based on the total resources of the awakened nodes in the computing cluster and the resources occupied by the currently running tasks of the awakened nodes. The indicator information of the computing cluster is used to instruct the management node to adjust the number of normal nodes, nodes ready to sleep, and nodes already asleep in the computing cluster.

[0081] Exemplarily, the management node may determine to set the awakened nodes in the computing cluster from the awakened state to the dormant state based on the indicator information of the computing cluster, thereby effectively saving the consumption of the computing cluster. Alternatively, the management node may determine to set the dormant nodes in the computing cluster from the dormant state to the awakened state based on the indicator information of the computing cluster, so that the resources of the computing nodes in the computing cluster can meet the needs of the tasks currently running in the computing cluster.

[0082] The management node determines the indicator information of the computing cluster based on the triggering conditions. In an optional example, the management node obtains the indicator information of the current computing cluster after distributing the task to be scheduled to the corresponding target node according to the task requirements of the task to be scheduled. In another optional example, the management node determines that any task is completed in any awakened node, and the resources corresponding to the task are released in the awakened node, then the management node obtains the indicator information of the current computing cluster. In addition, the management node can also periodically obtain the indicator information of the current computing cluster.

[0083] The management node can determine the indicator information of the entire computing cluster based on the indicator information of the resource idle state of each awakened node in the computing cluster (which can be referred to as the indicator information of the awakened node). The indicator information of the awakened node may include one or more of the amount of resources occupied by the running tasks in the awakened node, the amount of unoccupied resources, and the total amount of resources.

[0084] In an optional implementation, the indicator information of the computing cluster may be a resource idle rate of the computing cluster. The resource idle rate of the computing cluster may be understood as a ratio of unoccupied resources to total resources in the computing cluster.

[0085] Example 1: The management node determines the sum of unoccupied resources of each awakened node in the computing cluster and the sum of total resources of each awakened node, and then determines the ratio of the sum of unoccupied resources to the sum of total resources as the resource idle rate of the computing cluster.

[0086] Example 2: The management node determines the sum of resources occupied by running tasks in each wake-up node in the computing cluster and the sum of total resources of each wake-up node, and determines the ratio of the sum of resources occupied by running tasks in each wake-up node to the sum of total resources as the resource occupancy rate of the computing cluster, and determines the resource idle rate of the computing cluster as: 1 minus the resource occupancy rate of the computing cluster.

[0087] Example 3: The management node determines the resource idle rate of each awakened node in the computing cluster, and determines the resource idle rate of the computing cluster according to the resource idle rate of each awakened node.

[0088] In another optional implementation, the indicator information of the computing cluster may be the idle amount of resources of the computing cluster, and the idle amount of resources may be understood as the amount of unoccupied resources. Exemplarily, the management node determines the sum of the unoccupied resources of each awakened node in the computing cluster, and determines the sum of the unoccupied resources as the idle amount of resources of the computing cluster.

[0089] In addition, the management node can also determine the idle amount of resources of each awakened node in the computing cluster, count the number of awakened nodes in the computing cluster whose idle amount of resources is greater than the node idle amount threshold, and use the number to determine the indicator information of the computing cluster. Or any other achievable method.

[0090] It should be noted that when the indicator information of the computing cluster is the resource idle rate of the computing cluster, the first idle rate threshold and the second idle rate threshold can be set according to experience. When the resource idle rate of the computing cluster is greater than the first idle rate threshold, the management node determines to set the awakened node in the computing cluster from the awake state to the dormant state; when the resource idle rate of the computing cluster is less than the second idle rate threshold and there is a task to be scheduled, the management node determines to determine the dormant node that matches the task to be scheduled from the dormant nodes of the computing cluster and wake it up. Exemplarily, the first idle rate threshold can be 20%, and the second idle rate threshold can be 5%.

[0091] Similarly, when the indicator information of the computing cluster is the idle amount of resources or the number of nodes of the computing cluster, the first idle amount threshold and the second idle amount threshold, or the first number threshold and the second number threshold can also be set according to experience, which will not be repeated. For the convenience of description, the following is an example of the indicator information of the computing cluster being the idle rate of resources of the computing cluster.

[0092] When the management node determines the indicator information of a wake-up node, it may be determined according to the resource requirements of the tasks distributed to the wake-up node and / or the resources released when the tasks are completed on the wake-up node.

[0093] The following takes the example of the management node determining the resource idle rate of the CPU resources on a wake-up node.

[0094] In an example, the awakening node includes 10 CPU resources. The management node distributes the first task to the awakening node. The resource requirement of the first task is 2 CPU resources. Then the management node determines that the current idle rate of the CPU resources on the awakening node is 80%.

[0095] In another example, the awakening node includes 10 CPU resources, and multiple tasks are running on the awakening node, which occupy 9 CPU resources in total, and the idle rate of CPU resources on the current awakening node is 10%. When a task is completed on the awakening node, the CPU resources corresponding to the task, such as 3 CPU resources, are released, and the idle rate of CPU resources on the current awakening node is 40%.

[0096] It should be noted that the above example only takes CPU resources as an example. The resources in the wake-up node also include GPU resources, memory resources, etc. When the management node determines the resource idle rate of each wake-up node, it can comprehensively determine various resources.

[0097] The management node determines the idle amount of resources or other indicator information on the awakened node, or determines the idle amount of resources or other indicator information in the computing cluster, which is similar to the above examples and will not be repeated.

[0098] In addition, the indicator information of the resource idle state of the computing cluster may also be referred to as resource idle information, available resource information, computing resource information, remaining resource information, unoccupied resource information, unused resource information, etc. of the computing cluster.

[0099] In the embodiment of the present application, the indicator information of the resource idle state of the computing cluster can also be replaced by the indicator information of the resource occupancy state of the computing cluster, and the indicator information of the resource occupancy state of the computing cluster can be referred to as the resource occupancy information, resource usage information, etc. of the computing cluster. Exemplarily, the indicator information of the resource occupancy state in the computing cluster is specifically the resource occupancy rate, and the above description may include a first occupancy rate threshold and a second occupancy rate threshold. When the management node determines that the resource occupancy rate of the computing cluster is less than the first occupancy rate threshold, the awakened node therein can be set from the awakened state to the dormant state. When the management node determines that the resource occupancy rate of the computing cluster is greater than the second occupancy rate threshold and there are currently tasks to be scheduled, the dormant node therein can be set from the dormant state to the awakened state, and the specific details will not be repeated.

[0100] Step 502 : The management node determines, based on the indicator information of the computing cluster, a target number of nodes that need to be prepared for dormancy and that need to be included in the computing cluster when the indicator information of the computing cluster reaches a set indicator.

[0101] In the present application, the indicator information of the computing cluster reaches the set indicator, which may be that the resource idle rate of the computing cluster is not greater than the first idle rate threshold.

[0102] If the management node determines that the resource idle rate of the computing cluster is greater than the first idle rate threshold, it determines the total amount of resources that need to be put into sleep according to the total amount of resources of the computing cluster, the resource idle rate of the computing cluster and the first idle rate threshold, and then determines how many wake-up nodes need to be set from the wake-up state to the sleep state according to the total amount of resources that need to be put into sleep and the number of wake-up nodes in the computing cluster, so as to achieve that the resource idle rate of the computing cluster is not greater than the first idle rate threshold.

[0103] Specifically, the management node may first determine the target number of awake nodes that currently need to be converted from the awake state to the sleep state based on the total amount of resources that need to be dormant. Furthermore, in order to avoid the management node distributing tasks to awake nodes with lower loads in a load balancing scenario, the awake nodes may be divided into normal nodes and ready-to-sleep nodes, and the management node distributes tasks to normal nodes first, thereby clearing tasks in the ready-to-sleep nodes as soon as possible, and then adjusting the idle ready-to-sleep nodes to sleep nodes. That is, determining the target number of awake nodes that currently need to be converted from the awake state to the sleep state in this embodiment can be understood as determining the target number of ready-to-sleep nodes in the computing cluster.

[0104] Step 503: The management node adjusts the status of the awakened nodes in the computing cluster according to the target number of nodes ready to sleep that need to be included in the computing cluster.

[0105] Since the management node in this application continuously adjusts the status of the computing nodes in the computing cluster, there are continuously nodes in the computing cluster that are ready to sleep. The management node adjusts the status of the awakened nodes in the computing cluster according to the target number of nodes ready to sleep that need to be included in the computing cluster. Specifically, there are two situations:

[0106] Case 1: When the target number is greater than the number of sleep-ready nodes currently included in the computing cluster, the management node converts a first number of normal nodes in the computing cluster into sleep-ready nodes, where the first number is the difference between the target number and the number of sleep-ready nodes currently included in the computing cluster.

[0107] Case 2: When the target number is less than the number of sleep-ready nodes currently included in the computing cluster, a second number of sleep-ready nodes in the computing cluster are converted into normal nodes, where the second number is the difference between the target number and the number of sleep-ready nodes currently included in the computing cluster.

[0108] Exemplarily, the computing cluster includes M wake-up nodes, wherein the M wake-up nodes include M1 normal nodes and (M-M1) ready-to-sleep nodes, M1 is greater than or equal to 0, (M-M1) is greater than or equal to 0, and M is greater than or equal to 1. The management node determines the target number to be M2, and if M2 is greater than (M-M1), the management node determines (M2-(M-M1)) normal nodes from the M1 normal nodes as ready-to-sleep nodes, and if M2 is less than (M-M1), the management node determines ((M-M1)-M2) ready-to-sleep nodes from the (M-M1) ready-to-sleep nodes as normal nodes.

[0109] In the above situation 1, the management node can select the ready-to-sleep node from the normal nodes based on the ready-to-sleep node selection strategy, where the ready-to-sleep node selection strategy is, for example, random selection, selection based on the sorting of resource occupancy rates in the computing nodes, and selection based on the predicted time to complete all tasks in the computing nodes.

[0110] Exemplarily, the management node selects a normal node with a low resource occupancy rate in a resource occupancy sort as a node to be prepared for sleep according to the resource occupancy rate of each normal node, or selects a normal node with an early time in a predicted time sort as a node to be prepared for sleep according to the predicted time to complete all tasks in each normal node.

[0111] In the above situation 2, the management node can select a normal node from the nodes ready for sleep based on the normal node selection strategy. The normal node selection strategy is similar to the above-mentioned node selection strategy ready for sleep, and will not be described in detail.

[0112] Optionally, the present application further includes step 504, where the management node determines the nodes ready for sleep that meet the preset sleep conditions from the target number of nodes ready for sleep, and controls the nodes ready for sleep that meet the preset sleep conditions to sleep.

[0113] The management node may determine the nodes that can enter the sleep state from the target number of nodes that are ready to sleep based on the sleep node selection strategy. Exemplarily, the management node may set the ready to sleep nodes that meet the preset sleep conditions to the sleep state and then sleep the ready to sleep nodes, wherein the preset sleep condition may be that no task is running and the duration reaches a preset duration, and sleeping the ready to sleep nodes may be performing a power-off operation on the ready to sleep nodes.

[0114] In other words, the management node sets any one of the target number of sleep-ready nodes (which can be called the first sleep-ready node) from the target number of sleep-ready nodes to the sleep-ready state from the awake state to the sleep state if it is determined that no task is running in the first sleep-ready node (for example, the resource idle rate of the first sleep-ready node is 100%) and the duration for which no task is running in the first sleep-ready node reaches a preset duration.

[0115] After putting the first ready-to-sleep node into sleep mode, the management node may update the number of already-sleep nodes and awakened nodes in the computing cluster, wherein updating the number of awakened nodes may include updating the number of normal nodes and the number of ready-to-sleep nodes. The management node may further determine whether it is necessary to continue to put the awakened nodes in the current computing cluster into sleep mode, and if so, continue to put the ready-to-sleep nodes that meet the preset sleep conditions into sleep mode, and / or continue to set the normal nodes in the awakened nodes to the ready-to-sleep state, and put the ready-to-sleep nodes that meet the preset sleep conditions into sleep mode.

[0116] It should be noted that the above steps 502 and 503 are mainly applicable to homogeneous computing clusters, wherein a homogeneous computing cluster is understood as a computing cluster in which the resources and resource amounts contained in each computing node are the same, for example, the CPU resources, GPU resources, and memory resources of each computing node in the computing cluster are the same. In this implementation, the management node determines the target number based on the total amount of resources that need to be dormant, the number of awakened nodes in the computing cluster, and the resource amount of each computing node, and then adjusts the state of the awakened nodes in the computing cluster based on the target number and the number of nodes currently included in the computing cluster that are ready to sleep, until the number of nodes in the computing cluster that are ready to sleep is equal to the target number.

[0117] In addition, the present application provides a dynamic adjustment method suitable for a heterogeneous computing cluster, wherein a heterogeneous computing cluster is understood as a computing cluster in which the resources contained in each computing node are not exactly the same. For example, the computing cluster includes nodes 1 to 4, wherein node 1 includes 5 CPUs, 10 GPUs, and 5G memory, node 2 includes 10 CPUs and 5G memory, node 3 includes 7 CPUs, 8 GPUs, and 5G memory, and node 4 includes 5 CPUs.

[0118] In the dynamic adjustment method of the heterogeneous computing cluster, the management node can dynamically determine the total amount of resources that need to be dormant. For example, the total amount of resources that currently need to be dormant is 20 CPUs, 10 GPUs, and 10G memory. Step 1: The management node determines that node 1 is in a state of preparing for dormancy, and the total amount of resources that currently need to be dormant is updated to 15 CPUs and 5G memory; Step 2: The management node determines that node 2 is in a state of preparing for dormancy, and the total amount of resources that currently need to be dormant is updated to 5 CPUs; Step 3: The management node determines that node 4 is in a state of preparing for dormancy.

[0119] Correspondingly, in step 504, the management node may determine the nodes ready for sleep that meet the preset sleep conditions from the currently dynamically adjusted nodes ready for sleep, and control the nodes ready for sleep that meet the preset sleep conditions to sleep.

[0120] As in the above embodiment, the computing cluster includes multiple computing nodes, which are divided into awakened nodes and dormant nodes. The awakened nodes are further divided into nodes ready to sleep and normal nodes, and the resource scheduling priorities of the three types of computing nodes are from high to low: normal nodes, nodes ready to sleep and dormant nodes.

[0121] Below, a job execution method (or resource scheduling method) is provided to explain how the management node distributes the tasks to be scheduled to the target nodes corresponding to the tasks to be scheduled.

[0122] In the job execution method, the management node can logically divide multiple awakened nodes into two node queues, the two node queues are respectively a first node queue composed of normal nodes and a second node queue composed of nodes ready to sleep. Exemplarily, the management node can mark each awakened node in the computing cluster, such as marking a normal node as 1 and marking a node ready to sleep as 2, that is, the node marked as 1 can be divided into the first node queue, and the node marked as 2 can be divided into the second node queue.

[0123] The specific execution method of this job can be found in Figure 6 A schematic diagram of the process is shown.

[0124] Step 601: The management node receives a job request submitted by a user.

[0125] In step 602, the management node determines at least one task to be scheduled according to the job request, wherein each task to be scheduled corresponds to resource requirements, such as CPU resources, GPU resources, memory resources, etc. The management node performs the resource matching process in step 603 or step 604 and the task distribution process in step 605 for any task to be scheduled.

[0126] Step 603: The management node determines whether to determine a target node from the first node queue according to the resource requirements corresponding to the task to be scheduled. If yes, step 605 is executed; otherwise, step 604 is executed.

[0127] The target node is specifically a node whose idle resources in the current node meet the resource requirements of the task to be scheduled, for example, the resource requirements of the task to be scheduled are 8 CPUs, 9 GPUs, and 4G memory. Node A includes idle resources of 5 CPUs, 10 GPUs, and 5G memory, and the CPU resources in node A cannot meet the resource requirements of the task to be scheduled. Node B includes idle resources of 10 CPUs and 5G memory, and node B does not include idle GPU resources and cannot meet the resource requirements of the task to be scheduled. Node C includes idle resources of 10 CPUs, 10 GPUs, and 5G memory, and the idle GPU resources in node C meet the resource requirements of the task to be scheduled, so node C can be used as the target node.

[0128] The management node may determine the target node based on the target node selection strategy.

[0129] In a specific example, the management node can be determined in sequence based on the node identification of each normal node in the first node queue, such as the node serial number. The management node first determines the normal node with the node serial number 1 in the first node queue, and determines whether the idle resources in the normal node meet the resource requirements corresponding to the task to be scheduled. If so, the normal node is determined as the target node. Otherwise, the normal node with the node serial number 2 in the first node queue is determined, and the idle resources in the normal node meet the resource requirements corresponding to the task to be scheduled. The above operation is repeated until the target node is determined or all normal nodes in the first node queue are determined once, and the target node is still not determined.

[0130] In another specific example, the management node can determine the target node from the first node queue based on a random principle. For example, the management node randomly selects a normal node, and then determines whether the idle resources in the normal node meet the resource requirements corresponding to the task to be scheduled. If so, the normal node is determined as the target node. Otherwise, a normal node after the normal node is determined according to the order of node identifiers, and then it is determined whether the idle resources in the normal node after the normal node meet the resource requirements corresponding to the task to be scheduled. The above operation is repeated until the target node is determined or all normal nodes in the first node queue are judged once and the target node is still not determined.

[0131] Step 604: The management node determines the target node from the second node queue according to the resource requirements corresponding to the task to be scheduled. The specific implementation method can be referred to the description in step 603, which will not be repeated here.

[0132] In the present application, if the management node determines the target node from the second node queue, the node to be put into sleep mode is classified as a normal node in the first node queue. If the management node still fails to determine the target node in the second node queue, the management node needs to determine from the already dormant nodes, take the already dormant node that meets the resource requirements corresponding to the task to be scheduled as the target node, wake up the already dormant node, and classify it as a normal node in the first node queue.

[0133] Step 605: The management node distributes the task to be scheduled to the target node, and the target node executes the task.

[0134] In the above steps 601 to 605, the management node preferentially selects the target node from the first node queue. If the target node is selected from the first node queue, the task to be scheduled will not be distributed to the ready-to-sleep node in the second queue. The ready-to-sleep node in the second queue can enter the idle state after executing the existing tasks in the node. Therefore, after the management node determines that the duration of the ready-to-sleep node in the idle state is greater than the preset duration, it will put the ready-to-sleep node into sleep. This method helps to quickly clear the tasks in the ready-to-sleep node and put the ready-to-sleep node into sleep.

[0135] In the present application, a configuration file may be preset in the management node, the configuration file includes at least one or more of a first idle rate threshold, a second idle rate threshold, and a node selection strategy, and the node selection strategy may include at least one or more of a target node selection strategy, a preparation node selection strategy, a normal node selection strategy, and a dormant node selection strategy. The configuration file may be in YAML (another markup language) format, JSON (javascript object notation) format, or other formats.

[0136] Combination Figure 5 and Figure 6 The process diagram shown is as follows: Figure 7 A flow chart of the fourth cluster energy-saving method provided as an example for the present application, wherein the computing cluster includes M wake-up nodes, the M wake-up nodes include M1 normal nodes and (M-M1) ready-to-sleep nodes, M1 is greater than or equal to 0, (M-M1) is greater than or equal to 0, and M is greater than or equal to 1.

[0137] The cluster energy saving method may specifically include an energy saving process and a scheduling process, and the two processes may be parallel processes, wherein the energy saving process may refer to steps 701 to 705 in the figure, and the scheduling process may refer to steps 706 to 710 in the figure.

[0138] Step 701: The management node reads a configuration file, wherein the configuration file includes configuration items such as a first idle rate threshold, a second idle rate threshold, and a node selection strategy.

[0139] In step 702, the management node determines the resource idle rate of the computing cluster based on the resource usage of each of the M wake-up nodes and the total resource usage. If it is determined that the resource idle rate of the computing cluster is greater than the first idle rate threshold, the target number of nodes that need to enter the sleep state is determined to be M2, and M2 is greater than or equal to 0.

[0140] In a specific implementation, the resource idle rate of the computing cluster is determined based on the following formula: resource idle rate of the computing cluster = (1-actual resource usage / total resource amount) × 100%, where the actual resource usage is the sum of the resource usage of each wake-up node in the M wake-up nodes, and the total resource amount is the sum of the total resource amount of each wake-up node in the M wake-up nodes.

[0141] Step 703: The management node adjusts the status of awakened nodes in the computing cluster according to the target number M2, so that there are M2 nodes ready to sleep in the computing cluster.

[0142] Furthermore, the management node can divide the M wake-up nodes into (M-M2) normal nodes belonging to the first node queue, and M2 ready-to-sleep nodes belonging to the second node queue, where the resource scheduling priority of each normal node in the (M-M2) normal nodes is higher than the resource scheduling priority of each ready-to-sleep node in the M2 ready-to-sleep nodes.

[0143] Step 704: If the management node determines that no task is running in the node to be ready for sleep and the duration of not running the task reaches a preset duration, the management node sets the node to be ready for sleep to a sleep state and puts the node to sleep.

[0144] Step 705: The management node updates the number of dormant nodes and awakened nodes in the computing cluster, wherein updating the number of awakened nodes may include updating the number of normal nodes and the number of nodes ready to sleep.

[0145] Step 706: The management node obtains the task to be scheduled.

[0146] Step 707 , the management node determines whether to select a target node from the first node queue, if so, execute step 710 , otherwise execute step 708 .

[0147] Step 708 , the management node determines whether to select a target node from the second node queue, if so, execute step 710 , otherwise execute step 709 .

[0148] Step 709: The management node selects a target node from the dormant nodes.

[0149] Step 710: The management node distributes the tasks to be scheduled to the target nodes.

[0150] In addition, after step 710, the management node can continue to determine the resource idle rate of the computing cluster, and adjust the state of the awakened node in the computing cluster according to the resource idle rate of the computing cluster. In addition, if the management node determines that the task in the computing node of the computing cluster is completed, it can also continue to determine the resource idle rate of the computing cluster, and adjust the state of the awakened node in the computing cluster according to the resource idle rate of the computing cluster. For details, please refer to the description in the above embodiment, which will not be repeated here.

[0151] like Figure 8 The flowchart of the fifth cluster energy-saving method provided as an example in the present application is as follows. The computing cluster includes a management node and multiple wake-up nodes. By way of example, the multiple wake-up nodes are node 1 to node 6.

[0152] like Figure 8 In the process, the management node determines the indicator information of each awakened node in the resource pool, and determines the indicator information of the computing cluster according to the indicator information of each awakened node. The management node determines the target number, such as 3, according to the indicator information of the computing cluster, the number of awakened nodes in the computing cluster and the first idle rate threshold. The management node then selects 3 nodes from nodes 1 to 6 as nodes to be prepared for sleep. For example, if the nodes to be prepared for sleep are nodes 1 to 3, the remaining nodes 4 to 6 are normal nodes, and the resource scheduling priority of nodes 4 to 6 is higher than the resource scheduling priority of nodes 1 to 3.

[0153] When the management node submits a task to be scheduled, if the target node is determined from nodes 4 to 6, for example, the target node is node 4, the task to be scheduled is distributed to node 4. If the target node is not determined from nodes 4 to 6, the target node is determined from nodes 1 to 3, for example, the target node is determined to be node 3, node 3 is converted from a sleep node to a normal node, and then the task to be scheduled is distributed to node 3.

[0154] Still taking nodes 1 to 3 as nodes to be prepared for sleep, if the management node determines that the duration of node 1 being in the idle state reaches a preset duration, node 1 is set from the awake state to the sleep state, and similarly, nodes 2 and 3 are set from the awake state to the sleep state. When the management node submits a task to be scheduled, if it cannot determine a wake-up node from nodes 4 to 6 for executing the task to be scheduled, then a node is selected from nodes 1 to 3 in the sleep state to be awakened. For example, node 3 is selected for awakening, and the task to be scheduled is distributed to node 3.

[0155] In the above technical solution, multiple computing nodes in the computing cluster are divided into awakening nodes and dormant nodes, and the awakening nodes are further divided into ready-to-sleep nodes and normal nodes, where the resource scheduling priorities of the computing nodes are from high to low: normal nodes, ready-to-sleep nodes and already dormant nodes. When the management node allocates tasks based on the load balancing strategy, it is allocated to normal nodes first, thereby avoiding the situation where there are always unfinished tasks on the ready-to-sleep nodes, which helps to clear the tasks in the ready-to-sleep nodes, set the ready-to-sleep nodes to sleep and put them to sleep. In addition, there is no need to migrate tasks in the awakening nodes, which does not interrupt the operation and does not affect the operation efficiency, so that users do not feel it.

[0156] Based on the above content and the same idea, Fig. 9 The present application provides a possible system architecture diagram of a computing cluster system to which the method provided by the present application is applicable, wherein the system includes a scheduler, a submission node, and a computing node. The scheduler can enable job lifecycle management services, node monitoring services, and node management services.

[0157] Specifically, users can submit jobs to the scheduler through any of the APIs, command lines, and SDKs in the submission node. The node management service in the scheduler divides the jobs submitted by the user into multiple tasks to be scheduled, and assigns each task to be scheduled to the target computing node (target node) that matches the task to be scheduled. The node monitoring service in the scheduler is used to monitor the status of the running tasks in each computing node and report the status of the running tasks in each computing node to the scheduler. In addition, the job lifecycle management service in the scheduler is used to start jobs, terminate jobs, suspend jobs, resume jobs, etc.

[0158] The scheduler can also maintain the node queue in the computing cluster according to the distribution of the task request distributed by the node management service and the status of the running tasks in each computing node reported by the node monitoring service. In addition, the scheduler can pre-read the configuration items such as the first idle rate threshold, the second idle rate threshold, and the node selection strategy in the configuration file. In an optional implementation, the scheduler can dynamically adjust the number of dormant nodes, normal nodes, and nodes ready to sleep in the computing cluster according to the first idle rate threshold, the second idle rate threshold, and the status of the running tasks in each computing node reported by the node monitoring service in the scheduler, and maintain the node queue in the computing cluster. Exemplarily, the node queue includes a first node queue composed of normal nodes and a second node queue composed of nodes ready to sleep. When distributing tasks, the node management service in the scheduler can select the target node from the first node queue, the second node queue, and the dormant node in turn based on the node selection strategy. The specific implementation can be seen in the description in the above embodiment.

[0159] Based on the above content and the same idea, Fig.10 and Fig.11 This is a schematic diagram of the structure of a possible cluster energy-saving device provided in this application. These cluster energy-saving devices can be used to achieve the above Figures 5 to 9 The functions of the management node or scheduler in the relevant embodiments can therefore also achieve the beneficial effects possessed by the above method embodiments.

[0160] In this application, the cluster energy-saving device can be as follows Figure 1 Management node in the Figure 2 Any one or more of the management nodes 1 to k. Alternatively, the cluster energy-saving device may be a module (such as a chip) applied to a management node.

[0161] like Fig.10 As shown, the cluster energy-saving device includes a monitoring unit 1001 and a scheduling unit 1002; the monitoring unit 1001 is used to obtain indicator information for characterizing the resource idle state of the computing cluster, and the indicator information is determined based on the total resources of the computing cluster and the resources occupied by the currently running tasks; the computing cluster includes normal nodes and ready-to-sleep nodes, and the resource scheduling priority of the normal nodes is higher than the resource scheduling priority of the ready-to-sleep nodes; the scheduling unit 1002 is used to determine, according to the indicator information, the target number of ready-to-sleep nodes that need to be included in the computing cluster when the resource idle state of the computing cluster reaches a set indicator; and when the target number is greater than the number of ready-to-sleep nodes currently included in the computing cluster, a first number of normal nodes in the computing cluster is converted into ready-to-sleep nodes, and the first number is the difference between the target number and the number of ready-to-sleep nodes currently included in the computing cluster.

[0162] like Fig.11The cluster energy saving device 1100 provided in an embodiment of the present application is shown. Fig.11 The device shown can be Fig.10 A hardware circuit implementation of the device shown in FIG. The device can be applied to the flowchart shown above to execute the above Figures 5 to 9 The functions of the management node or scheduler in the relevant embodiments. For ease of explanation, Fig.11 Only the main components of the device are shown.

[0163] Fig.11 The device 1100 shown includes at least one processor 1120, which is used to implement the function of the management node or scheduler in the above method embodiment provided in the embodiment of the present application.

[0164] The device 1100 may also include at least one memory 1130 for storing program instructions and / or data. The memory 1130 is coupled to the processor 1120. The coupling in the embodiment of the present application is an indirect coupling or communication connection between devices, units or modules, which may be electrical, mechanical or other forms, and is used for information exchange between devices, units or modules. The processor 1120 may operate in conjunction with the memory 1130. The processor 1120 may execute program instructions stored in the memory 1130. At least one of the at least one memory may be included in the processor.

[0165] Fig.11 The device 1100 shown includes at least one processor 1120 and a communication interface 1110, and the processor 1120 is used to execute instructions or programs stored in the memory 1130. When the instructions or programs stored in the memory 1130 are executed, the processor 1120 is used to execute the above-mentioned embodiments. Figures 5 to 9 The method in the related embodiments.

[0166] In the embodiment of the present application, the communication interface may be a transceiver, a circuit, a bus, a module or other types of communication interfaces. In the embodiment of the present application, when the communication interface is a transceiver, the transceiver may include an independent receiver, an independent transmitter, or a transceiver with integrated transceiver functions or a communication interface.

[0167] The device 1100 may further include a communication line 1140. The communication interface 1110, the processor 1120, and the memory 1130 may be interconnected via the communication line 1140; the communication line 1140 may be a peripheral component interconnect (PCI) bus or an extended industry standard architecture (EISA) bus. The communication line 1140 may be divided into an address bus, a data bus, a control bus, etc. For ease of representation, Fig.11 Only one thick line is used in the diagram, but this does not mean that there is only one bus or only one type of bus.

[0168] Based on the above content and the same concept, the present application provides a computer-readable storage medium, in which a computer program or instruction is stored. When the computer program or instruction is executed by a computing device, the method in the above method embodiment is performed.

[0169] Based on the above content and the same concept, the present application provides a computing device, including a processor, the processor is connected to a memory, the memory is used to store a computer program, and the processor is used to execute the computer program stored in the memory, so that the computing device executes the method in the above method embodiment.

[0170] Based on the above content and the same concept, the present application provides a chip, including at least one processor and an interface; the interface is used to provide program instructions or data to the at least one processor; the at least one processor is used to execute the program line instructions to implement the method in the above method embodiment.

[0171] Based on the above content and the same concept, the present application provides a computer program product, which includes a computer program or instructions. When the computer program or instructions are executed by a computing device, it is used to implement the method in the above method embodiment.

[0172] Based on the above content and the same concept, the present application provides a computing cluster system, including normal nodes, nodes ready to sleep, nodes that have already sleep, and the above Fig.10 or Fig.11 A cluster energy-saving device is provided in the embodiment of the present invention, wherein the cluster energy-saving device is used to control the normal nodes, the nodes ready to sleep and the nodes in sleep.

[0173] In the present application, "at least one" means one or more, and "plurality" means two or more. "At least one of the following" or similar expressions refers to any combination of these items, including any combination of single items or plural items. For example, at least one of a, b or c can be represented by: a, b, c, "a and b", "a and c", "b and c", or "a and b and c", where a, b, c can be single or multiple. "And / or" describes the association relationship of associated objects, indicating that three relationships can exist. For example, A and / or B can be represented by: A exists alone, A and B exist at the same time, and B exists alone, where A and B can be singular or plural. In the text description of the present application, the character " / " generally indicates that the previous and next associated objects are in an "or" relationship; in the formula of the present application, the character " / " indicates that the previous and next associated objects are in a "division" relationship.

[0174] It is understood that the various numbers involved in the embodiments of the present application are only for the convenience of description and are not used to limit the scope of the embodiments of the present application. The size of the sequence number of the above-mentioned processes does not mean the order of execution, and the execution order of each process should be determined by its function and internal logic.

[0175] Obviously, those skilled in the art can make various changes and modifications to the present application without departing from the scope of protection of the present application. Thus, if these modifications and variations of the present application fall within the scope of the claims of the present application and their equivalents, the present application is also intended to include these modifications and variations.

Claims

1. A cluster energy saving method, characterized in that: include: Obtaining indicator information for characterizing a resource idle state of a computing cluster, wherein the indicator information is determined based on the total resources of the computing cluster and the resources occupied by the currently running tasks; the computing cluster includes normal nodes and nodes ready to sleep, and the resource scheduling priority of the normal nodes is higher than the resource scheduling priority of the nodes ready to sleep; Determine, according to the indicator information, a target number of nodes ready to sleep that need to be included in the computing cluster when the idle state of resources of the computing cluster reaches a set indicator; When the target number is greater than the number of nodes currently included in the computing cluster that are ready to sleep, convert a first number of normal nodes in the computing cluster into nodes that are ready to sleep, where the first number is a difference between the target number and the number of nodes currently included in the computing cluster that are ready to sleep; After converting a first number of normal nodes in the computing cluster into nodes ready for sleep, determining nodes ready for sleep that meet a preset sleep condition from the target number of nodes ready for sleep; and controlling the nodes ready for sleep that meet the preset sleep condition to sleep; Among them, determining the ready-to-sleep node that meets the preset sleep condition from the target number of ready-to-sleep nodes includes: if it is determined that no task is running in the first ready-to-sleep node, and the duration of the non-running task reaches a preset duration, then determining that the first ready-to-sleep node meets the preset sleep condition, and the first ready-to-sleep node is any one of the target number of ready-to-sleep nodes.

2. The method according to claim 1, characterized in that Also includes: When the target number is less than the number of nodes currently prepared for sleep in the computing cluster, a second number of nodes prepared for sleep in the computing cluster are converted into normal nodes, where the second number is a difference between the target number and the number of nodes currently prepared for sleep in the computing cluster.

3. The method according to claim 1, characterized in that Before obtaining the indicator information for characterizing the resource idle state of the computing cluster, the method further includes: Distribute the task to be scheduled to a target node in the computing cluster that matches the task to be scheduled; or It is determined that a task on any normal node in the computing cluster has been completed or a task on any node ready to sleep has been completed, and resources occupied by the completed task are released.

4. The method according to any one of claims 1 to 3, characterized in that Also includes: Obtaining a task to be scheduled, wherein the task to be scheduled corresponds to a resource requirement; According to the resource demand, if a target node matching the task to be scheduled is not determined from the normal nodes, the target node is determined from the nodes to be prepared for sleep, and the target node is converted into a normal node; Distribute the tasks to be scheduled to the target nodes converted into normal nodes.

5. The method according to claim 4, characterized in that The computing cluster also includes dormant nodes, and the method further includes: If the target node is not determined from the nodes that are ready to sleep, the target node is determined from the nodes that have already sleep, and the target node is converted into a normal node; Distribute the tasks to be scheduled to the target nodes converted into normal nodes.

6. The method according to claim 1, characterized in that The indicator information is the resource idle rate of the computing cluster; the obtaining of the indicator information used to characterize the resource idle state of the computing cluster includes: Determine the total amount of occupied resources of the computing cluster according to the amount of resources occupied by running tasks in each normal node in the computing cluster and the amount of resources occupied by running tasks in each node ready to sleep; The resource idle rate of the computing cluster is determined according to the total amount of occupied resources of the computing cluster and the total amount of resources of the computing cluster, wherein the total amount of resources of the computing cluster is determined based on the total amount of resources of each normal node in the computing cluster and the total amount of resources of each node ready to sleep.

7. A cluster energy-saving device, characterized in that: include: A monitoring unit, used to obtain indicator information for characterizing the idle state of resources of a computing cluster, wherein the indicator information is determined based on the total resources of the computing cluster and the resources occupied by the currently running tasks; the computing cluster includes normal nodes and nodes ready to sleep, and the resource scheduling priority of the normal nodes is higher than the resource scheduling priority of the nodes ready to sleep; A scheduling unit, configured to determine, based on the indicator information, a target number of nodes ready to sleep that need to be included in the computing cluster when the idle state of resources of the computing cluster reaches a set indicator; and when the target number is greater than the number of nodes currently included in the computing cluster that are ready to sleep, converting a first number of normal nodes in the computing cluster into nodes that are ready to sleep, the first number being a difference between the target number and the number of nodes currently included in the computing cluster that are ready to sleep; The scheduling unit is further configured to: after converting a first number of normal nodes in the computing cluster into nodes ready for sleep, determine nodes ready for sleep that meet a preset sleep condition from the target number of nodes ready for sleep; and control the nodes ready for sleep that meet the preset sleep condition to sleep; When the scheduling unit determines a ready-to-sleep node that meets the preset sleep condition from the target number of ready-to-sleep nodes, it is specifically used to: if it is determined that no task is running in the first ready-to-sleep node, and the duration of the non-running task reaches a preset duration, then it is determined that the first ready-to-sleep node meets the preset sleep condition, and the first ready-to-sleep node is any one of the target number of ready-to-sleep nodes.

8. The device according to claim 7, characterized in that The scheduling unit is also used for: When the target number is less than the number of nodes currently prepared for sleep in the computing cluster, a second number of nodes prepared for sleep in the computing cluster are converted into normal nodes, where the second number is a difference between the target number and the number of nodes currently prepared for sleep in the computing cluster.

9. The device according to claim 7, characterized in that The scheduling unit is also used for: Before the monitoring unit obtains the indicator information for characterizing the resource idle state of the computing cluster, the task to be scheduled is distributed to a target node in the computing cluster that matches the task to be scheduled; or Before the monitoring unit obtains the indicator information for characterizing the resource idle state of the computing cluster, it determines whether a task on any normal node in the computing cluster has been completed or a task on any node ready to sleep has been completed, and releases the resources occupied by the completed task.

10. The device according to any one of claims 7 to 9, characterized in that The scheduling unit is also used for: Obtaining a task to be scheduled, wherein the task to be scheduled corresponds to a resource requirement; According to the resource demand, if a target node matching the task to be scheduled is not determined from the normal nodes, the target node is determined from the nodes ready to sleep, and the target node is converted into a normal node; Distribute the tasks to be scheduled to the target nodes converted into normal nodes.

11. The device according to claim 10, characterized in that The computing cluster also includes dormant nodes; The scheduling unit is further configured to determine the target node from the nodes that have already gone to sleep, and convert the target node into a normal node if the target node has not been determined from the nodes that are ready to go to sleep; And distribute the tasks to be scheduled to the target nodes converted into normal nodes.

12. The device according to claim 7, characterized in that The indicator information is the resource idle rate of the computing cluster; the monitoring unit is specifically used for: Determine the total amount of occupied resources of the computing cluster according to the amount of resources occupied by running tasks in each normal node in the computing cluster and the amount of resources occupied by running tasks in each node ready to sleep; The resource idle rate of the computing cluster is determined according to the total amount of occupied resources of the computing cluster and the total amount of resources of the computing cluster, wherein the total amount of resources of the computing cluster is determined based on the total amount of resources of each normal node in the computing cluster and the total amount of resources of each node ready to sleep.

13. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores a computer program or instructions, and when the computer program or instructions are executed by a computing device, the method according to any one of claims 1 to 6 is implemented.

14. A computing device, characterized in that The computer comprises a processor connected to a memory, wherein the processor is configured to execute a computer program stored in the memory so that the computing device executes the method according to any one of claims 1 to 6.

15. A chip, characterized in that: comprising at least one processor and an interface; The interface is used to provide program instructions or data to the at least one processor; The at least one processor is configured to execute the program line instructions to implement the method according to any one of claims 1 to 6.

16. A computing cluster system, characterized in that: It comprises normal nodes, nodes ready for sleep, nodes already in sleep and a cluster energy-saving device as claimed in any one of claims 7 to 12, wherein the cluster energy-saving device is used to control the normal nodes, the nodes ready for sleep and the nodes already in sleep.

Citation Information

Patent Citations

  • Job scheduling method based on cluster node load state prediction

    CN110096349A

  • Cluster node load state prediction-based job scheduling method

    WO2020206705A1