A resource scheduling method, apparatus and equipment

By obtaining the resource requirements of computing units and the target remaining resources of nodes in the scheduling system, resource allocation is optimized, solving the problem of low resource utilization in existing technologies and achieving efficient resource utilization and reduced fragmentation.

CN116263704BActive Publication Date: 2026-01-30CHINA MOBILE COMM LTD RES INST +1
View PDF 1 Cites 0 Cited by

Patent Information

Application Number
CN202111527723.3
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2021-12-14
Publication Date
2026-01-30
Estimated Expiration
2041-12-14

AI Technical Summary

Technical Problem

Existing dynamic load balancing resource scheduling methods result in low resource utilization and generate a lot of resource fragmentation, especially in deep learning training scenarios where expensive GPU resources are not fully utilized.

Method used

By obtaining the resource requirements of computing units and the target remaining resources of nodes in the scheduling system, including current remaining resources and resources occupied by low-priority computing units, high-priority computing units are prioritized to run on suitable nodes, and low-priority resources may be released or resources consolidated to meet the requirements.

Benefits of technology

It improved resource utilization, reduced resource fragmentation, optimized resource allocation among nodes, and enhanced the overall efficiency of resource utilization.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN116263704B_ABST
    Figure CN116263704B_ABST
Patent Text Reader

Abstract

This invention provides a resource scheduling method, apparatus, and device. The method includes: acquiring a first resource required by a first computing unit; acquiring a first resource whose target remaining resources of a node in a scheduling system can satisfy the needs of the first computing unit, wherein the target remaining resources include: the current remaining resources of the node and / or a second resource occupied by at least one second computing unit, the second computing unit having a lower priority than the first computing unit; and scheduling the first computing unit to run on the node according to the target remaining resources. This invention's solution schedules computing units using the target remaining resources of nodes in a scheduling system, improving node resource utilization and reducing node resource fragmentation.
Need to check novelty before this filing date? Find Prior Art

Description

TECHNICAL FIELD

[0001] The present application relates to the technical field of information processing, in particular to a resource scheduling method, device and equipment. BACKGROUND

[0002] The existing dynamic load balancing resource scheduling method tries to balance the load of each node as much as possible when scheduling, which may cause some resources not to be utilized in actual use, that is, more "resource fragments" will be generated. In the deep learning training scene, many tasks need expensive GPU resources to complete, and using this load balancing scheduling method will not fully use the expensive training resources, the resource utilization rate is not high, and waste is caused. SUMMARY

[0003] The technical problem to be solved by the present application is to provide a resource scheduling method, device and equipment to improve resource utilization and reduce the generation of resource fragments.

[0004] To solve the above technical problems, an embodiment of the present application provides a resource scheduling method, comprising:

[0005] obtaining a first resource required by a first computing unit;

[0006] obtaining target remaining resources of a node in a scheduling system, which can meet the first resource required by the first computing unit, the target remaining resources comprising: current remaining resources of the node and / or second resources occupied by at least one second computing unit, the priority of the second computing unit being lower than the priority of the first computing unit;

[0007] scheduling the first computing unit to run on the node according to the target remaining resources.

[0008] Optionally, scheduling the first computing unit to run on the node according to the target remaining resources comprises:

[0009] if the current remaining resources of the node can meet the first resource required by the first computing unit, scheduling the first computing unit to run on the node.

[0010] Optionally, scheduling the first computing unit to run on the node according to the target remaining resources further comprises:

[0011] If the current remaining resources of the node do not satisfy the first resources required by the first computing unit, and the node runs a second computing unit with a priority lower than the first computing unit, and the second resources occupied by the second computing unit satisfy the first resources required by the first computing unit, the second resources occupied by the second computing unit are released, and the first computing unit is scheduled to run on the node; or

[0012] If the sum of the second resources occupied by the second computing unit and the current remaining resources satisfies the first resources required by the first computing unit, the second resources occupied by the second computing unit are released, and the first computing unit is scheduled to run on the node.

[0013] Optionally, before the first computing unit is scheduled to run on the node, the method further comprises:

[0014] Obtaining the average of time intervals at which a plurality of first computing units arrive at a scheduling system and the average of scheduling time at which the scheduling system schedules the plurality of first computing units;

[0015] According to the average of time intervals and the average of scheduling time, obtaining the average waiting scheduling time of the plurality of first computing units;

[0016] According to the average waiting scheduling time, obtaining the proportion of the minimum resource remaining amount required by a node in the scheduling system to satisfy scheduling needs in the first resources;

[0017] According to the proportion, screening the node.

[0018] Optionally, according to the average of time intervals and the average of scheduling time, obtaining the average waiting scheduling time comprises:

[0019] According to the formula: obtaining the average waiting time;

[0020] wherein W q represents the average waiting time, and λ and μ are known parameters.

[0021] Optionally, according to the average waiting scheduling time, obtaining the proportion of the minimum resource remaining amount required by a node in the scheduling system to satisfy scheduling needs in the first resources comprises:

[0022] According to the formula: Y=k*W q +b, obtaining the proportion of the minimum resource remaining amount required by a node in the scheduling system to satisfy scheduling needs in the first resources;

[0023] wherein Y represents the proportion of the minimum resource remaining amount required by a node in the scheduling system to satisfy scheduling needs in the first resources, and k and b are known coefficients.

[0024] Optionally, the resource scheduling method further comprises:

[0025] obtaining a target residual resource usage score of each node in a scheduling system;

[0026] scheduling the first computing unit to a node whose resource usage score is higher than a preset value.

[0027] Embodiments of the present application also provide a resource scheduling device, which comprises:

[0028] a first obtaining module, configured to obtain first resources required by a first computing unit;

[0029] a second obtaining module, configured to obtain target residual resources of a node in a scheduling system, which can meet the first resources required by the first computing unit, wherein the target residual resources comprise current residual resources of the node and / or second resources occupied by at least one second computing unit, and the priority of the second computing unit is lower than that of the first computing unit;

[0030] a processing module, configured to schedule the first computing unit to the node according to the target residual resources, and run the first computing unit on the node.

[0031] Embodiments of the present application also provide a computing device, which comprises a processor and a memory storing a computer program, wherein the computer program is run by the processor to execute the method described above.

[0032] Embodiments of the present application also provide a computer readable storage medium, which stores instructions, and when the instructions are run on a computer, the computer executes the method described above.

[0033] The above scheme of the present application has at least the following beneficial effects:

[0034] By obtaining the first resources required by the first computing unit, and the target residual resources of the node in the scheduling system, which can meet the first resources required by the first computing unit, wherein the target residual resources comprise the current residual resources of the node and / or the second resources occupied by at least one second computing unit, and the priority of the second computing unit is lower than that of the first computing unit, and by scheduling the first computing unit to the node according to the target residual resources, and running the first computing unit on the node, the resource utilization rate of the node is improved, and the generation of resource fragmentation is reduced. BRIEF DESCRIPTION OF DRAWINGS

[0035] Figure 1 is a resource scheduling method flowchart provided by an embodiment of the present application;

[0036] Figure 2 is a resource scheduling method application scenario diagram provided by an embodiment of the present application;

[0037] Figure 3 is a resource scheduling method flow chart provided by an optional embodiment of the present application;

[0038] Figure 4 is a resource scheduling device structure schematic diagram provided by an embodiment of the present application. DETAILED DESCRIPTION

[0039] Exemplary embodiments of the present application will be described in detail with reference to the drawings. Although exemplary embodiments of the present application are shown in the drawings, it should be understood that the present application can be implemented in various forms and should not be limited by the embodiments set forth herein. Rather, these embodiments are provided so that this application will be thorough and complete, and will fully convey the scope of the application to those skilled in the art.

[0040] As shown in Figure 1 an embodiment of the present application provides a resource scheduling method, the method comprising:

[0041] Step 11, obtaining first resources required by a first computing unit;

[0042] Step 12, obtaining target remaining resources of a node in a scheduling system, which can satisfy the first resources required by the first computing unit, the target remaining resources including: current remaining resources of the node and / or second resources occupied by at least one second computing unit, the priority of the second computing unit being lower than the priority of the first computing unit;

[0043] Step 13, scheduling the first computing unit to run on the node according to the target remaining resources.

[0044] In this embodiment, while the scheduling system obtains the target remaining resources of the node, it also includes obtaining information matched between the node and the first computing unit, including but not limited to: whether the node contains a label specified by a label selector of the first computing unit, whether a port in a port list of the first computing unit is occupied in the node, and the like; in the scheduling system, there is at least one second computing unit on the node, and the priority of the at least one second computing unit is lower than the priority of the first computing unit;

[0045] The second resource is a resource occupied by at least one second computing unit on the node, the priority of the second computing unit is lower than that of the first computing unit, and the first computing unit can be preferentially scheduled to the node where the second computing unit is located. The current remaining resource can be greater than the first resource or less than the first resource, and the target remaining resource should be greater than or equal to the first resource, so that the first computing unit can be scheduled to the node, the utilization of the resource on the node is improved, and the generation of resource fragmentation on the node is reduced.

[0046] In an optional embodiment of the present application, the step 13 can include:

[0047] Step 131: If the current remaining resource of the node can meet the first resource required by the first computing unit, the first computing unit is scheduled to run on the node.

[0048] In this embodiment, when the current remaining resource of the node is greater than or equal to the size of the first resource required by the first computing unit, the first computing unit can be directly scheduled to run on the node;

[0049] Further, it further includes:

[0050] Step 132: If the current remaining resource of the node cannot meet the first resource required by the first computing unit, and the node runs a second computing unit with a priority lower than that of the first computing unit, when the second resource occupied by the second computing unit can meet the first resource required by the first computing unit, the second resource occupied by the second computing unit is released, and the first computing unit is scheduled to run on the node; or

[0051] When the sum of the second resource occupied by the second computing unit and the current remaining resource can meet the first resource required by the first computing unit, the second resource occupied by the second computing unit is released, and the first computing unit is scheduled to run on the node.

[0052] In the embodiment, when the current remaining resource is less than the size of the first resource required by the first computing unit, and the priority of the second computing unit on the node is lower than the priority of the first computing unit, if the second resource occupied by the second computing unit is greater than or equal to the first resource, or the sum of the second resource and the current remaining resource is greater than or equal to the first resource, the second resource occupied by the second computing unit is released, and the first computing unit is scheduled to the node, so as to improve the resource utilization of the node. When the sum of the second resource and the current remaining resource is greater than or equal to the first resource, the remaining resource of the node at the time when the first computing unit occupies the resource integrated after the second resource is released is less than the size of the corresponding remaining resource of the node before the second resource is released, and the generation of resource fragmentation on the node is further reduced.

[0053] As shown in an implementable application scenario, Figure 2 If preemption is not implemented, the first computing unit with high priority and requiring 400M memory cannot be scheduled on the node with only 300M memory left. If preemption is implemented, the target node can evict the second computing node with low priority and occupying 150M memory, so as to leave 450M memory, meet the scheduling requirement of the first computing node with high priority, and only leave 50M memory on the node after preemption, so as to reduce resource fragmentation and improve resource utilization.

[0054] In an optional embodiment of the present application, before the first computing unit is scheduled to the node to run, the method further comprises:

[0055] Step 21, obtaining the average of time intervals at which a plurality of first computing units arrive at a scheduling system and the average of scheduling time at which the scheduling system schedules the plurality of first computing units;

[0056] Step 22, obtaining the average waiting scheduling time of the plurality of first computing units according to the average of time intervals and the average of scheduling time;

[0057] Step 23, obtaining the proportion of the minimum resource remaining amount of a node in the scheduling system required to meet scheduling needs to the first resource according to the average waiting scheduling time;

[0058] Step 24, screening the node according to the proportion.

[0059] In the embodiment, when there are multiple first computing units to be scheduled in the scheduling system, and the multiple first computing units to be scheduled are queued according to priorities to wait for scheduling, the average waiting scheduling time is used to reflect the busy degree of the scheduling system, the time interval average of the first computing units to arrive at the scheduling system is obtained according to the time of each first computing unit to arrive at the scheduling system, and the scheduling time average is obtained according to the time required by the scheduler of the scheduling system to schedule each first computing unit. Preferably, the time interval average and the scheduling time average can be obtained by maximum likelihood estimation.

[0060] According to the average waiting scheduling time, the proportion of the minimum resource remaining amount required by the node to meet the scheduling requirement in the first resource is obtained. The greater the minimum resource remaining amount required by the node to meet the scheduling requirement, the less the proportion of the node selection that can meet the resource required by the first computing unit in the scheduling system, that is, the greater the proportion, the more busy the scheduling system is, and the scheduling of the remaining target resource of the node needs to be reasonably performed to avoid the node that does not meet the condition in the scheduling and improve the efficiency of subsequent scheduling.

[0061] Further, the average waiting scheduling time can be obtained according to the formula:

[0062] q wherein W represents the average waiting time, λ and μ are known parameters, and the average waiting scheduling time W q The greater the average waiting scheduling time W

[0063] Further, the proportion of the minimum resource remaining amount required by the node to meet the scheduling requirement in the first resource can be obtained according to the formula:

[0064] Y=k*W+b q wherein Y represents the proportion of the minimum resource remaining amount required by the node to meet the scheduling requirement in the first resource, and k and b are known coefficients.

[0065] When there are multiple first computing units to be scheduled, the scheduling system can be simulated as a queuing system, the input process of the queuing system has the characteristics of infinite tasks and random task arrival, and the tasks are queued based on priorities, and the scheduling system uses a scheduler to perform scheduling.

[0066] ​According to the queuing theory, the scheduling system can be modeled as an infinite-source queuing system at this time, and conforms to the M / M / 1 / ∞ model. According to the above model, the time interval of multiple first computing units arriving can be defined as subjecting to a negative exponential distribution with an expectation of 1 / λ, the time required for the scheduler of the scheduling system to schedule a first computing unit is subject to a negative exponential distribution with a parameter μ, and ρ = λ / μ is called the service intensity. In specific use, the values of λ and μ can be intercepted for a queue in which multiple first computing units are queued, and the average time interval of first computing units arriving and the average scheduling time are counted. According to the related theory of operational research, when a first computing unit enters the waiting queue, the probability of there being n first computing units in the queue is p n , the average scheduling time of each first computing unit is 1 / μ, so the average waiting time of this first computing unit is n / μ, that is, the calculation formula of the average waiting scheduling time is satisfied:

[0067]

[0068] , wherein According to the average waiting scheduling time, the proportion Y of the minimum resource remaining amount required by the node to meet the scheduling needs in the first resource is obtained, and the function relationship is established as follows:

[0069] First step: let X represent the minimum resource remaining amount required by the node to meet the scheduling needs, then the greater X is, the smaller the proportion of the node meeting the condition is, that is, X and W q are positively correlated;

[0070] Second step: let Y represent the proportion of the minimum resource remaining amount required by the node to meet the scheduling needs in the first resource amount of the first computing unit, that is, Y = X ÷ S request ; in the formula, S request is the first resource amount required by the first computing unit,

[0071] Third step: since X and W q are positively correlated, X and Y are positively correlated, then Y and W q are positively correlated, which can be expressed as Y = kW q +b, after the function relationship of Y and W q is solved, the proportion of the minimum resource remaining amount required by the node to meet the scheduling needs in the first resource amount of the first computing unit can be calculated according to the average waiting scheduling time of the first computing unit, and the greater the result is, the smaller the proportion of the node meeting the condition is.

[0072] In an optional embodiment of the present application, the above steps 21 to 24 further include:

[0073] Step 25: obtaining the target remaining resource usage score of each node in the scheduling system;

[0074] Step 26, the first computing unit is scheduled to a node whose resource usage score is higher than a preset value.

[0075] In this embodiment, by obtaining the score of the resource usage of a node, and according to the actual application requirement, when the score is higher than a preset value, the node corresponding to the score is defined as an optimal node, and when performing resource scheduling, the scheduler will schedule the first computing unit on the optimal node according to the score, so as to realize the node load saturation scheduling strategy.

[0076] Preferably, the score function of the resource usage of a node is implemented as follows:

[0077] Firstly, the resource occupation amount A of all running second computing units on each node in the scheduling system is calculated;

[0078] Secondly, the node resource occupation amount B of all running second computing units on each node in the scheduling system is calculated;

[0079] Thirdly, assuming that C is the node resource calculation capability and D is the node resource size, the node score score calculation function is:

[0080] The calculated node score is an integer from 0 to 10, and the greater the current node resource usage, the higher the score, which means that the node is more likely to receive a new first computing unit. By calculating the node resource usage score, the node load saturation scheduling optimization strategy is realized.

[0081] Taking the CPU occupation amount as an example, the above embodiment is described as follows: the CPU occupation amount totalCPU of all running second computing units on the candidate node is calculated; the memory occupation amount totalMemory of all running second computing units on the candidate node is calculated; assuming that nodeCPU is the node CPU calculation capability and nodeMemory is the node memory size, the node score calculation function is:

[0082]

[0083] The node score calculated by the above formula is an integer from 0 to 10, and a series of nodes meeting the scheduling requirement of the first computing unit can be obtained by pre-selection. When optimizing, the scheduler will calculate the score of each candidate node according to the optimization strategy, and the node with the highest score is the optimal node when scheduling. The scheduler will schedule the Pod on the optimal node.

[0084] The above method will be described below based on the Kubernetes container orchestration system as an example. The system includes a worker node node, and a computing unit Pod needs to be scheduled on a certain node to run.Figure 3 The specific steps are as follows:

[0085] Step 31: Obtain the node list and compute unit Pod information (including label matching and port matching), and preselect to filter out the node set matching the Pod;

[0086] Step 32: Calculate the preemption node ratio based on queuing theory: Since the node node that does not meet the Pod request resource needs to be screened again to determine whether it meets the preemption condition, it will inevitably bring additional time overhead. Therefore, when the business is busy and there are many Pods to be scheduled, the ratio of nodes executing the preemption resource preselection strategy should be limited. According to the queuing system simulated by the scheduling system, the average waiting scheduling time of each compute unit Pod is obtained. According to the average waiting scheduling time and the average waiting scheduling time in the system, the minimum resource remaining amount of the node meeting the scheduling needs in the scheduling system accounts for the proportion Y of the first resource. The larger the Y result is, the smaller the node preselection ratio is. The value of the proportion Y can be determined according to the actual application situation to ensure the efficiency of the scheduling.

[0087] Step 33: Execute the preselection strategy based on preemption resources to obtain a feasible node list: According to the proportion Y, the feasible working node node list that can meet the scheduling needs of the compute unit Pod is obtained by screening the node set in step 31 again.

[0088] Step 34: Execute the load saturation scheduling optimization strategy to score each node: In the feasible working node node list obtained in step 33, the resource usage score of each node is calculated. The higher the resource usage score is, the less the remaining resource of the current working node node is.

[0089] Step 35: Schedule the compute unit Pod to the node with the highest score to complete the scheduling of the compute unit Pod, so as to fully utilize the current node resource and improve the node resource utilization rate.

[0090] In the above embodiments, when the resource of the working node node is insufficient for the high-priority Pod request, the low-priority Pod with a small amount of used resource is evicted to free up resources for the high-priority Pod, and the node resource usage rate is improved after the preemption, and the resource fragmentation is reduced; at the same time, based on the queuing theory, the average waiting scheduling time of the Pod can be estimated, and the node ratio of the preemption strategy is calculated based on the average waiting scheduling time of the Pod, so as to avoid the result that the scheduling efficiency is reduced due to large preemption time overhead; in addition, the optimal node is determined by calculating the node resource usage score, so that when the node is selected, the node with the highest score, that is, the node with the least remaining resources, is selected, so that the Pod is more easily scheduled to these nodes, the node resources are fully utilized, and the node resource utilization rate is improved.

[0091] As shown in Figure 4 Embodiments of the present application also provide an image processing device 40, the device 40 comprising:

[0092] A first acquisition module 41 is configured to acquire first resources required by a first computing unit;

[0093] A second acquisition module 42 is configured to acquire target remaining resources of a node in a scheduling system, the target remaining resources being capable of meeting the first resources required by the first computing unit, the target remaining resources comprising current remaining resources of the node and / or second resources occupied by at least one second computing unit, the priority of the second computing unit being lower than the priority of the first computing unit;

[0094] A processing module 43 is configured to schedule the first computing unit to run on the node according to the target remaining resources.

[0095] Optionally, the processing module 43 is configured to schedule the first computing unit to run on the node according to the target remaining resources, and the scheduling comprises:

[0096] If the current remaining resources of the node are capable of meeting the first resources required by the first computing unit, the first computing unit is scheduled to run on the node.

[0097] Optionally, the processing module 43 is configured to schedule the first computing unit to run on the node according to the target remaining resources, and the scheduling further comprises:

[0098] If the current remaining resources of the node are not capable of meeting the first resources required by the first computing unit, and the node runs a second computing unit with a priority lower than the first computing unit, and the second resources occupied by the second computing unit are capable of meeting the first resources required by the first computing unit, the second resources occupied by the second computing unit are released, and the first computing unit is scheduled to run on the node; or

[0099] When the sum of the second resource occupied by the second computing unit and the current remaining resource meets the first resource required by the first computing unit, the second resource occupied by the second computing unit is released, and the first computing unit is scheduled to run on the node.

[0100] Optionally, before the first computing unit is scheduled to run on the node, the processing module 43 further comprises:

[0101] obtaining the average of time intervals at which a plurality of first computing units arrive at the scheduling system and the average of scheduling time at which the scheduling system schedules the plurality of first computing units;

[0102] obtaining the average waiting scheduling time of the plurality of first computing units according to the average of time intervals and the average of scheduling time;

[0103] obtaining the proportion of the minimum resource remaining amount required by the node to meet the scheduling need in the first resource according to the average waiting scheduling time;

[0104] screening the node according to the proportion.

[0105] Optionally, obtaining the average waiting scheduling time according to the average of time intervals and the average of scheduling time comprises:

[0106] obtaining the average waiting time according to the formula:

[0107] wherein W q represents the average waiting time, and λ and μ are known parameters.

[0108] Optionally, obtaining the proportion of the minimum resource remaining amount required by the node to meet the scheduling need in the first resource according to the average waiting scheduling time comprises:

[0109] obtaining the proportion of the minimum resource remaining amount required by the node to meet the scheduling need in the first resource according to the formula: Y=k*W q +b;

[0110] wherein Y represents the proportion of the minimum resource remaining amount required by the node to meet the scheduling need in the first resource, and k and b are known coefficients.

[0111] Optionally, the method further comprises: obtaining the target resource usage score of each node in the scheduling system;

[0112] scheduling the first computing unit to the node whose resource usage score is higher than a preset value.

[0113] ​It should be noted that the device corresponds to the method described above, and the device can also be a scheduler in the scheduling system described in the method. All implementation manners in the method embodiments are applicable to the device embodiments, and the same technical effects can also be achieved.

[0114] The embodiments of the present application also provide a computing device, comprising a processor and a memory storing a computer program, when the computer program is run by the processor, the method described above is executed. All implementation manners in the method embodiments are applicable to this embodiment, and the same technical effects can also be achieved.

[0115] The embodiments of the present application also provide a computer readable storage medium, comprising instructions, when the instructions are run on a computer, the computer executes the method described above. All implementation manners in the method embodiments are applicable to this embodiment, and the same technical effects can also be achieved.

[0116] Those skilled in the art can understand that the units and algorithm steps of the examples described in combination with the embodiments disclosed herein can be realized by electronic hardware or a combination of computer software and electronic hardware. Whether the functions are realized in hardware or software mode depends on the specific application and design constraints of the technical solution. The skilled person can use different methods to realize the described functions for each specific application, but such implementation should not be considered beyond the scope of the present application.

[0117] Those skilled in the art can clearly understand that, for the convenience and brevity of the description, the specific working process of the system, device and unit described above can refer to the corresponding process in the foregoing method embodiments, which will not be repeated here.

[0118] In the embodiments provided by the present application, it should be understood that the disclosed device and method can be implemented by other ways. For example, the device embodiments described above are only schematic, and the division of the units is only a logical function division, and there can be another division manner in actual implementation, for example, a plurality of units or components can be combined or integrated into another system, or some features can be ignored or not executed. In addition, the displayed or discussed mutual couplings or direct couplings or communication connections between the units can be indirect couplings or communication connections through some interfaces, devices or units, and can be electrical, mechanical or other forms.

[0119] The units described as separate components can or can not be physically separate, and the components displayed as units can or can not be physical units, that is, they can be located in one place, or can be distributed on a plurality of network units. Some or all of the units can be selected according to actual needs to achieve the purpose of the embodiment scheme.

[0120] In addition, each functional unit in various embodiments of the present application can be integrated in one processing unit, or each unit can exist physically, or two or more units can be integrated in one unit.

[0121] If the functions are realized in the form of software functional units and sold or used as independent products, they can be stored in a computer readable storage medium. Based on this understanding, the technical solutions of the present application essentially or the parts that make contributions to the prior art or parts of the technical solutions can be embodied in the form of software products. The computer software products are stored in a storage medium and include a number of instructions for making a computer device (which can be a personal computer, a server, or a network device, etc.) execute all or part of the steps of the methods described in various embodiments of the present application. The aforementioned storage medium includes a variety of storage media that can store program codes, such as a U disk, a mobile hard disk, a ROM, a RAM, a magnetic disk or an optical disk, etc.

[0122] In addition, it should be noted that in the device and method of the present application, it is obvious that each component or each step can be decomposed and / or recombined. These decompositions and / or recombination should be considered as equivalent solutions of the present application. And the steps of executing the above series of processes can naturally be executed in time sequence according to the order of description, but it is not necessary to be executed in time sequence. Some steps can be executed in parallel or independently of each other. It can be understood by those skilled in the art that all or any steps or components of the method and device of the present application can be realized in hardware, firmware, software or their combination in any computing device (including processors, storage media, etc.) or network of computing devices, which can be realized by those skilled in the art with their basic programming skills after reading the description of the present application.

[0123] Therefore, the purpose of the present application can also be realized by running a program or a group of programs on any computing device. The computing device can be a commonly known general-purpose device. Therefore, the purpose of the present application can also be realized only by providing a program product containing program code for realizing the method or device. That is, such a program product also constitutes the present application, and the storage medium storing such a program product also constitutes the present application. Obviously, the storage medium can be any commonly known storage medium or any storage medium developed in the future. It should be noted that in the device and method of the present application, it is obvious that each component or each step can be decomposed and / or recombined. These decompositions and / or recombination should be considered as equivalent solutions of the present application. And the steps of executing the above series of processes can naturally be executed in time sequence according to the order of description, but it is not necessary to be executed in time sequence. Some steps can be executed in parallel or independently of each other.

[0124] The above describes the preferred embodiments of the present application. It should be noted that, for those skilled in the art, several improvements and refinements can be made without departing from the principles of the present application, and these improvements and refinements should also be considered as falling within the scope of the present application.

Claims

1. A resource scheduling method, characterized in that, The method comprises: obtaining first resources required by a first computing unit; obtaining target remaining resources of a node in a scheduling system, the target remaining resources being capable of meeting the first resources required by the first computing unit, the target remaining resources comprising current remaining resources of the node and / or second resources occupied by at least one second computing unit, the priority of the second computing unit being lower than the priority of the first computing unit; scheduling the first computing unit to run on the node according to the target remaining resources; before scheduling the first computing unit to run on the node, the method further comprises: obtaining an average of time intervals at which a plurality of first computing units arrive at the scheduling system and an average of scheduling time at which the scheduling system schedules the plurality of first computing units; obtaining an average waiting scheduling time of the plurality of first computing units according to the average of time intervals and the average of scheduling time; obtaining a proportion of a minimum resource remaining amount required by the node to meet scheduling needs in the scheduling system in the first resources according to the average waiting scheduling time; screening the node according to the proportion; wherein the obtaining of the proportion of the minimum resource remaining amount required by the node to meet scheduling needs in the scheduling system in the first resources according to the average waiting scheduling time comprises: According to the formula: , the minimum resource remaining amount satisfying the scheduling requirement of the node in the scheduling system accounts for the proportion of the first resource, wherein Y represents the proportion of the minimum resource remaining amount satisfying the scheduling requirement to the first resource, k and b are both known coefficients, W q represents the average waiting time.

2. The method of claim 1, wherein, the scheduling of the first computing unit to run on the node according to the target remaining resources comprises: if the current remaining resources of the node are capable of meeting the first resources required by the first computing unit, scheduling the first computing unit to run on the node.

3. The method of claim 2, wherein, The method further comprises: if the current remaining resources of the node do not meet the first resources required by the first computing unit, and the node runs a second computing unit having a priority lower than the first computing unit, and second resources occupied by the second computing unit meet the first resources required by the first computing unit, releasing the second resources occupied by the second computing unit and scheduling the first computing unit to run on the node; or if the sum of the second resources occupied by the second computing unit and the current remaining resources meets the first resources required by the first computing unit, releasing the second resources occupied by the second computing unit and scheduling the first computing unit to run on the node. The obtaining of the average waiting scheduling time according to the average of time intervals and the average of scheduling time comprises:

4. The method of claim 1, wherein, The method further comprises: According to the formula: the average waiting time is obtained; where λ, μ are known parameters.

5. The method of claim 1, wherein, obtaining a usage score of target remaining resources of each node in the scheduling system; scheduling the first computing unit to the node having a usage score higher than a preset value. The apparatus comprises:

6. A resource scheduling apparatus, characterized by comprising: a first obtaining module configured to obtain first resources required by a first computing unit; a second obtaining module configured to obtain target remaining resources of a node in a scheduling system, the target remaining resources being capable of meeting the first resources required by the first computing unit, the target remaining resources comprising current remaining resources of the node and / or second resources occupied by at least one second computing unit, the priority of the second computing unit being lower than the priority of the first computing unit; a processing module configured to schedule the first computing unit to run on the node according to the target remaining resources. ​ The processing module is further configured to: obtain a mean time interval of a plurality of first computing units arriving at a scheduling system and a mean scheduling time of the scheduling system scheduling the plurality of first computing units; obtain an average waiting scheduling time of the plurality of first computing units according to the mean time interval and the mean scheduling time; obtain a proportion of a minimum resource remaining amount of a node in the scheduling system satisfying scheduling needs in the first resource according to the average waiting scheduling time; screen the node according to the proportion; wherein the obtaining the proportion of the minimum resource remaining amount of the node in the scheduling system satisfying the scheduling needs in the first resource according to the average waiting scheduling time comprises: According to the formula: , the proportion of the minimum resource surplus amount of the node in the scheduling system satisfying the scheduling requirement to the first resource is obtained, wherein Y represents the proportion of the minimum resource surplus amount of the node satisfying the scheduling requirement to the first resource, k and b are both known coefficients, W q represents the average waiting time.

7. A computing device, comprising: comprises: a processor and a memory storing a computer program, the computer program being executed by the processor to perform the method of any one of claims 1 to 5.

8. A computer-readable storage medium, characterized in that, a storage instruction, when the instruction is executed on a computer, causes the computer to perform the method of any one of claims 1 to 5.

Citation Information

Patent Citations

  • Cluster resource scheduling method and device, medium and computing equipment

    CN111625339A