Task allocation method, device and system

By monitoring and allocating tasks in the computing cluster, and allocating tasks according to the resource utilization of the computing nodes, the problem of low resource utilization caused by users' excessive application for resources is solved, the resource utilization is improved and the timeliness of tasks is ensured.

CN118550684APending Publication Date: 2024-08-27HUAWEI TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202310216546.X
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2023-02-27
Publication Date
2024-08-27

AI Technical Summary

Technical Problem

In computing clusters, when users apply for processing resources for tasks, the peak demand is usually exceeded, resulting in low resource utilization of computing nodes and a waste of resources.

Method used

Obtain the resource usage data of each computing node when executing tasks through the management node, calculate the resource utilization of each computing node, and allocate new tasks based on these data, giving priority to assigning low-priority tasks to nodes with low resource utilization. , to improve resource utilization.

Benefits of technology

It improves the resource utilization of computing nodes, ensures that high-priority tasks can be executed normally, and avoids waste of resources.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118550684A
    Figure CN118550684A
Patent Text Reader

Abstract

The embodiment of the invention discloses a task allocation method, device and system, and belongs to the technical field of distributed computing. The method comprises the following steps: acquiring use data of a first computing node resource used by a first computing node in a plurality of computing nodes when executing at least one first task, wherein the first computing node is any one computing node in the plurality of computing nodes; generating a first resource utilization rate of the first computing node according to the use data of the at least one first task; and according to the first resource utilization rates of the plurality of computing nodes, allocating a second computing node for executing the second task from the plurality of computing nodes for the second task. By adopting the method, the resource utilization rate when the computing node executes the task can be improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of distributed computing technology, and in particular to a method, device and system for allocating tasks. Background Art

[0002] The computing cluster includes a management node and multiple computing nodes, wherein the management node is responsible for allocating each task in the job to each computing node.

[0003] When users submit jobs to the management node, they can apply for processing resources for each task in the job, such as the number of processor cores to execute the task. After receiving the job submitted by the user, the job scheduler can allocate each task in the job according to the processing resources requested by the user.

[0004] Since the demand for processing resources usually changes during the execution of tasks, in order to ensure the normal execution of tasks, users will apply for processing resources according to the peak demand of the task or beyond the peak demand of the task. This results in more processing resources being allocated to the computing nodes, but the actual utilization rate is relatively low, resulting in a serious waste of processing resources. Summary of the invention

[0005] The embodiments of the present application provide a method, device and system for allocating tasks, which can improve the resource utilization rate when computing nodes execute tasks. The corresponding technical solutions are as follows:

[0006] In a first aspect, a method for allocating tasks is provided, which is executed by a management node in a computing cluster, and the management node is connected to multiple computing nodes in the computing cluster. The method for allocating tasks includes: obtaining usage data of a first computing node resource used by a first computing node among the multiple computing nodes when executing at least one first task, and the first computing node is any one of the multiple computing nodes. A first resource utilization rate of the first computing node is generated according to the usage data of the at least one first task. According to the first resource utilization rates of the multiple computing nodes, a second computing node for executing the second task is allocated from the multiple computing nodes for a second task.

[0007] Among them, the first task represents any task, and the first computing node represents any computing node in the computing cluster. According to the different needs of different users, the same task can be executed on the computing nodes at different times. The above usage data can be obtained by sampling the management node from the corresponding computing node according to the period during the historical execution of the first task on any computing node. The first resource utilization of the first computing node refers to the current resource utilization of the first computing node determined by the usage data in the historical execution process corresponding to the task currently being executed by the first computing node. The second task refers to the task to be assigned.

[0008] In the scheme shown in the present application, the first resource utilization rate corresponding to each computing node in the computing cluster can be determined based on the usage data corresponding to the first task being executed on the computing node during the historical execution process. Since the first resource utilization rate is determined based on the usage data corresponding to the first task during the historical execution process, the first resource utilization rate can more truly reflect the actual resource utilization rate of the computing node. It can be seen that in the present application, the current resource utilization rate of each computing node in the computing cluster is determined based on the historical usage data of the first task being executed. Compared with the prior art of determining the resource utilization rate of the computing node based on the processing resources applied by the user for the task, the resource utilization rate of the computing node can be obtained more accurately. Therefore, the present application solves the problem that users apply for excessive processing resources for tasks, resulting in low actual resource utilization of computing nodes.

[0009] In an achievable manner, the second task includes a first-category task and a second-category task, and the priority of the first-category task is higher than the priority of the second-category task. The above-mentioned allocating a second computing node for executing the second task from a plurality of computing nodes according to the first resource utilization of the plurality of computing nodes comprises: allocating a second computing node to the first-category task. Among the second computing nodes whose first resource utilization is less than a threshold, allocating a second computing node to the second-category task.

[0010] In the scheme shown in the present application, the tasks to be assigned can be divided into the first category of tasks with high priority and the second category of tasks with low priority. For the first category of tasks, the first category of tasks can be assigned according to the existing task assignment method, and for the second category of tasks, a computing node can be assigned to the second category of tasks in the second computing node whose first resource utilization is less than the threshold. In this way, by assigning the second category of tasks with low priority to the second computing node whose first resource utilization is smaller, the resource utilization of the second computing node can be improved.

[0011] In an achievable manner, the first task also includes a first-category task and a second-category task. The above-mentioned allocating a second computing node to the first-category task includes: generating a second resource utilization rate of the first computing node according to usage data of the first-category task in at least one first task; and allocating a second computing node from the plurality of computing nodes to the first-category task in the second task according to the second resource utilization rates of the plurality of computing nodes.

[0012] In the scheme shown in the present application, for the first category of tasks, the first category of tasks can be allocated only according to the second resource utilization of multiple computing nodes. Since the second resource utilization is determined only according to the usage data of the first category of tasks on the computing nodes, when the management node allocates the first category of tasks, it will not be affected by the second category of tasks being executed on the computing nodes. In other words, when the management node allocates the first category of tasks, it will assume that none of the computing nodes has executed the second category of tasks. In this way, while improving the utilization of computing node resources, it can ensure that the first category of tasks with high priority are normally allocated and executed first.

[0013] In one achievable manner, the usage data of the first task includes: resource utilization rate of a processor core of the first computing node during execution of the first task.

[0014] In the scheme shown in the present application, the usage data of the first computing node resources used by the first computing node when executing at least one first task can be the resource utilization rate of the processing core executing the first task in the first computing node, that is, the CPU utilization rate of the processor core. The actual CPU utilization rate of the processor core during the execution of the first task can be further determined based on the usage data. In this way, when allocating the second task, the current resource utilization rate of the first computing node can be determined based on the actual CPU utilization rate corresponding to the first task executed on each computing node.

[0015] In one achievable manner, the usage data of the first task also includes: an occupancy rate of shared resources of the first computing node during execution of the first task, wherein the shared resources include at least one of network bandwidth resources, storage bandwidth resources, and memory resources.

[0016] In the solution shown in the present application, the usage data of the first task may also include the occupancy rate of the first task on the shared resources of the first computing node. In this way, when allocating the second task, the second task may be allocated in combination with the CPU utilization rate of multiple computing nodes and the occupancy rate of the shared resources.

[0017] In one feasible manner, for a third computing node that simultaneously executes first-category tasks and second-category tasks, if it is determined that the usage rate of any shared resource of the third computing node reaches a safety threshold, then among at least one second-category task executed by the third computing node, a target task that needs to be stopped is determined, and a stop execution notification of the corresponding target task is sent to the third computing node.

[0018] In the scheme shown in the present application, if the management node determines that the usage rate of any shared resource of the third computing node that simultaneously executes the first and second types of tasks reaches the safety threshold, it means that the first and second types of tasks have a problem of preemption of shared resources. Therefore, in order to ensure the priority execution of the first type of tasks, the target task that needs to be stopped can be determined in at least one of the second type of tasks executed by the third computing node. In this way, the resource utilization rate of the computing node can be improved while ensuring that the first type of tasks with high timeliness requirements are executed first on the computing node.

[0019] In a second aspect, a device for allocating tasks is provided, the device being applied to a management node, the management node being connected to a plurality of computing nodes, the device comprising:

[0020] An acquisition module, used to acquire usage data of a first computing node resource used by a first computing node among the multiple computing nodes when executing at least one first task, the first computing node being any one computing node among the multiple computing nodes;

[0021] A generating module, configured to generate a first resource utilization rate of a first computing node according to usage data of at least one first task;

[0022] The allocation module is used to allocate a second computing node for executing the second task from the plurality of computing nodes according to the first resource utilization rate of the plurality of computing nodes.

[0023] In one implementable manner, the second task includes first-category tasks and second-category tasks, the priority of the first-category tasks is higher than the priority of the second-category tasks, and the above-mentioned allocation module is used to allocate a second computing node to the first-category tasks; and allocate a second computing node to the second-category tasks in the second computing node whose first resource utilization is less than a threshold.

[0024] In one implementable manner, the first task includes a first-category task and a second-category task, and the above-mentioned allocation module is used to generate a second resource utilization rate of the first computing node based on usage data of the first-category task in at least one first task; and allocate a second computing node from multiple computing nodes for the first-category task in the second task based on the second resource utilization rates of multiple computing nodes.

[0025] In one achievable manner, the usage data of the first task includes: resource utilization rate of a processor core of the first computing node during execution of the first task.

[0026] In one achievable manner, the usage data of the first task includes: an occupancy rate of shared resources of the first computing node during execution of the first task, where the shared resources include at least one of network bandwidth resources, storage bandwidth resources, and memory resources.

[0027] In one achievable manner, the device for allocating tasks also includes a determination module, which is used to, for a third computing node that simultaneously executes first-category tasks and second-category tasks, determine, if it is determined that the usage rate of any shared resource of the third computing node reaches a safety threshold, a target task that needs to be stopped from executing in at least one second-category task executed by the third computing node, and send a notification of stopping the execution of the corresponding target task to the third computing node.

[0028] In a third aspect, a system for allocating tasks is provided, the system comprising a management node and a plurality of computing nodes connected to the management node, wherein:

[0029] The management node is used to obtain usage data of a first computing node resource used by a first computing node among the multiple computing nodes when executing at least one first task, the first computing node being any one of the multiple computing nodes; generating a resource utilization rate of the first computing node according to the usage data of the at least one first task; and allocating a second computing node that executes a second task from the multiple computing nodes for a second task according to the resource utilization rates of the multiple computing nodes;

[0030] The computing node is used to execute the second task assigned by the management node.

[0031] In a fourth aspect, a management node is provided, which includes a memory and a processor, the memory is used to store computer instructions, and the processor is used to execute the computer instructions stored in the memory, so that the management node executes the method described in the first aspect and any implementable method of the first aspect.

[0032] In a fifth aspect, a computer-readable storage medium is provided, wherein the computer-readable storage medium stores a computer program code. When the computer program code is executed by a computer device, the computer device executes the method described in the first aspect and any implementable method of the first aspect.

[0033] In a sixth aspect, a computer program product comprising instructions is provided. When the instructions are executed by a computer device, the computer device executes the method described in the first aspect and any implementable manner of the first aspect. BRIEF DESCRIPTION OF THE DRAWINGS

[0034] Figure 1 It is a schematic diagram of the structure of a computing cluster provided in an embodiment of the present application;

[0035] Figure 2 This application is a schematic diagram of a traditional method of assigning tasks;

[0036] Figure 3 is a flow chart of a method for assigning tasks provided in an embodiment of the present application;

[0037] Figure 4 is a flow chart of a method for assigning tasks provided in an embodiment of the present application;

[0038] Figure 5 is a schematic diagram of a method for allocating tasks provided in an embodiment of the present application;

[0039] Figure 6 It is a schematic diagram of a method for scheduling opportunistic jobs provided by an embodiment of the present application;

[0040] Figure 7 is a flow chart of a method for assigning tasks provided in an embodiment of the present application;

[0041] Figure 8 is a schematic diagram of a method for allocating tasks provided in an embodiment of the present application;

[0042] Fig. 9 is a schematic diagram of a degradation-aware scheduling method provided by an embodiment of the present application;

[0043] Fig.10 It is a schematic diagram of the structure of a device for allocating tasks provided in an embodiment of the present application. DETAILED DESCRIPTION

[0044] In order to make the objectives, technical solutions and advantages of the present application clearer, the implementation methods of the present application will be further described in detail below with reference to the accompanying drawings.

[0045] Figure 1 is a schematic diagram of a computing cluster structure provided in an embodiment of the present application, such as Figure 1 As shown, the computing cluster includes a management node 100 and multiple computing nodes 200 . A job scheduling system may be run in the management node 100 , which is responsible for allocating jobs submitted by users to each computing node 200 .

[0046] The management node 100 may include a bus 102, a processor 104, a memory 106, and a communication interface 108. The processor 104, the memory 106, and the communication interface 108 communicate with each other through the bus 102. The processor 104 may include a central processing unit (CPU), and the memory 106 may include a volatile memory, such as a random access memory, or may also include a non-volatile memory, such as a read-only memory, a solid-state hard disk, etc. It should be understood that the present application does not limit the number of processors and memories in the management node 100. The communication interface 108 uses, but is not limited to, a transceiver module such as a network interface card and a transceiver to realize the communication between the management node 100 and other devices such as the computing node 200.

[0047] Among them, computer instructions are stored in the memory 106, and the processor 104 executes the computer instructions to implement the method of allocating tasks provided in an embodiment of the present application, such as obtaining usage data of the first computing node resources used by a first computing node among multiple computing nodes when executing at least one first task, where the first computing node is any one of the multiple computing nodes; generating a first resource utilization rate of the first computing node based on the usage data of at least one first task; and allocating a second computing node that executes the second task from the multiple computing nodes for the second task based on the first resource utilization rates of the multiple computing nodes.

[0048] The computing node 200 may include a bus 202, a processor 204, a memory 206, and a communication interface 208. The processor 204, the memory 206, and the communication interface 208 communicate with each other through the bus 202. The processor 204 may be a central processing unit (CPU), and the processor 204 may be a multi-core processor, for example, the processor 204 may include 8 processor cores, 16 processor cores, etc. The memory 206 may include a volatile memory, such as a random access memory, or may also include a non-volatile memory, such as a read-only memory, a solid-state hard disk, etc. It should be understood that the present application does not limit the number of processors and memories in the computing node 200. The communication interface 208 uses, but is not limited to, a transceiver module such as a network interface card and a transceiver to realize the communication between the computing node 200 and other devices such as the management node 100.

[0049] Computer instructions are stored in the memory 206, and the processor 204 executes the computer instructions to implement the method of allocating tasks provided in the embodiment of the present application, such as executing the first type of tasks based on the first time slice quota, executing the second type of tasks based on the second time slice quota and the non-core-bound execution mode, etc.

[0050] The computing cluster may be a high performance computing (HPC) cluster, and the corresponding jobs and tasks may be HPC jobs and HPC tasks.

[0051] To facilitate the method of assigning tasks provided in the embodiment of the present application, the following briefly introduces the traditional process of assigning tasks:

[0052] The user can apply for the required processing resources, such as the number of processor cores, for each task in the job to be submitted on the user side, and then submit the job and the execution conditions corresponding to the job to the management node in the computing cluster through the user side. The execution conditions of the job can include the processing resources applied for by the user for each task, as well as the execution mode of each task in the job, such as parallel execution, serial execution, etc.

[0053] After receiving the job submitted by the user, the management node can send each task in the job and the number of processor cores required to execute the task to the assigned computing node based on the unoccupied processor cores of each computing node in the computing cluster and the number of processor cores requested by the user for each task in the job.

[0054] After receiving the task, the computing node can allocate a corresponding number of processor cores to the task, and then execute the task according to the corresponding number of processor cores.

[0055] Each task in a job can be assigned to different computing nodes, and a task can only be assigned to one computing node. Figure 2 As shown in the figure, the number of processor cores requested by the user for task a is 4, so the management node can only assign the task to a computing node with at least 4 cores remaining that are not assigned to other tasks. For example, computing node A included in the computing cluster has 8 processor cores, of which 4 processor cores have been assigned to task b. If task a is assigned to computing node A, computing node A can assign task a to the remaining 4 processor cores for execution.

[0056] Since the demand for processing resources usually changes during the execution of a task, users usually apply for excessive processing resources for the task, which results in low processor utilization of the processor cores in the computing node when executing the task, thus causing serious waste of processing resources in the computing node.

[0057] Figure 3 This is a flowchart of a method for allocating tasks to a management node provided in an embodiment of the present application, which is executed by the management node, see Figure 3 , the method comprising:

[0058] Step 301: A management node obtains usage data of resources of a first computing node used by a first computing node among multiple computing nodes when executing at least one first task.

[0059] During the execution of the first task in the job on the computing node, the management node may periodically collect usage data of the task during the execution of the task on the first computing node. The usage data may include the CPU usage rate of the processor core executing the first task on the first computing node, and may also include the occupancy rate of the shared resources of the first computing node during the execution of the first task. The shared resources include at least one of network bandwidth resources, storage bandwidth resources, and memory resources.

[0060] Step 302: Generate a first resource utilization rate of a first computing node according to usage data of at least one first task.

[0061] When the first task is completed, the management node can obtain the usage data collected periodically during the execution of the first task on the first computing node, and then calculate the actual resource utilization of the first computing node during the execution of the first task based on the obtained usage data.

[0062] When allocating the second task, the management node may generate the first resource utilization of the first computing node according to the resource utilization corresponding to the first task being executed on the first computing node in the computing cluster. For example, the resource utilization corresponding to the first task being executed on the first computing node is accumulated to obtain the first resource utilization of the first computing node.

[0063] In steps 301 and 302, the first computing node may represent any node in the computing cluster, the first task in step 301 may represent any task executed in the computing cluster, and the first task in step 302 may represent the task currently being executed on the first computing node. The usage data of the first task in step 302 refers to the usage data of the first task in the historical execution process, that is, the usage data of the first task executed on any computing node before the current first computing node executes the first task.

[0064] Step 303: Allocate a second computing node for executing the second task from among the plurality of computing nodes according to the first resource utilization rates of the plurality of computing nodes.

[0065] After determining the first resource utilization of each computing node in the computing cluster, the management node can allocate a second task according to the first resource utilization of each computing node. The second task is a task in each job to be allocated.

[0066] Since in step 302, the current resource utilization of each computing node in the computing cluster is determined based on the historical usage data of the first task being executed, compared with the prior art in which the resource utilization of the computing node is directly determined based on the processing resources applied for the task by the user, the resource utilization of the computing node can be obtained more accurately. It can be seen that the embodiment of the present application solves the problem that the user applies for excessive processing resources for the task, resulting in a low actual resource utilization of the computing node.

[0067] The method for allocating tasks provided in the embodiment of the present application can improve the utilization rate of processing resources in the computing node on the basis of satisfying the processing resources applied for by the user for the task. The method for allocating tasks provided in the embodiment of the present application is described in detail below:

[0068] In the present application, the jobs submitted by users can be divided into two categories, namely, first-category jobs and second-category jobs. Among them, the first-category jobs can also be called regular jobs, which are high-system priority jobs and have high requirements for the timeliness of job execution. The second-category jobs can also be called opportunity jobs, which are low-system priority jobs and have low requirements for the timeliness of job execution. The timeliness requirement corresponding to any regular job is higher than that of the opportunity job. In other words, regular jobs are jobs that need to be executed first among the jobs submitted by users. The tasks included in the corresponding first-category jobs can be called first-category tasks, and the tasks included in the second-category jobs can be called second-category tasks. The priority of the first-category tasks is higher than that of the second-category tasks.

[0069] In a feasible manner, the classification of the first type of jobs and the second type of jobs can be implemented on the user side. For example, the user can select the type of job for the job to be submitted in the user side interface. If the user sets the job as a regular job, the job is a first type of job, and if the user sets the job as an opportunity job, the job is a second type of job. After the user completes the classification of the job on the user side, the user can send a job execution request to the management node through the user side, and the job execution request can carry the category of the corresponding job.

[0070] Two types of job queues can be set in the management node. One type of job queue can be called a regular job queue, which is used to receive regular jobs submitted by users, and the other type of job queue can be called an opportunity job queue, which is used to receive opportunity jobs submitted by users. After receiving a job execution request for a job to be assigned sent by a user end, the management node can add the job to be assigned to the corresponding queue according to the type of the job to be assigned carried in the job execution request. The management node can sequentially assign tasks in each job in the regular job queue and the opportunity job queue in a round-robin manner.

[0071] In the above step 303, when allocating computing nodes for second tasks according to the first resource utilization of multiple computing nodes, the computing nodes for the first type of tasks can be allocated in an existing manner, and then the second computing nodes for the second type of tasks can be allocated in a second computing node where the first resource utilization is less than a threshold value (hereinafter referred to as the utilization threshold value). In this way, for the first type of tasks with high priority, computing nodes can be allocated to the first type of tasks in an existing allocation method, thereby ensuring that the first type of tasks can be allocated sufficient resources for execution. For the second type of tasks with low priority, computing nodes can be allocated to the second type of tasks in a computing node where the first resource utilization is less than the threshold value. In this way, the resource utilization of the computing nodes can be improved.

[0072] Combine the following Figure 4 A method for managing node assignment tasks provided in an embodiment of the present application is described in detail, see Figure 4 , the method comprising:

[0073] Step 401: The management node obtains first-category jobs in the jobs to be assigned, and for each first-category job, assigns a computing node to each first-category task in the first-category job in the computing cluster.

[0074] In implementation, the management node can sequentially obtain regular jobs from the regular job queue. For each regular job obtained, the management node can determine the computing node that meets the processing resources requested by the user in each computing node in the computing cluster based on the processing resources requested by the user for each first-class task in the regular job, such as the number of processor cores. Then each first task is assigned to the corresponding computing node. Among them, for each first-class task, after the management node determines the assigned computing node, it can send an execution notification of the first-class task to the assigned computing node, so that the assigned computing node executes the first-class task after receiving the execution notification of the first-class task.

[0075] Step 402: Obtain second-category jobs in the jobs to be assigned, and for each second-category job, assign a computing node to each second-category task in the second-category job in at least one computing node whose corresponding first resource utilization is less than a utilization threshold.

[0076] In implementation, after completing the allocation of each regular job in the regular job queue in the above step 401, the management node may execute step 402.

[0077] The management node can sequentially obtain opportunity jobs from the opportunity job queue. Before allocating a computing node to each second-class task in the opportunity job, the management node can first determine the range of computing nodes to which the second-class tasks are allocated. The computing nodes included in the range are all computing nodes whose corresponding first resource utilization is less than the utilization threshold. Among them, the first resource utilization corresponding to the computing node is used to indicate the utilization of all processing resources on the computing node by all tasks being executed on the computing node. The first resource utilization can be calculated based on the historical usage data corresponding to at least one first task being executed by the computing node. For example, the historical usage data includes the average utilization of the processing resources of the computing node during the execution of the task. For the first resource utilization, the average utilization in the historical usage data corresponding to each task executed on the computing node can be summed to obtain the first resource utilization.

[0078] After determining at least one computing node whose corresponding first resource utilization is less than the utilization threshold, the management node can allocate the second type of task corresponding to the second type of job in the at least one computing node. Wherein, for each second type of task, after the management node determines the allocated computing node, it can send an execution notification of the second type of task to the allocated computing node, so that the allocated computing node executes the second type of task after receiving the execution notification of the second type of task. In this way, in an embodiment of the present application, for computing nodes with low first resource utilization, the resource utilization of the computing nodes can be improved by allocating the second type of task to the computing nodes with low first resource utilization.

[0079] It should be noted that in this application, when assigning tasks, the overall resource utilization of the computing node is referenced. That is to say, even if multiple processor cores on the computing node are executing tasks, if the CPU utilization of one or more processor cores among the multiple processor cores is low, resulting in a low overall resource utilization of the computing node, then the computing node can be assigned a second type of task with lower timeliness. In this way, each processor core in the computing node can reuse the remaining resources to execute the second type of task with lower timeliness on the basis of executing the original task, which can not only improve the resource utilization of the computing node, but also will not affect the normal execution of the corresponding first type of job or the second type of job.

[0080] In the embodiment of the present application, when allocating tasks, the management node may perform the above steps 401 and 402 in a polling manner, that is, after executing step 401, step 402 may be executed, and after executing step 402, step 401 may be executed again. In this way, the management node repeatedly executes steps 401 and 402 to achieve the allocation of jobs, and when allocating the second type of jobs with poor timeliness, the second type of jobs may be allocated to the computing node with a lower utilization rate of the first resource, so that the second type of jobs can be executed according to the remaining processing resources of the computing node, which can improve the resource utilization rate of the computing node.

[0081] Figure 5 This is a flow chart of a method for allocating tasks between a management node and a computing node provided in an embodiment of the present application. Figure 5 , users can submit jobs to the management node through the submission node (such as the user end). After receiving the jobs submitted by the users, the management node can assign the jobs to the computing nodes. The management node includes the configuration management unit, the job management unit, the resource management unit, the scheduling management unit, and the data analysis unit. The computing node includes the job / resource management unit and the job / resource monitoring unit.

[0082] The job management unit in the management node may be provided with a regular job queue and an opportunistic job queue for receiving different types of jobs submitted by users. The scheduling management unit may allocate the jobs in the regular job queue and the opportunistic job queue in a round-robin manner.

[0083] After receiving the task assigned by the scheduling management unit, the computing node can execute the task according to the task execution strategy in the job / resource management unit. The job / resource monitoring unit in the computing node can collect the usage data corresponding to the task according to the periodicity when the computing unit executes the task. The computing node can send the collected usage data to the resource management unit of the management node according to the periodicity.

[0084] The resource management unit of the management node can receive the usage data sent periodically by the computing node that is executing the task. For each job, after each job is executed, the management node can determine the actual resource utilization of the processor core during the actual execution of each task based on the usage data of each task in the job during the execution process.

[0085] In implementation, the data analysis unit in the management node can generate a job profile through the usage data corresponding to each task in the job sent by the computing node, and the job profile includes the actual resource utilization rate of the processor core during the actual execution of each task in the job. The usage data includes the resource utilization rate corresponding to the execution of the task by the processor core in the computing node, that is, the CPU utilization rate of the processor core.

[0086] When the usage data includes resource utilization corresponding to processing and executing tasks, the actual resource utilization of each task in the job profile is calculated as follows: determine the average resource utilization corresponding to the task in multiple cycles, the proportion of the number of processor cores executing the task in the total number of cores of the corresponding computing node, and multiply the average resource utilization by the proportion to determine the actual resource utilization corresponding to the task.

[0087] Among them, the average resource utilization corresponding to the above-mentioned multiple cycles can be obtained by averaging the CPU utilization corresponding to each processor core in each cycle during the task execution process, and obtaining the average resource utilization corresponding to the task in multiple cycles. For example, a task is executed by 4 processor cores, and the usage data corresponding to the task is counted 1000 times in total during the execution of the task, then 1000 CPU utilizations of each processor core can be obtained, and 4000 CPU utilizations of 4 processor cores in total. For the task, the average corresponding to the 4000 CPU utilizations can be determined to obtain the average resource utilization corresponding to the task. For another example, if the average resource utilization corresponding to the task is 50%, and the computing node executing the task has 16 processor cores, then the actual resource utilization of the task in the computing node is 12.5% ​​(12.5% ​​= 50% * (4 / 16)).

[0088] A resource portrait view for allocating the second type of jobs can be maintained in the management node. The resource portrait view can be called an opportunity resource portrait view, which includes the first resource utilization corresponding to each computing node, or the remaining utilized resources updated according to the first resource utilization.

[0089] Among them, for the first resource utilization of each computing node in the computing cluster, the actual resource utilization corresponding to at least one task being executed by the computing node can be obtained, and then the at least one actual resource utilization obtained can be accumulated to obtain the first resource utilization of the computing node. In an achievable manner, the first resource utilization corresponding to each computing node can be determined according to the job profile corresponding to the task currently executed on the computing node. For example, there are tasks a, b and c executed on the computing node, where task a belongs to job A, task b belongs to job B, and task c belongs to job C. The management node can obtain the actual resource utilization corresponding to task a included in job A, the actual resource utilization corresponding to task b included in job B, and the actual resource utilization corresponding to task c included in job C from the job profiles corresponding to jobs A, B, and C, respectively, and then the actual resource utilization corresponding to task a, task b, and task c can be summed to obtain the first resource utilization of the computing node.

[0090] Figure 6 is a flow chart of a method for allocating opportunity jobs based on an opportunity resource portrait view provided by an embodiment of the present application. The method can be executed by a management node, for example, by a scheduling management unit in the management node. Figure 6 , the method comprising:

[0091] Step 601: Determine whether the opportunity job queue is empty.

[0092] If the opportunity job queue is empty, it means that there is no opportunity job to be assigned, and the opportunity job assignment process can be ended. If the opportunity job queue is not empty, it means that there is an opportunity job to be assigned, and the opportunity job included in the opportunity job queue is obtained, and then step 602 is executed.

[0093] Step 602: Prioritize opportunity jobs.

[0094] In one achievable manner, in addition to classifying jobs into regular jobs and opportunity jobs, users can further sort the priority of opportunity jobs. For example, opportunity jobs can be further divided into n levels from 1 to n. The higher the level, the higher the corresponding priority. In implementation, after obtaining the opportunity jobs included in the opportunity job, each opportunity job can be sorted according to the level corresponding to each obtained opportunity job.

[0095] Step 603: Select the first priority opportunity job for scheduling.

[0096] Among the sorted opportunity jobs, the first priority opportunity job is selected for scheduling, that is, a processing node is assigned to each second-class task in the opportunity job, and the opportunity job may be referred to as the first priority opportunity job later.

[0097] Step 604: Filter computing nodes that cannot meet the execution requirements.

[0098] According to the first resource utilization of each computing node in the computing cluster included in the opportunity resource portrait view, the computing nodes whose first resource utilization is less than the utilization threshold are determined in the computing cluster, and then among the computing nodes whose first resource utilization is less than the utilization threshold, the computing nodes that do not meet the execution conditions corresponding to the first priority opportunity job are filtered out, and then the remaining computing nodes are added to the available node set.

[0099] Step 605: Determine whether the available node set is empty.

[0100] If the available node set is empty, it means that there is no computing node in the current computing cluster that can execute the first priority opportunity job, and the current first priority opportunity job can be skipped in the sorted opportunity jobs, and then the process goes to step 603. If the available node set is not empty, step 606 is executed.

[0101] Step 606: Sort the available nodes in the available node set by node priority.

[0102] Each available node in the available node set is a computing node that can execute the first priority opportunity job. In step 606, the available nodes in the available node set can be sorted by node priority to obtain the computing node that processes the first priority opportunity job. For example, the remaining available resources of each available node can be determined in the opportunity resource portrait view, and then the node priority of each available node can be sorted according to the available resources to obtain the first priority computing node.

[0103] Step 607: Send the first priority opportunity job to the first priority computing node.

[0104] After obtaining the first priority computing node, each second-class task in the first priority opportunity job can be assigned to the first priority computing node, and the first priority opportunity job can be deleted from the opportunity job queue to complete the assignment of the first priority opportunity job. After completing the assignment of the first priority opportunity job, the above step 601 can be turned again to assign the remaining opportunity jobs in the opportunity job queue until the opportunity job queue is cleared. In addition, after each assignment of an opportunity job, the opportunity resource portrait view is updated according to the job portrait corresponding to the opportunity job.

[0105] In an embodiment of the present application, the management node can also maintain a resource portrait view for allocating the first type of job according to the job portrait corresponding to the job, and the resource portrait view can be called a conventional resource portrait view. The conventional resource portrait view includes the second resource utilization corresponding to each computing node, or the remaining utilized resources updated according to the second resource utilization.

[0106] Among them, for the second resource utilization of each computing node in the computing cluster, the actual resource utilization corresponding to at least one first-class task being executed by the computing node can be obtained, and then the at least one actual resource utilization obtained can be accumulated to obtain the second resource utilization of the computing node. In an achievable manner, the second resource utilization corresponding to each computing node can be determined according to the job profile corresponding to the first-class task currently executed on the computing node. For example, there are tasks a, b and c executed on the computing node, wherein task a belongs to job A, task b belongs to job B, and task c belongs to job C. If tasks A and B belong to the first-class job, and task C belongs to the second-class job, the management node can obtain the actual resource utilization corresponding to task a included in job A and the actual resource utilization corresponding to task b included in job B, and then the actual resource utilization corresponding to task a and task b can be summed to obtain the second resource utilization of the computing node. In this way, in the above step 401, the first-class job can be allocated according to the conventional resource profile view.

[0107] The method for allocating the first type of job based on the conventional resource portrait view is similar to the method for allocating opportunity jobs based on the opportunity resource portrait view, and will not be described in detail here. After each conventional job is allocated, the opportunity resource portrait view and the conventional resource portrait view can be updated according to the job portrait corresponding to the conventional job.

[0108] In addition, the above-mentioned usage data may also include usage data of shared resources. For example, shared resources include at least one of network bandwidth resources, storage bandwidth resources, and memory resources. The usage data of shared resources may be the usage rates of the corresponding network bandwidth resources, storage bandwidth resources, and memory resources when the task is executed on the computing node. Correspondingly, the job portrait may include the usage rate of each task in the job on the computing node. In the opportunity resource portrait view and the conventional resource portrait view, the current usage rate of shared resources of each computing node is included. The current usage rate of shared resources can be determined according to the job portrait corresponding to the task executed on the current computing node. In an embodiment of the present application, when allocating tasks according to the opportunity resource portrait view and the conventional resource portrait view, the tasks can also be allocated with reference to the usage rate of the shared resources of each computing node.

[0109] In the embodiment of the present application, the management node maintains two resource portrait views for allocating regular jobs and opportunity jobs respectively. Among them, the resource view for allocating regular jobs only includes the second resource utilization rate of each computing node executing regular jobs, so that when allocating regular jobs, it will not be affected by the opportunity jobs currently being executed in the computing node, and the priority allocation of regular jobs can be guaranteed. The resource view for allocating opportunity jobs includes the first resource utilization rate of each computing node executing all jobs, so that the opportunity jobs are allocated to the computing nodes with lower first resource utilization rates, which can improve the resource utilization rate of the computing nodes.

[0110] Figure 7 is a flowchart of a method for allocating tasks provided in an embodiment of the present application. The method can be applied to a computing node and executed by the computing node. Figure 7 , the method comprising:

[0111] Step 701: Receive an execution notification of a first type of task sent by a management node, and execute the first type of task based on a first time slice quota.

[0112] In implementation, after receiving the execution notification of the first type of task, the computing node can set the time slice quota corresponding to the execution of the first type of task, for example, the time slice quota is 1024. And the number of processor cores for the first type of task is allocated, which can be the number applied by the user for the first type of task when submitting the corresponding regular job. Among them, the first type of task can be executed in a core-bound manner or in a non-core-bound manner.

[0113] Step 702: Receive the execution notification of the second type of task sent by the management node, and execute the second type of task based on the second time slice quota and the non-core-bound execution mode.

[0114] During implementation, after receiving the execution notification of the second type of task, the computing node can set the time slice quota corresponding to the execution of the second type of task, for example, the time slice quota is 2. And the number of processor cores for the second type of task is allocated and specified, which can be the number applied by the user for the second type of task when submitting the corresponding regular job. The second time slice quota is much smaller than the first time slice quota. In this way, when the first type of task and the second type of task have a conflicting need for resources, the first type of task will have a greater probability of grabbing the time slice. This can ensure the priority processing of the first type of task. The second type of task can be executed in a non-core-bound manner. In this way, as long as there are idle processor cores in the computing node, the second type of task can be executed. In this way, the first type of task and the second type of task can share the same processor core in the computing node, thereby improving the corresponding resource utilization of the computing node. For example Figure 8As shown, a computing node has 16 processor cores, of which 8 processor cores are allocated to the first type of task A, and the other 8 processor cores are allocated to the first type of task B, and the computing node executes the first type of task A and the first type of task B in a core-bound execution mode. Since the actual resource utilization rates of the first type of task A and the first type of task B in the corresponding job profiles are relatively small, such as the sum of the actual resource utilization rates of the first type of task A and the first type of task B is 50%, and the utilization threshold is 75%, the second type of task can continue to be allocated to the computing node. For example, the second type of task C corresponding to the opportunity job can be allocated to the computing node again, and the computing node executes the second type of task C in a non-core-bound manner. If the actual resource utilization rate of the second type of task C is 30%, the resource utilization rate of the computing node can be increased to 80%.

[0115] like Figure 5 As shown, the computing node includes a job / resource monitoring unit. The job / resource monitoring unit in the computing node can collect usage data corresponding to the task according to a period when the computing unit is executing the task. The computing node can send the collected usage data to the resource management unit of the management node according to a period. The usage data includes the CPU utilization rate corresponding to each task executed by each processor core in the computing node. In addition, the usage data also includes the usage rate of the shared resources of the computing node, and the shared resources include at least one of network bandwidth resources, storage bandwidth resources, and memory resources.

[0116] When the management node receives the usage data sent by the target computing node that executes the first and second types of tasks at the same time, if it determines that the usage rate of any shared resource of the target computing node has reached the safety threshold, it means that there is a possibility that the first and second types of tasks may preempt the shared resources. In this way, the management node can determine whether the shared resources of the computing node are sufficient during the execution of the first and second types of tasks by the usage rate of the shared resources sent by the computing node.

[0117] In order to ensure the normal execution of the first type of tasks, if the management node determines that the usage rate of any shared resource of the third computing node reaches the safety threshold, it can determine the target task that needs to be stopped in at least one second type of task executed by the third computing node, and send a stop execution notification of the corresponding target task to the third computing node. Among them, for the usage rate of any shared resource of the third computing node to reach the safety threshold, it can be that the usage rate of any shared resource of the third computing node reaches the safety threshold in a continuous specified number of cycles. After receiving the stop execution notification of the corresponding target task sent by the management node, the computing node stops executing the target task. In this way, the execution of the first type of tasks can be not affected while improving the utilization rate of computing node resources.

[0118] Fig. 9 is a flowchart of a degradation-aware job scheduling method provided in an embodiment of the present application. The method can be executed by a management node. Fig. 9 , the method comprising:

[0119] Step 901: Receive real-time usage data of each job reported by a computing node.

[0120] The usage data includes the usage rate of network bandwidth resources, storage bandwidth resources, and memory resources.

[0121] Step 902: Determine whether the shared resources in each dimension have reached a set security threshold.

[0122] The management node determines whether there are shared resources greater than or equal to the corresponding security threshold among the network bandwidth resources, storage bandwidth resources, and memory resources. The security threshold can be preset by a technician, and the security thresholds corresponding to the network bandwidth resources, storage bandwidth resources, and memory resources can be the same or different.

[0123] Step 903: The number of consecutive triggering times of the safety threshold is increased by 1.

[0124] If there is a shared resource greater than or equal to the corresponding security threshold among network bandwidth resources, storage bandwidth resources, and memory resources, the number of consecutive triggers is increased by 1. If there is no shared resource greater than or equal to the corresponding security threshold, the number of consecutive triggers is cleared. The initial value of the number of consecutive triggers may be 0.

[0125] Step 904: Whether the number of consecutive triggering of the safety threshold reaches the set degradation perception trigger condition.

[0126] It is determined whether the number of consecutive triggering times reaches a set times threshold. If the number of consecutive triggering times reaches the times threshold, step 905 may be executed.

[0127] Step 905: sort the opportunistic jobs on the corresponding computing nodes according to the size of the bottleneck resources occupied.

[0128] Shared resources whose utilization rate is greater than or equal to the safety threshold are called bottleneck resources. In this step, the utilization rate of bottleneck resources can be sorted according to the second-category tasks corresponding to each opportunity job in the computing node to determine the target task that occupies the most bottleneck resources.

[0129] Step 906: Cancel execution of the target task.

[0130] After determining the target task, the management node can send a stop execution notification of the corresponding target task to the computing node. After receiving the stop execution notification of the corresponding target task sent by the management node, the computing node stops executing the target task. In this way, the execution of the first type of tasks can be not affected while improving the utilization rate of computing node resources.

[0131] Step 907: Update the opportunity resource portrait view.

[0132] After the computing node cancels the execution of the target task, the opportunity resource portrait view can be updated for subsequent scheduling of the opportunity job.

[0133] In the embodiment of the present application, the degradation-aware scheduling unit can be used to detect whether a bottleneck occurs in the shared resources corresponding to the computing nodes that simultaneously execute the first and second types of tasks. When a bottleneck occurs in the shared resources of the computing nodes, the second type of tasks in the computing nodes can be canceled, thereby ensuring the timeliness of the first type of tasks while improving the execution efficiency of the computing nodes.

[0134] Combine the following Figure 5 The system for allocating tasks provided in the present application is introduced. The system can be used in the computing cluster that can be applied in the above embodiment. The system includes a management node and a computing node, wherein:

[0135] The management node is used to obtain usage data of a first computing node resource used by a first computing node among the multiple computing nodes when executing at least one first task, where the first computing node is any one of the multiple computing nodes. The resource utilization rate of the first computing node is generated according to the usage data of the at least one first task; and a second computing node that executes the second task is allocated from the multiple computing nodes for the second task according to the resource utilization rates of the multiple computing nodes.

[0136] A computing node, used to execute a second task assigned by a management node, including receiving an execution notification of a first type of task sent by the management node, and executing the first type of task based on a first time slice quota; receiving an execution notification of a second type of task sent by the management node, and executing the second type of task based on a second time slice quota and a non-core-bound execution mode, wherein the second time slice quota is smaller than the first time slice quota.

[0137] Among them, the management node in the system for allocating jobs provided in the present application can implement all the methods for allocating tasks performed by the management node in the above embodiments, and the computing node in the system for allocating jobs can implement all the methods for allocating tasks performed by the computing node in the above embodiments, which will not be repeated here.

[0138] See also Figure 5In the submission node, users can submit jobs to the management node through the Application Programming Interface (API), command line or software development kit (SDK). Users can set the job as a regular job or an opportunistic job before submission.

[0139] After receiving the job provided by the user, the job management unit in the management node can add the job to the opportunity job queue or the regular job queue according to the type of the job. The colocation management in the scheduling management module can poll the jobs in the opportunity job queue and the regular job queue, and allocate each task in the acquired job according to the job profile determined by the data analysis module based on the historical usage data, the opportunity resource profile view and the regular resource profile view.

[0140] After receiving the job, the job / resource monitoring unit in the computing node can execute the first type of tasks and the second type of tasks on the computing node based on time-sharing multiplexing control. The time-sharing multiplexing control means that the first type of tasks are executed using the core-bound execution mode and the first time quota, and the second type of tasks are executed using the non-core-bound execution mode and the second time quota.

[0141] The job / resource management module in the computing node can collect the usage data of each task on the computing node and send the resource execution data to the resource management unit and data analysis unit of the management node.

[0142] The degradation-aware scheduling unit in the scheduling management unit of the management node can determine whether the first and second tasks on the computing node both have the problem of shared resource preemption based on the usage data of the shared resources in the usage data, and determine whether the first and second tasks on the computing node both have the problem of shared resource preemption. The degradation-aware scheduling unit can determine the second type of tasks that need to be stopped on the computing node based on the usage data of the shared resources, and the parallel computing node sends a stop execution notification corresponding to the second type of tasks. After the computing node receives the stop execution notification corresponding to the second type of tasks, the degradation-aware processing unit can stop executing the corresponding second type of tasks.

[0143] The application feature analysis unit in the data analysis unit of the management node can determine the job profile of each job after each job is executed based on the resource usage information corresponding to each task of each job received, that is, determine the actual resource utilization corresponding to each task in each job, and then provide a job profile for subsequent job allocation.

[0144] In the system for allocating jobs provided in the embodiment of the present application, computing nodes can be first allocated to the first type of tasks in the first type of jobs with high timeliness requirements. After the first type of jobs are allocated, computing nodes can be allocated to the second type of tasks of the second type of jobs with low timeliness requirements in at least one computing node whose first resource utilization is less than the utilization threshold. The computing node quota can execute the first type of tasks according to the first time slice quota, and execute the second type of tasks according to the second time slice quota, so that the computing node resource utilization can be improved, and the first type of tasks with higher timeliness requirements can be executed preferentially. In addition, if the management node determines that the first type of tasks and the second type of tasks have a problem of preempting shared resources, the target task that needs to be stopped can be determined in at least one second type of task executed by the third computing node. In this way, the resource utilization of the computing node can be improved while ensuring that the first type of jobs with high timeliness requirements are executed preferentially in the computing node.

[0145] Fig.10 This application provides a device for allocating jobs, which can be applied to a management node. The management node connects multiple computing nodes. Fig.10 The device includes:

[0146] The acquisition module 1010 is used to acquire usage data of first computing node resources used by a first computing node among multiple computing nodes when executing at least one first task, wherein the first computing node is any computing node among the multiple computing nodes. Specifically, it can be used to implement the acquisition function of the above step 301 and other hidden steps.

[0147] The generating module 1020 is used to generate a first resource utilization rate of the first computing node according to the usage data of at least one first task, and can be used to implement the generating function of the above step 302 and other hidden steps.

[0148] The allocation module 1030 is used to allocate a second computing node for executing the second task from the plurality of computing nodes according to the first resource utilization of the plurality of computing nodes, and can be used to implement the allocation function of the above step 303 and other hidden steps.

[0149] In one implementable manner, the second task includes first-category tasks and second-category tasks, the priority of the first-category tasks is higher than the priority of the second-category tasks, and the above-mentioned allocation module 1030 is used to allocate a second computing node to the first-category tasks; in the second computing node whose first resource utilization is less than a threshold, allocate a second computing node to the second-category tasks.

[0150] In one implementable manner, the first task includes a first-category task and a second-category task, and the allocation module 1030 is used to generate a second resource utilization rate of the first computing node based on usage data of the first-category task in at least one first task; and to allocate a second computing node from multiple computing nodes to the first-category task in the second task based on the second resource utilization rates of multiple computing nodes.

[0151] In one achievable manner, the usage data of the first task includes: resource utilization rate of a processor core of the first computing node during execution of the first task.

[0152] In one achievable manner, the usage data of the first task includes: an occupancy rate of shared resources of the first computing node during execution of the first task, where the shared resources include at least one of network bandwidth resources, storage bandwidth resources, and memory resources.

[0153] In one achievable manner, the device for allocating tasks also includes a determination module, which is used to, for a third computing node that simultaneously executes first-category tasks and second-category tasks, determine, if it is determined that the usage rate of any shared resource of the third computing node reaches a safety threshold, a target task that needs to be stopped from executing in at least one second-category task executed by the third computing node, and send a notification of stopping the execution of the corresponding target task to the third computing node.

[0154] It should be noted that: the device for allocating jobs provided in the above embodiment only uses the division of the above functional modules as an example when allocating jobs. In actual applications, the above functional allocation can be completed by different functional modules as needed, that is, the internal structure of the device is divided into different functional modules to complete all or part of the functions described above. In addition, the device for allocating jobs provided in the above embodiment and the method embodiment for allocating tasks belong to the same concept. The specific implementation process is detailed in the method embodiment and will not be repeated here.

[0155] An embodiment of the present application provides a computer program product including instructions. When the instructions are executed by a computer device, the computer device executes the method for allocating tasks as described in the above embodiment.

[0156] In the above embodiments, it can be implemented in whole or in part by software, hardware, firmware or any combination thereof. When implemented by software, it can be implemented in whole or in part in the form of a computer program product. The computer program product includes one or more computer instructions. When the computer program instructions are loaded and executed on the device, the process or function described in the embodiment of the present application is generated in whole or in part. The computer instructions can be stored in a computer-readable storage medium, or transmitted from one computer-readable storage medium to another computer-readable storage medium. For example, the computer instructions can be transmitted from a website site, computer, server or data center to another website site, computer, server or data center by wired (e.g., coaxial cable, optical fiber, digital subscriber line) or wireless (e.g., infrared, wireless, microwave, etc.). The computer-readable storage medium can be any available medium that can be accessed by the device or a data storage device such as a server or data center that includes one or more available media integrated. The available storage medium can be a magnetic medium (such as a floppy disk, a hard disk and a tape, etc.), or an optical medium (such as a digital video disk (digital videodisk, DVD), etc.), or a semiconductor medium (such as a solid-state hard disk, etc.).

[0157] A person skilled in the art will understand that all or part of the steps to implement the above embodiments may be accomplished by hardware or by instructing related hardware through a program, and the program may be stored in a computer-readable storage medium, and the above-mentioned storage medium may be a read-only memory, a disk or an optical disk, etc.

[0158] In this application, the terms "first", "second", etc. are used to distinguish between identical or similar items with substantially the same effects and functions. It should be understood that there is no logical or temporal dependency between "first" and "second", nor is the quantity and execution order limited. It should also be understood that although the following description uses the terms first, second, etc. to describe various elements, these elements should not be limited by the terms. These terms are only used to distinguish one element from another. In this application, the term "at least one" means one or more, and the term "multiple" means two or more.

[0159] The above description is only a specific implementation of the present application, but the protection scope of the present application is not limited thereto. Any technician familiar with the technical field can easily think of various equivalent modifications or replacements within the technical scope disclosed in the present application, and these modifications or replacements should be included in the protection scope of the present application. Therefore, the protection scope of the present application should be based on the protection scope of the claims.

Claims

1. A method of assigning tasks, It is characterized in that Executed by a management node, the management node is connected to a plurality of computing nodes, the method comprising: Acquire usage data of resources of a first computing node among the multiple computing nodes when the first computing node is used when executing at least one first task, the first computing node being any one computing node among the multiple computing nodes; generating a first resource utilization rate of the first computing node according to the usage data of the at least one first task; According to the first resource utilization rates of the plurality of computing nodes, a second computing node for executing the second task is allocated from the plurality of computing nodes for the second task.

2. The method according to claim 1, It is characterized in that The second task includes a first-category task and a second-category task, the priority of the first-category task is higher than the priority of the second-category task, and the allocating, for the second task, a second computing node from the plurality of computing nodes to execute the second task according to the first resource utilization rate of the plurality of computing nodes, comprises: Allocating a second computing node to the first type of tasks; Among the second computing nodes whose first resource utilization is less than a threshold, a second computing node is allocated to the second type of task.

3. The method according to claim 2, It is characterized in that The first task includes a first-category task and a second-category task, and the allocating a second computing node to the first-category task includes: generating a second resource utilization rate of the first computing node according to usage data of the first type of tasks in the at least one first task; Allocate a second computing node from the plurality of computing nodes for the first type of tasks in the second tasks according to the second resource utilization rates of the plurality of computing nodes.

4. The method according to any one of claims 1 to 3, It is characterized in that The usage data of the first task includes: resource utilization rate of the processor core of the first computing node during execution of the first task.

5. The method according to any one of claims 1 to 4, It is characterized in that The usage data of the first task includes: the occupancy rate of the shared resources of the first computing node during the execution of the first task, and the shared resources include at least one of network bandwidth resources, storage bandwidth resources, and memory resources.

6. The method according to any one of claims 2 to 5, It is characterized in that For the third computing node that simultaneously executes the first type of tasks and the second type of tasks, if it is determined that the usage rate of any shared resource of the third computing node has reached a safety threshold, then among at least one second type of tasks executed by the third computing node, a target task that needs to be stopped is determined, and a stop execution notification corresponding to the target task is sent to the third computing node.

7. A device for allocating tasks, It is characterized in that The device is applied to a management node, the management node is connected to a plurality of computing nodes, and the device comprises: an acquisition module, configured to acquire usage data of resources of a first computing node used by a first computing node among the plurality of computing nodes when executing at least one first task, wherein the first computing node is any one computing node among the plurality of computing nodes; a generating module, configured to generate a first resource utilization rate of the first computing node according to the usage data of the at least one first task; An allocation module is used to allocate a second computing node for executing the second task from the multiple computing nodes according to the first resource utilization rate of the multiple computing nodes.

8. The device according to claim 7, It is characterized in that The second tasks include first-category tasks and second-category tasks, the priority of the first-category tasks is higher than the priority of the second-category tasks, and the allocation module is used to: Allocating a second computing node to the first type of tasks; Among the second computing nodes whose first resource utilization is less than a threshold, a second computing node is allocated to the second type of task.

9. The device according to claim 8, It is characterized in that The first tasks include first-category tasks and second-category tasks, and the allocation module is used to: generating a second resource utilization rate of the first computing node according to usage data of the first type of tasks in the at least one first task; Allocate a second computing node from the plurality of computing nodes for the first type of tasks in the second tasks according to the second resource utilization rates of the plurality of computing nodes.

10. The device according to any one of claims 7 to 9, It is characterized in that The usage data of the first task includes: resource utilization rate of the processor core of the first computing node during execution of the first task.

11. The device according to any one of claims 7 to 10, It is characterized in that The usage data of the first task includes: the occupancy rate of the shared resources of the first computing node during the execution of the first task, and the shared resources include at least one of network bandwidth resources, storage bandwidth resources, and memory resources.

12. The method according to any one of claims 8 to 11, It is characterized in that The device also includes a determination module for determining, for a third computing node that simultaneously executes first-category tasks and second-category tasks, a target task that needs to be stopped from executing among at least one second-category task executed by the third computing node if it is determined that the usage rate of any shared resource of the third computing node reaches a safety threshold, and sending a stop execution notification corresponding to the target task to the third computing node.

13. A system for allocating tasks, It is characterized in that The system includes a management node and a plurality of computing nodes connected to the management node, wherein: The management node is used to obtain usage data of resources of a first computing node among the multiple computing nodes when the first computing node performs at least one first task, the first computing node being any one of the multiple computing nodes; generating a resource utilization rate of the first computing node according to the usage data of the at least one first task; and allocating a second computing node that performs the second task from the multiple computing nodes for a second task according to the resource utilization rates of the multiple computing nodes; The computing node is used to execute the second task assigned by the management node.

14. A computer-readable storage medium, It is characterized in that The computer-readable storage medium stores a computer program code. When the computer program code is executed by a computer device, the computer device executes the method according to any one of claims 1 to 6.