Computing task scheduling method, device, electronic device and storage medium
By obtaining resource information of computing tasks and work nodes, and determining the adaptive nodes based on the task scheduling threshold array, the computing tasks are scheduled to the most suitable GPU, the problem of low GPU resource utilization in the prior art is solved, and more efficient resource utilization and computing task processing efficiency is achieved.
Patent Information
- Application Number
- CN202110270059.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2021-03-12
- Publication Date
- 2025-04-22
- Estimated Expiration
- 2041-03-12
AI Technical Summary
In the prior art, GPU-based computing task scheduling methods tend to lead to low GPU resource utilization, because computing tasks are usually scheduled to run on the GPU with the most resources remaining, resulting in low actual resource utilization.
By obtaining the resource requirements of the calculation task to be scheduled and the resource remaining amount of each worker node in the node list, the most suitable worker node is determined based on the relationship between the resource remaining amount, resource requirements and the preset task scheduling threshold array, and the calculation task is scheduled to the node. The task scheduling threshold array is determined based on the resource usage of historical tasks.
The resource utilization rate of work nodes is improved, and the processing efficiency of computing tasks is improved by reasonably allocating computing tasks.
Smart Images

Figure CN115080197B_ABST
Abstract
Description
Background Art
[0002] The computing tasks of deep learning (DL) mainly rely on the GPU (Graphic Processing Unit) in the server. However, due to the high computing cost of GPU, it is necessary to make full use of GPU resources when allocating computing tasks.
[0003] In the related art, when scheduling computing tasks based on the GPU, the computing tasks are usually scheduled to run on the GPU with the most remaining resources. This scheduling method can easily cause a large difference between the GPU resources required for the computing tasks and the actual remaining resources of the GPU, resulting in low GPU resource utilization.
[0004] It should be noted that the information disclosed in the above background technology section is only used to enhance the understanding of the background of the present disclosure, and therefore may include information that does not constitute the prior art known to ordinary technicians in the field. Summary of the invention
[0005] The purpose of the present disclosure is to provide a computing task scheduling method, device, electronic device and computer-readable storage medium, which can at least to some extent improve the problem of low GPU resource utilization caused by the methods in the related art.
[0006] Other features and advantages of the present disclosure will become apparent from the following detailed description, or may be learned in part by the practice of the present disclosure.
[0007] According to one aspect of the present disclosure, a computing task scheduling method is provided, including: obtaining the resource demand of the computing task to be scheduled; obtaining the resource remaining amount of each working node in the node list; when it is detected that the resource remaining amount of the working node and the resource demand amount do not match, determining the adaptation node in the node list that is adapted to the computing task based on the relationship between the resource remaining amount of the working node, the resource demand amount and a preset task scheduling threshold array; scheduling the computing task to the adaptation node, wherein the task scheduling threshold array is determined based on the resource usage of historical tasks.
[0008] In one embodiment, the determination of the adaptation node in the node list that is adapted to the computing task based on the relationship between the remaining resources of the working node, the resource demand and the task scheduling threshold array includes: based on the arrangement order of the working nodes in the node list, detecting one by one whether the resource difference and the task scheduling threshold array satisfy the scheduling rules, the resource difference being the difference between the remaining resources of the working node and the resource demand; when it is detected that the scheduling rules are satisfied between the resource difference and the task scheduling threshold array, determining the working node corresponding to the resource difference as the first adaptation node, wherein the scheduling rules are used to configure the resource utilization of the working node to be greater than the ratio threshold.
[0009] In one embodiment, before obtaining the resource demand of the computing task to be scheduled, it also includes: determining an upper threshold and a lower threshold based on the resource usage of the historical task; determining an intermediate value between the upper threshold and the lower threshold; and configuring the task scheduling threshold array based on the upper threshold, the intermediate value and the lower threshold.
[0010] In one embodiment, when it is detected that the scheduling rule is satisfied between the resource difference value and the task scheduling threshold array, the working node corresponding to the resource difference value is determined as the first adaptation node, including: when it is detected that the resource difference value is greater than the upper limit threshold, determining that the scheduling rule is satisfied between the resource difference value and the task scheduling threshold array, and determining the working node corresponding to the resource difference value as the first adaptation node.
[0011] In one embodiment, the intermediate value includes a first intermediate value and a second intermediate value, and when it is detected that the scheduling rule is satisfied between the resource difference value and the task scheduling threshold array, the working node corresponding to the resource difference value is determined as the first adaptation node, which also includes: when it is detected that the resource difference value is greater than or equal to the second intermediate value and less than or equal to the first intermediate value, determining that the scheduling rule is satisfied between the resource difference value and the task scheduling threshold array, and determining the working node corresponding to the resource difference value as the first adaptation node; and adjusting the first adaptation node to the first place in the node list, wherein the first intermediate value and the second intermediate value are generated based on the quantile rule and the ratio threshold.
[0012] In one embodiment, the determination of the adaptation node in the node list that is adapted to the computing task based on the relationship between the remaining resources of the working node, the resource demand and the task scheduling threshold array also includes: when it is detected that the resource difference and the task scheduling threshold array do not satisfy the scheduling rules, a second adaptation node is determined according to a reference rule to send the computing task to the second adaptation node, wherein the reference rule is used to adjust the resource difference of the second adaptation node to satisfy the scheduling rules when the subsequent computing task is scheduled.
[0013] In one embodiment, the method further includes: scheduling the computing task to any of the working nodes when it is detected that the remaining resources of any of the working nodes match the required resources.
[0014] According to a second aspect of the present disclosure, a computing task scheduling device is provided, including: a first acquisition module, used to obtain the resource demand of the computing task to be scheduled; a second acquisition module, used to obtain the resource remaining amount of each working node in the node list; a determination module, used to determine the adaptation node in the node list that is adapted to the computing task based on the relationship between the resource remaining amount of the working node, the resource demand amount and a preset task scheduling threshold array when it is detected that the resource remaining amount of the working node and the resource demand amount do not match; a scheduling module, used to schedule the computing task to the adaptation node, wherein the task scheduling threshold array is determined based on the resource usage of historical tasks.
[0015] According to a third aspect of the present disclosure, an electronic device is provided, comprising: a processor; and a memory for storing executable instructions of the processor; wherein the processor is configured to execute any one of the above-mentioned computing task scheduling methods by executing the executable instructions.
[0016] According to a fourth aspect of the present disclosure, a computer-readable storage medium is provided, on which a computer program is stored, and when the computer program is executed by a processor, any one of the above-mentioned computing task scheduling methods is implemented.
[0017] The computing task scheduling scheme provided by the embodiments of the present disclosure obtains the resource demand of the computing task and the remaining resource of the working node in the node list to represent the information of the computing task and the working node that need to be adapted, and represents the historical tasks through a preset task scheduling threshold array to count the resource demand of the historical tasks. Then, based on the relationship between the remaining resource, the resource demand and the task scheduling threshold array, the most suitable working node can be selected in the node list as the adaptation node, and the computing task can be scheduled to the adaptation node to realize the scheduling of the computing task, so that the computing task can be reasonably allocated, thereby improving the resource utilization of the working node, which is beneficial to improving the processing efficiency of the computing task.
[0018] It is to be understood that the foregoing general description and the following detailed description are exemplary and explanatory only and are not restrictive of the present disclosure. BRIEF DESCRIPTION OF THE DRAWINGS
[0019] The accompanying drawings herein are incorporated into the specification and constitute a part of the specification, illustrate embodiments consistent with the present disclosure, and together with the specification are used to explain the principles of the present disclosure. Obviously, the accompanying drawings described below are only some embodiments of the present disclosure, and for ordinary technicians in this field, other accompanying drawings can be obtained based on these accompanying drawings without creative work.
[0020] Figure 1 A schematic diagram showing a computing task scheduling system structure in an embodiment of the present disclosure;
[0021] Figure 2 A flowchart of a computing task scheduling method according to an embodiment of the present disclosure is shown;
[0022] Figure 3 A flowchart showing another computing task scheduling method in an embodiment of the present disclosure is shown;
[0023] Figure 4 A flowchart showing another computing task scheduling method in an embodiment of the present disclosure is shown;
[0024] Figure 5 A flowchart showing another method for scheduling computing tasks in an embodiment of the present disclosure is shown;
[0025] Figure 6 A schematic diagram showing a computing task scheduling device according to an embodiment of the present disclosure is shown;
[0026] Figure 7 A schematic diagram showing a computing task scheduling device according to an embodiment of the present disclosure is shown;
[0027] Figure 8 A schematic diagram of an electronic device in an embodiment of the present disclosure is shown. DETAILED DESCRIPTION
[0028] Example embodiments will now be described more fully with reference to the accompanying drawings. However, example embodiments can be implemented in a variety of forms and should not be construed as limited to the examples set forth herein; rather, these embodiments are provided so that the disclosure will be more comprehensive and complete and to fully convey the concepts of the example embodiments to those skilled in the art. The described features, structures, or characteristics may be combined in any suitable manner in one or more embodiments.
[0029] In addition, the accompanying drawings are only schematic illustrations of the present disclosure and are not necessarily drawn to scale. The same reference numerals in the figures represent the same or similar parts, and their repeated description will be omitted. Some of the block diagrams shown in the accompanying drawings are functional entities and do not necessarily correspond to physically or logically independent entities. These functional entities can be implemented in software form, or implemented in one or more hardware modules or integrated circuits, or implemented in different networks and / or processor devices and / or microcontroller devices.
[0030] The solution provided by the present application obtains the resource demand of the computing task and the remaining resource of the working node in the node list to represent the information of the computing task and the working node that need to be adapted, and represents the historical tasks through a preset task scheduling threshold array to count the resource demand of the historical tasks, and then can select the most suitable working node in the node list based on the relationship between the remaining resource, the resource demand and the task scheduling threshold array, so as to schedule the computing task to the adaptation node, realize the scheduling of the computing task, so that the computing task can be reasonably allocated, thereby improving the resource utilization of the working node, which is beneficial to improving the processing efficiency of the computing task.
[0031] The solution provided in the embodiments of the present application involves technologies such as task scheduling, which is specifically described through the following embodiments.
[0032] Figure 1 A schematic diagram of the structure of a computing task scheduling system in an embodiment of the present disclosure is shown, including multiple terminals 120 and a server cluster 140.
[0033] The terminal 120 may be a mobile terminal such as a mobile phone, a game console, a tablet computer, an e-book reader, smart glasses, an MP4 (Moving Picture Experts Group Audio Layer IV) player, a smart home device, an AR (Augmented Reality) device, a VR (Virtual Reality) device, or the terminal 120 may also be a personal computer (PC), such as a laptop computer and a desktop computer.
[0034] The terminal 120 may be installed with an application for providing computing task scheduling.
[0035] The terminal 120 is connected to the server cluster 140 via a communication network. Optionally, the communication network is a wired network or a wireless network.
[0036] The server cluster 140 is a server, or is composed of several servers, or is a virtualization platform, or is a cloud computing service center. The server cluster 140 is used to provide background services for providing computing task scheduling applications. Optionally, the server cluster 140 undertakes the main computing work, and the terminal 120 undertakes the secondary computing work; or, the server cluster 140 undertakes the secondary computing work, and the terminal 120 undertakes the main computing work; or, the terminal 120 and the server cluster 140 adopt a distributed computing architecture for collaborative computing.
[0037] In some optional embodiments, the server cluster 140 is used to store computing task scheduling models, etc.
[0038] Optionally, the client of the application installed in different terminals 120 is the same, or the client of the application installed on the two terminals 120 is the client of the same type of application of different control system platforms. Based on the different terminal platforms, the specific form of the client of the application may also be different, for example, the application client may be a mobile client, a PC client or a World Wide Web (Web) client.
[0039] Those skilled in the art will appreciate that the number of the terminals 120 may be more or less. For example, there may be only one terminal, or there may be dozens or hundreds of terminals, or a greater number. The embodiment of the present application does not limit the number and device type of the terminals.
[0040] Optionally, the system may also include a management device ( Figure 1(not shown), the management device is connected to the server cluster 140 via a communication network. Optionally, the communication network is a wired network or a wireless network.
[0041] Optionally, the above-mentioned wireless network or wired network uses standard communication technology and / or protocol. The network is usually the Internet, but it can also be any network, including but not limited to a local area network (LAN), a metropolitan area network (MAN), a wide area network (WAN), a mobile, wired or wireless network, a dedicated network or any combination of a virtual private network). In some embodiments, the data exchanged through the network is represented by technologies and / or formats including Hyper Text Mark-up Language (HTML), Extensible Markup Language (XML), etc. In addition, conventional encryption technologies such as Secure Socket Layer (SSL), Transport Layer Security (TLS), Virtual Private Network (VPN), Internet Protocol Security (IPsec) can also be used to encrypt all or some links. In other embodiments, customized and / or dedicated data communication technologies can also be used to replace or supplement the above-mentioned data communication technologies.
[0042] Below, each step in the computing task scheduling method in this example implementation will be described in more detail with reference to the accompanying drawings and embodiments.
[0043] Figure 2 The method provided by the embodiment of the present disclosure can be executed by any electronic device with computing processing capabilities, such as Figure 1 The terminal 120 and / or the server cluster 140 in the embodiment. In the following examples, the terminal 120 is used as the execution subject for example description.
[0044] like Figure 2 As shown, the terminal 120 executes the computing task scheduling method, including the following steps:
[0045] Step S202, obtaining the resource requirement of the computing task to be scheduled.
[0046] The computing tasks are configured in a computing task queue, and the computing tasks in the computing task queue and the resource requirements of the computing tasks are further obtained by obtaining the computing task queue.
[0047] In addition, the computing task may be a GPU computing task.
[0048] Step S204, obtaining the remaining amount of resources of each working node in the node list.
[0049] The node list is the GPU host list, and the working nodes in the node list are the GPU hosts.
[0050] Step S206, when it is detected that the remaining resources and the required resources of the working node do not match, based on the relationship between the remaining resources, the required resources and the preset task scheduling threshold array of the working node, determine the adapter node in the node list that is adapted to the computing task.
[0051] One implementation of detecting whether the remaining resource amount and the required resource amount of the working node match is to detect whether the remaining resource amount of the working node is exactly equal to the required resource amount of the computing task to be assigned. If not, it can be regarded that the remaining resource amount and the required resource amount of the working node do not match.
[0052] In addition, the preset task scheduling threshold array can be determined for the resource demand occupied by the historical tasks processed by the working node. By counting the resource demand of the historical tasks and configuring the task scheduling threshold array based on the statistical results, the computing tasks can be reasonably scheduled to the adapted working nodes based on the relationship between the remaining resources of the working node and the scheduling threshold in the task scheduling threshold array, so as to achieve efficient utilization of the GPU resources of the working node.
[0053] Specifically, the task scheduling threshold array may include at least a maximum resource requirement of a historical task and a minimum resource requirement of a historical task.
[0054] Step S208, scheduling the computing task to the adaptation node, wherein the task scheduling threshold array is determined based on the resource usage of the historical tasks.
[0055] Among them, the scheduling node is used to dispatch the computing tasks to the adaptation node.
[0056] In this embodiment, the resource demand of the computing task and the remaining resource of the working node in the node list are obtained to represent the information of the computing task and the working node that need to be adapted. The historical tasks are represented by a preset task scheduling threshold array to count the resource demand of the historical tasks. Based on the relationship between the remaining resource, the resource demand and the task scheduling threshold array, the most suitable working node can be selected in the node list as the adaptation node, and the computing task can be scheduled to the adaptation node to realize the scheduling of the computing task, so that the computing task can be reasonably allocated, thereby improving the resource utilization of the working node, which is beneficial to improving the processing efficiency of the computing task.
[0057] like Figure 3 As shown, in one embodiment, step S206, based on the relationship between the remaining amount of resources, the required amount of resources of the working node and the task scheduling threshold array, determines an implementation method of an adapter node in the node list that is adapted to the computing task, including:
[0058] Step S302, based on the arrangement order of the working nodes in the node list, check one by one whether the resource difference and the task scheduling threshold array meet the scheduling rules, and the resource difference is the difference between the remaining resources and the resource demand of the working node.
[0059] The working nodes are arranged in a specified order in the node list, and the specified order can be understood as a configuration that gradually achieves higher resource utilization from front to back.
[0060] Step S304, detecting whether the resource difference and the task scheduling threshold array satisfy the scheduling rule.
[0061] The scheduling rule refers to that after the computing task is scheduled to the adapted working node, the resource occupancy rate of the adapted working node is gradually configured to be greater than the ratio threshold.
[0062] Step S306, when it is detected that the resource difference and the task scheduling threshold array satisfy the scheduling rule, the working node corresponding to the resource difference is determined as the first adaptation node, wherein the scheduling rule is used to configure the resource utilization of the working node to be greater than the ratio threshold.
[0063] In this embodiment, the resource difference between the resource remaining amount of the working node and the resource demand amount of the computing task to be scheduled is calculated one by one in the arrangement order. As long as it is detected that the relationship between the resource difference and the task scheduling threshold array satisfies the scheduling rule, the working node is determined as the first adapter node, and the computing task is scheduled to the first adapter node. By setting the scheduling rules, the resource utilization rate of the working node with GPU can be improved, thereby reducing the GPU investment rate.
[0064] Specifically, based on the resource difference, a computing task in the computing task queue is adapted to the working nodes in the node list one by one. After the adaptation is successful, the computing task is allocated until all computing tasks in the computing task queue are scheduled.
[0065] In one embodiment, before obtaining the resource demand of the computing task to be scheduled, it also includes: configuring a task scheduling threshold array based on the resource usage of historical tasks.
[0066] In this embodiment, by collecting the resource usage of historical tasks and counting the resources required for the historical tasks during calculation, the maximum resource requirement, the minimum resource requirement, and the evaluation resource requirement are determined, and the task scheduling threshold array is configured based on the above data to ensure the rationality of the computing task allocation.
[0067] In one embodiment, configuring a task scheduling threshold array based on resource usage of historical tasks includes: determining an upper threshold and a lower threshold based on resource usage of historical tasks; determining a first intermediate value and a second intermediate value between the upper threshold and the lower threshold based on a quantile rule; and configuring the task scheduling threshold array based on the upper threshold, the first intermediate value, the second intermediate value, and the lower threshold.
[0068] In this embodiment, quantile, also known as quantile point, refers to dividing the probability distribution range of a random variable into several equal numerical points. After determining the upper threshold and the lower threshold, the other two middle values are obtained by quintile method, and five numerical ranges are obtained based on the four thresholds. Based on the matching result between the resource difference and the numerical range, the numerical range to which the resource difference belongs is determined, and whether the resource difference and the task scheduling threshold array meet the scheduling rules, so as to realize the scheduling of the computing task when the scheduling rules are met.
[0069] like Figure 4 As shown, in one embodiment, in step S306, when it is detected that the resource difference value satisfies the scheduling rule with the task scheduling threshold array, an implementation method of determining the working node corresponding to the resource difference value as the first adaptation node includes:
[0070] Step S402: Detect the relationship between the resource difference and the task scheduling threshold array.
[0071] Step S404, when it is detected that the resource difference is greater than the upper threshold, it is determined that the resource difference and the task scheduling threshold array satisfy the scheduling rule, and the working node corresponding to the resource difference is determined as the first adaptation node.
[0072] When it is detected that the resource difference is greater than the upper threshold, it indicates that after the computing task is scheduled to the working node, there are still more remaining resources in the next round of task scheduling.
[0073] When it is detected that the resource difference is less than the lower limit threshold, it indicates that the working node is not the first adapter node for the computing task, that is, if the computing task is scheduled to the working node, there are still certain remaining resources, but the remaining resources cannot bear the scheduling of the next computing task, resulting in the inefficient utilization of the resources of the working node.
[0074] In one embodiment, in step S306, when it is detected that the resource difference value satisfies the scheduling rule with the task scheduling threshold array, an implementation method of determining the working node corresponding to the resource difference value as the first adaptation node further includes:
[0075] Step S406, when it is detected that the resource difference is greater than or equal to the second intermediate value and less than or equal to the first intermediate value, it is determined that the resource difference and the task scheduling threshold array satisfy the scheduling rules, and the working node corresponding to the resource difference is determined as the first adaptation node.
[0076] Step S408: adjust the first adaptation node to the first position in the node list, wherein the first intermediate value and the second intermediate value are generated based on the quantile rule and the ratio threshold.
[0077] Based on the statistical results, when it is detected that the resource difference is greater than or equal to the second intermediate value and less than or equal to the first intermediate value, it indicates that there is a high probability that the remaining resources of the node will be allocated in the next round of computing task allocation, thereby maximizing the utilization of the remaining resources of the node.
[0078] When it is detected that the resource difference is less than or equal to the upper threshold and greater than the first intermediate value, it is not determined as the first adaptation node because it is impossible to determine whether its remaining resources still meet the subsequent task allocation after the next round of computing task allocation.
[0079] When it is detected that the resource difference is greater than or equal to the lower limit threshold and less than the second intermediate value, if the computing task is scheduled to the working node, there are still certain remaining resources, but the remaining resources cannot bear the scheduling of the next computing task, which also causes the resources of the working node to be unable to be efficiently utilized.
[0080] In this embodiment, five numerical regions are divided by setting an upper threshold, a first intermediate value, a second intermediate value, and a lower threshold. Within these five numerical regions, when it is detected that the resource difference is greater than the upper threshold, or greater than or equal to the second intermediate value, and less than or equal to the first intermediate value, it indicates that the resource difference and the task scheduling threshold array satisfy the scheduling rules. At this time, the computing task is directly sent to the node to achieve efficient utilization of the working node resources.
[0081] like Figure 3 As shown, step S206, in one embodiment, based on the relationship between the remaining amount of resources, the required amount of resources of the working node and the task scheduling threshold array, an implementation method of determining the adaptation node in the node list that is adapted to the computing task also includes:
[0082] Step S308, when it is detected that the resource difference and the task scheduling threshold array do not satisfy the scheduling rules, determine a second adapter node that satisfies the reference rules, wherein the reference rules are used to adjust the resource difference of the second adapter node to satisfy the scheduling rules during subsequent computing task scheduling.
[0083] In this embodiment, when it is detected that the resource difference and the task scheduling threshold array do not satisfy the scheduling rules, in this case, the work node is skipped, and the relationship between the resource difference between the resource remaining amount of the next work node and the resource requirement of the computing task and the task scheduling threshold array is continuously detected to see whether the scheduling rules are satisfied. When it is detected that all the work nodes in the node list do not satisfy the scheduling rules, resource allocation based on the scheduling rules is abandoned at this time, and the reference rule is adopted.
[0084] A specific implementation method of the reference rule is to check one by one in the work queue whether the remaining resources of the working node are greater than the resource demand of the computing task according to the node arrangement order. When it is detected that the remaining resources are greater than the resource demand, further check whether the resource difference between the remaining resources and the resource demand of the working node meets the scheduling rules after the computing task is sent to the working node. If it meets the rules, the computing task will be scheduled to the working node first. If none of the working nodes in the node list meet the rules, the working node in the front row will be determined as the second adaptation node according to the arrangement order.
[0085] In this embodiment, by setting reference rules, when it is detected that the relationship between the resource difference and the task scheduling threshold array does not satisfy the scheduling rules, the scheduling work of the computing task can continue to be processed according to the reference rules. On the one hand, the smooth execution of the computing task scheduling operation is guaranteed. On the other hand, combining the scheduling rules and the reference rules is also conducive to ensuring the efficient utilization of the GPU in the working node, and further beneficially improving the processing efficiency of the computing tasks.
[0086] like Figure 5 As shown, according to another disclosed embodiment, a computing task scheduling method includes:
[0087] Step S502, determining four parameter arrays (Min, A, B, Max) according to the resource usage of the historical tasks.
[0088] Among them, Min is the minimum known resource demand, Max is the maximum known resource demand, and A and B are the quantiles between Min and Max respectively.
[0089] Step S504, obtaining the GPU computing task queue to be scheduled and the GPU resource requirement of each computing task.
[0090] Step S506, obtaining a list of GPU nodes used for computing tasks and the remaining amount of GPU resources of each working node.
[0091] Step S508, when a new computing task is detected, the relationship between the remaining amount of resources of each node and the resource requirement of the computing task is compared one by one.
[0092] Step S510, when it is detected that the remaining amount of resources and the required amount of resources of any working node match, the computing task is scheduled to the working node.
[0093] Step S512: When the difference between the remaining amount of resources of the working node and the required amount of resources of the computing task to be assigned is greater than the Max value, the task is sent to the working node.
[0094] Step S514: When the resource difference between the remaining amount of the working node and the resource requirement of the computing task to be assigned is between A and B, the task is sent to the working node.
[0095] Step S516: The position of the working node in the node list is moved to the front, so that tasks are assigned to the working node first next time.
[0096] Step S518: When the difference between the remaining amount of resources of the working node and the required amount of resources of the computing task to be assigned is less than the Min value, skip the working node and try the next working node.
[0097] Step S520: If no working node that meets the above rules is found after checking the entire cluster, the scheduling rules are abandoned and the reference rules are used to allocate working nodes for the computing tasks.
[0098] It should be noted that the above figures are only schematic illustrations of the processes included in the method according to an exemplary embodiment of the present invention, and are not intended to be limiting. It is easy to understand that the processes shown in the above figures do not indicate or limit the time sequence of these processes. In addition, it is also easy to understand that these processes can be performed synchronously or asynchronously, for example, in multiple modules.
[0099] It will be appreciated by those skilled in the art that various aspects of the present invention may be implemented as a system, method or program product. Therefore, various aspects of the present invention may be specifically implemented in the following forms, namely: a complete hardware implementation, a complete software implementation (including firmware, microcode, etc.), or a combination of hardware and software, which may be collectively referred to herein as a "circuit", "module" or "system".
[0100] Refer to the following Figure 6 The computing task scheduling device 600 according to this embodiment of the present invention is described. Figure 6 The computing task scheduling device 600 shown is only an example and should not bring any limitation to the functions and scope of use of the embodiment of the present invention.
[0101] The computing task scheduling device 600 is presented in the form of a hardware module. The components of the computing task scheduling device 600 may include but are not limited to: a first acquisition module 602, used to acquire the resource demand of the computing task to be scheduled; a second acquisition module 604, used to acquire the remaining resources of each working node in the node list; a determination module 606, used to determine the first adapter node in the node list that is adapted to the computing task based on the relationship between the remaining resources, the resource demand, and the preset task scheduling threshold array of the working node when it is detected that the remaining resources and the resource demand of the working node do not match; a scheduling module 608, used to schedule the computing task to the first adapter node, wherein the task scheduling threshold array is determined based on the resource usage of the historical task.
[0102] According to another embodiment of the present disclosure, a computing task scheduling device 700 includes:
[0103] Resource monitoring module 702, queue management module 704, scheduling module 706, task monitoring module 708 and auxiliary module 710, each module has the following main functions:
[0104] The resource monitoring module 702 is used to monitor the usage of key resources of each working node and determine the remaining amount of resources of each working node by obtaining monitoring data.
[0105] The queue management module 704 is used to store and manage the computing tasks to be scheduled, and obtain the resource requirements of the computing tasks.
[0106] The scheduling module 706 is used to determine on which working nodes the computing tasks are to be run.
[0107] The task monitoring module 708 is used to allocate tasks on working nodes and detect the resources occupied by them.
[0108] The auxiliary module 710 is used to record the resource usage of the cluster, nodes and each computing task.
[0109] Refer to the following Figure 8 An electronic device 800 according to this embodiment of the present invention will be described. Figure 8 The electronic device 800 shown is only an example and should not bring any limitation to the functions and scope of use of the embodiments of the present invention.
[0110] like Figure 8 As shown, the electronic device 800 is in the form of a general computing device. The components of the electronic device 800 may include but are not limited to: at least one processing unit 810, at least one storage unit 820, and a bus 830 connecting different system components (including the storage unit 820 and the processing unit 810).
[0111] The storage unit stores program codes, which can be executed by the processing unit 810, so that the processing unit 810 performs the steps of various exemplary embodiments of the present invention described in the above “Exemplary Method” section of this specification. For example, the processing unit 810 can perform the following steps: Figure 2 Steps S202 to S208 shown in , and other steps defined in the computing task scheduling method of the present disclosure.
[0112] The storage unit 820 may include a readable medium in the form of a volatile storage unit, such as a random access memory unit (RAM) 8201 and / or a cache memory unit 8202 , and may further include a read-only memory unit (ROM) 8203 .
[0113] The storage unit 820 may also include a program / utility 8204 having a set (at least one) of program modules 8205, such program modules 8205 including but not limited to: an operating system, one or more application programs, other program modules, and program data, each of which or some combination may include an implementation of a network environment.
[0114] Bus 830 may represent one or more of several types of bus structures, including a memory unit bus or memory unit controller, a peripheral bus, an accelerated graphics port, a processing unit, or a local bus using any of a variety of bus architectures.
[0115] The electronic device 800 may also communicate with one or more external devices 860 (e.g., keyboards, pointing devices, Bluetooth devices, etc.), may also communicate with one or more devices that enable a user to interact with the electronic device, and / or may communicate with any device that enables the electronic device 800 to communicate with one or more other computing devices (e.g., routers, modems, etc.). Such communication may be performed via an input / output (I / O) interface 850. Furthermore, the electronic device 800 may also communicate with one or more networks (e.g., local area networks (LANs), wide area networks (WANs), and / or public networks, such as the Internet) via a network adapter 850. As shown, the network adapter 850 communicates with other modules of the electronic device 800 via a bus 830. It should be understood that, although not shown in the figure, other hardware and / or software modules may be used in conjunction with the electronic device, including but not limited to: microcode, device drivers, redundant processing units, external disk drive arrays, RAID systems, tape drives, and data backup storage systems, etc.
[0116] Through the description of the above implementation, it is easy for those skilled in the art to understand that the example implementation described here can be implemented by software, or by software combined with necessary hardware. Therefore, the technical solution according to the implementation of the present disclosure can be embodied in the form of a software product, which can be stored in a non-volatile storage medium (which can be a CD-ROM, a USB flash drive, a mobile hard disk, etc.) or on a network, including several instructions to enable a computing device (which can be a personal computer, a server, a terminal device, or a network device, etc.) to execute the method according to the implementation of the present disclosure.
[0117] In an exemplary embodiment of the present disclosure, a computer-readable storage medium is also provided, on which a program product capable of implementing the above method of the present specification is stored. In some possible implementations, various aspects of the present invention may also be implemented in the form of a program product, which includes a program code, and when the program product is run on a terminal device, the program code is used to enable the terminal device to execute the steps according to various exemplary embodiments of the present invention described in the above "Exemplary Method" section of the present specification.
[0118] The program product for implementing the above method according to an embodiment of the present invention may adopt a portable compact disk read-only memory (CD-ROM) and include program code, and may be run on a terminal device, such as a personal computer. However, the program product of the present invention is not limited thereto, and in this document, a readable storage medium may be any tangible medium containing or storing a program, which may be used by or in combination with an instruction execution system, apparatus, or device.
[0119] Computer readable signal media may include data signals propagated in baseband or as part of a carrier wave, in which readable program code is carried. Such propagated data signals may take a variety of forms, including but not limited to electromagnetic signals, optical signals, or any suitable combination of the above. Readable signal media may also be any readable medium other than a readable storage medium, which may send, propagate, or transmit a program for use by or in conjunction with an instruction execution system, apparatus, or device.
[0120] The program code embodied on the readable medium may be transmitted using any appropriate medium, including but not limited to wireless, wired, optical cable, RF, etc., or any suitable combination of the foregoing.
[0121] Program code for performing the operations of the present invention may be written in any combination of one or more programming languages, including object-oriented programming languages such as Java, C++, etc., and conventional procedural programming languages such as "C" or similar programming languages. The program code may be executed entirely on the user computing device, partially on the user device, as a separate software package, partially on the user computing device and partially on a remote computing device, or entirely on a remote computing device or server. In cases involving a remote computing device, the remote computing device may be connected to the user computing device through any type of network, including a local area network (LAN) or a wide area network (WAN), or may be connected to an external computing device (e.g., through the Internet using an Internet service provider).
[0122] It should be noted that, although several modules or units of the device for action execution are mentioned in the above detailed description, this division is not mandatory. In fact, according to the embodiments of the present disclosure, the features and functions of two or more modules or units described above can be embodied in one module or unit. On the contrary, the features and functions of one module or unit described above can be further divided into multiple modules or units to be embodied.
[0123] In addition, although the steps of the method in the present disclosure are described in a specific order in the drawings, this does not require or imply that the steps must be performed in this specific order, or that all the steps shown must be performed to achieve the desired results. Additionally or alternatively, some steps may be omitted, multiple steps may be combined into one step, and / or one step may be decomposed into multiple steps, etc.
[0124] Through the description of the above implementation, it is easy for those skilled in the art to understand that the example implementation described here can be implemented by software, or by software combined with necessary hardware. Therefore, the technical solution according to the implementation of the present disclosure can be embodied in the form of a software product, which can be stored in a non-volatile storage medium (which can be a CD-ROM, a USB flash drive, a mobile hard disk, etc.) or on a network, including several instructions to enable a computing device (which can be a personal computer, a server, a mobile terminal, or a network device, etc.) to execute the method according to the implementation of the present disclosure.
[0125] Those skilled in the art will readily appreciate other embodiments of the present disclosure after considering the specification and practicing the invention disclosed herein. This application is intended to cover any modification, use or adaptation of the present disclosure, which follows the general principles of the present disclosure and includes common knowledge or customary techniques in the art that are not disclosed in the present disclosure. The specification and examples are intended to be exemplary only, and the true scope and spirit of the present disclosure are indicated by the appended claims.
Claims
1. A computing task scheduling method, characterized in that: include: Obtain resource requirements for the computing tasks to be scheduled; Get the remaining resources of each working node in the node list; When it is detected that the remaining amount of resources and the required amount of resources of the working node do not match each other, based on the relationship between the remaining amount of resources of the working node, the required amount of resources and a preset task scheduling threshold array, determining the adaptation node in the node list that is adapted to the computing task, including: based on the arrangement order of the working nodes in the node list, detecting one by one whether the resource difference and the task scheduling threshold array satisfy the scheduling rule, the resource difference is the difference between the remaining amount of resources of the working node and the required amount of resources, the working nodes are arranged in the node list based on a specified arrangement order, and the specified arrangement order is sorted from low to high based on resource utilization; when it is detected that the resource difference and the task scheduling threshold array satisfy the scheduling rule, determining the working node corresponding to the resource difference as the first adaptation node as the adaptation node; dispatching the computing task to the adapter node, The task scheduling threshold array is determined based on resource usage of historical tasks, and the scheduling rule is used to configure the resource utilization of the working node to be greater than the ratio threshold.
2. The computing task scheduling method according to claim 1, characterized in that: Before obtaining the resource requirements of the computing tasks to be scheduled, the following steps are also included: Determining an upper threshold and a lower threshold based on resource usage of the historical tasks; determining an intermediate value between the upper threshold and the lower threshold; The task scheduling threshold array is configured based on the upper threshold, the middle value and the lower threshold.
3. The computing task scheduling method according to claim 2, characterized in that: When it is detected that the resource difference value satisfies the scheduling rule with the task scheduling threshold array, determining the working node corresponding to the resource difference value as the first adaptation node comprises: When it is detected that the resource difference is greater than the upper threshold, it is determined that the resource difference and the task scheduling threshold array satisfy the scheduling rule, and the working node corresponding to the resource difference is determined as the first adaptation node.
4. The computing task scheduling method according to claim 2, characterized in that: The intermediate value includes a first intermediate value and a second intermediate value, and when it is detected that the resource difference value satisfies the scheduling rule with the task scheduling threshold array, determining the working node corresponding to the resource difference value as the first adaptation node further includes: When it is detected that the resource difference is greater than or equal to the second intermediate value and less than or equal to the first intermediate value, determining that the resource difference and the task scheduling threshold array satisfy the scheduling rule, and determining the working node corresponding to the resource difference as the first adaptation node; and Adjust the first adapter node to the first position of the node list, The first intermediate value and the second intermediate value are generated based on a quantile rule and the ratio threshold.
5. The computing task scheduling method according to claim 1, characterized in that: The determining, based on the relationship between the remaining amount of resources of the working node, the required amount of resources, and the task scheduling threshold array, of the adaptation node in the node list that is adapted to the computing task further includes: When it is detected that the resource difference value and the task scheduling threshold array do not satisfy the scheduling rule, a second adapter node satisfying the reference rule is determined to send the computing task to the second adapter node, The reference rule is used to adjust the resource difference of the second adapter node to meet the scheduling rule during subsequent computing task scheduling.
6. The computing task scheduling method according to any one of claims 1 to 5, characterized in that: Also includes: When it is detected that the remaining amount of resources of any of the working nodes matches the required amount of resources, the computing task is scheduled to any of the working nodes.
7. A computing task scheduling device, characterized in that: include: A first acquisition module is used to acquire the resource demand of the computing task to be scheduled; The second acquisition module is used to obtain the remaining amount of resources of each working node in the node list; A determination module, for determining, when it is detected that the remaining amount of resources of the working node and the required amount of resources do not match, an adaptation node in the node list that is adapted to the computing task based on the relationship between the remaining amount of resources of the working node, the required amount of resources and a preset task scheduling threshold array, comprising: based on the arrangement order of the working nodes in the node list, detecting one by one whether the resource difference and the task scheduling threshold array satisfy the scheduling rule, the resource difference being the difference between the remaining amount of resources of the working node and the required amount of resources, the working nodes being arranged in the node list based on a specified arrangement order, the specified arrangement order being sorted from low to high based on resource utilization; when it is detected that the resource difference and the task scheduling threshold array satisfy the scheduling rule, determining the working node corresponding to the resource difference as the first adaptation node as the adaptation node; A scheduling module, used to schedule the computing task to the adapter node, The task scheduling threshold array is determined based on resource usage of historical tasks, and the scheduling rule is used to configure the resource utilization of the working node to be greater than the ratio threshold.
8. An electronic device, characterized in that: include: processor; as well as A memory, configured to store executable instructions of the processor; The processor is configured to execute the computing task scheduling method according to any one of claims 1 to 6 by executing the executable instructions.
9. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the computing task scheduling method according to any one of claims 1 to 6 is implemented.
Citation Information
Patent Citations
Resource scheduling method and device in distributed system
CN108132840A
Task allocation method and apparatus for distributed system
CN108268318A