Job scheduling method, system, device, computer equipment and storage medium

By transferring high-priority jobs to low-priority queues and optimizing the scheduling cycle in the SLURM scheduling system, the problem of starvation of low-priority jobs caused by scheduling failure of high-priority jobs is solved, and the throughput and robustness of the system are improved.

CN113590289BActive Publication Date: 2024-09-06DAWNING INT INFORMATION IND CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202110869517.4
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2021-07-30
Publication Date
2024-09-06
Estimated Expiration
2041-07-30

AI Technical Summary

Technical Problem

When high-priority jobs cannot obtain resources, the existing SLURM scheduling system causes low-priority jobs to be in a starvation state, and the system throughput and robustness are insufficient.

Method used

By scheduling in the SLURM scheduling system according to the priority of the job queue and the priority of the job to be scheduled, if there is a job that fails to be scheduled in the current job queue, it will be transferred to the first target job with a priority lower than the current job queue. queue, and schedule according to the priority of the remaining jobs to be scheduled, ensuring that low-priority jobs are scheduled in time and optimizing the scheduling mechanism.

Benefits of technology

It effectively avoids the starvation state of low-priority jobs caused by high-priority job scheduling failures, improves the throughput and robustness of the SLURM scheduling system, and ensures the timely scheduling of low-priority jobs and the priority of high-priority jobs.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN113590289B
    Figure CN113590289B
Patent Text Reader

Abstract

The present application relates to a method, system, device, computer equipment and storage medium for job scheduling. The method includes: a SLURM scheduling system performs scheduling according to the priority of each job queue and the priority of the jobs to be scheduled in each job queue. During the job scheduling process, if there is a job that fails to be scheduled in the current job queue, the job that fails to be scheduled is transferred to the first target job queue, and the jobs in the current job queue are scheduled according to the priority of the remaining jobs to be scheduled in the current job queue. Among them, the priority of the first target job queue is lower than that of the current job queue. In this method, the SLURM scheduling system transfers the high-priority jobs that fail to be scheduled to the low-priority queue in a timely manner, effectively ensuring that the low-priority jobs in the queue at this level are scheduled in a timely manner, avoiding the problem that the low-priority jobs cannot be scheduled and are in a hungry state due to the failure of scheduling the high-priority jobs, and improving the throughput and robustness of the SLURM scheduling system.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of computer technology, and in particular to a job scheduling method, system, device, computer equipment and storage medium. Background Art

[0002] SLURM is an open source, fault-tolerant, and highly scalable cluster job scheduling system that supports the management and allocation of multiple resources, including CPU, memory, GPU, etc. It also supports the configuration of job scheduling in the system. When scheduling jobs in a waiting state, the SLURM system focuses on the priority of the job. If a high-priority job cannot obtain resources and be scheduled, then the low-priority job will not be scheduled and will be in a hungry state.

[0003] The SLURM scheduling system of the prior art provides a multi-factor scheduling method, which calculates the multi-factor parameters corresponding to each job based on the jobs in the waiting queue, redefines the priority of each job based on the calculated multi-factor parameters of each job, and then completes the scheduling of the job based on the new priority.

[0004] However, the scheduling mechanism of the above scheduling method is still retained, that is, the above scheduling method still has the problem that if high-priority jobs cannot obtain resources and be scheduled, low-priority jobs cannot be scheduled and are thus in a starvation state. Summary of the invention

[0005] Based on this, it is necessary to provide a job scheduling method, system, device, computer equipment and storage medium that can improve the job scheduling mechanism in response to the above technical problems.

[0006] In a first aspect, a job scheduling method is provided, the method comprising:

[0007] Scheduling is performed based on the priority of each job queue in the SLURM scheduling system and the priority of the jobs to be scheduled in each job queue;

[0008] During the job scheduling process, if there is a job that fails to be scheduled in the current job queue, the job that fails to be scheduled is transferred to the first target job queue; the priority of the first target job queue is lower than that of the current job queue;

[0009] Schedule the jobs in the current job queue according to the priorities of the remaining jobs to be scheduled in the current job queue.

[0010] In this embodiment, the SLURM scheduling system will transfer the high-priority jobs that failed to be scheduled to the low-priority queue in a timely manner, which can effectively ensure that the low-priority jobs in the queue at this level are scheduled in a timely manner, avoiding the problem of low-priority jobs being unable to be scheduled and being in a starvation state due to the failure of high-priority job scheduling, and at the same time improve the throughput and robustness of the SLURM scheduling system.

[0011] In one of the optional embodiments, the method further comprises:

[0012] Get the priority of all jobs to be scheduled in the SLURM scheduling system;

[0013] According to the priorities of all jobs to be scheduled, a plurality of job queues with different priorities are divided; each job queue includes at least one job to be scheduled.

[0014] In this embodiment, the job scheduling system obtains the priority of each job to be scheduled, and determines the corresponding job queue according to the priority of each job to be scheduled, so that in the subsequent job scheduling process, the job is scheduled according to the priority of the job queue and the priority of the job, thereby improving the job scheduling mechanism.

[0015] In one of the optional embodiments, the method further comprises:

[0016] If there are no remaining jobs to be scheduled in the current job queue, the jobs to be scheduled in the first target job queue are scheduled; the priority of the job that fails to be scheduled is greater than the priority of the original job to be scheduled in the first target job queue.

[0017] In this embodiment, the job scheduling system will transfer a high-priority job in the waiting resource queue to a low-priority queue if multiple scheduling fails, and maintain its corresponding priority, so as to facilitate priority scheduling of the job in the low-priority queue, thereby ensuring the scheduling priority of the high-priority job.

[0018] In one of the optional embodiments, the method further comprises:

[0019] The scheduling period of each job queue is determined according to job queues of different priorities; the higher the priority of the job queue, the shorter the scheduling period.

[0020] In this embodiment, when determining job queues with different priorities, the job scheduling system sets a corresponding scheduling cycle for each job queue, and the scheduling of queues with different priorities are independent of each other, thereby reducing the scope and time of high-priority jobs that have been waiting for resources blocking other low-priority jobs.

[0021] In one of the optional embodiments, the method further comprises:

[0022] If the scheduling duration of the current job queue is greater than the duration corresponding to the scheduling period of the current job queue, the to-be-scheduled jobs in the current job queue are transferred to the second target job queue; the priority of the second target job queue is higher than that of the current job queue.

[0023] In this embodiment, when the scheduling duration of the current job queue is greater than the duration corresponding to the scheduling period of the current job queue, the job scheduling system transfers the to-be-scheduled jobs in the current job queue to the second target job queue, so that the job scheduling system can adjust the unscheduled jobs in a timely manner, thereby optimizing the job scheduling mechanism of the job scheduling system and improving the job scheduling throughput of the job scheduling system.

[0024] In one of the optional embodiments, the method further comprises:

[0025] If there are at least two job queues whose scheduling durations are both greater than the duration corresponding to the scheduling period, the job queues are re-divided according to the priorities of all jobs to be scheduled.

[0026] In this embodiment, when there are at least two job queues whose scheduling durations are greater than the duration corresponding to the scheduling cycle, the job scheduling system re-divides the job queues according to the priorities of all jobs to be scheduled, so that the job scheduling system can adjust the unscheduled jobs in a timely manner, optimize the job scheduling mechanism of the job scheduling system, and improve the job scheduling throughput of the job scheduling system.

[0027] In a second aspect, a job scheduling system is provided, the job scheduling system comprising a plurality of job queues of different priorities; each job queue comprises at least one to-be-scheduled job corresponding to the priority of the job queue;

[0028] The system is used to execute any one of the job scheduling methods provided in the first aspect.

[0029] In a third aspect, a job scheduling device is provided, the device comprising:

[0030] The scheduling module is used to schedule according to the priority of each job queue in the SLURM scheduling system and the priority of the jobs to be scheduled in each job queue;

[0031] The transfer module is used to transfer the failed-scheduled jobs to the first target job queue during the job scheduling process if there are failed-scheduled jobs in the current job queue; the priority of the first target job queue is lower than that of the current job queue;

[0032] The scheduling module is also used to schedule the jobs in the current job queue according to the priorities of the remaining jobs to be scheduled in the current job queue.

[0033] In a fourth aspect, a computer device is provided, comprising a memory and a processor, wherein the memory stores a computer program, and the processor implements any of the methods described in the first aspect when executing the computer program.

[0034] According to a fifth aspect, a computer-readable storage medium is provided, on which a computer program is stored. When the computer program is executed by a processor, any method described in the first aspect is implemented.

[0035] The above-mentioned job scheduling method, system, device, computer equipment and storage medium, the SLURM scheduling system performs scheduling according to the priority of each job queue and the priority of the jobs to be scheduled in each job queue. During the job scheduling process, if there is a job that fails to be scheduled in the current job queue, the job that fails to be scheduled is transferred to the first target job queue, and the jobs in the current job queue are scheduled according to the priority of the remaining jobs to be scheduled in the current job queue. Among them, the priority of the first target job queue is lower than that of the current job queue. In this method, the SLURM scheduling system transfers the high-priority jobs that fail to be scheduled to the low-priority queue in a timely manner, which can effectively ensure that the low-priority jobs in the queue at this level are scheduled in a timely manner, avoiding the problem that the low-priority jobs cannot be scheduled and are in a hungry state due to the failure of scheduling high-priority jobs, and at the same time improves the throughput and robustness of the SLURM scheduling system. BRIEF DESCRIPTION OF THE DRAWINGS

[0036] Figure 1 An application environment diagram of a job scheduling method in an embodiment;

[0037] Figure 2 A schematic diagram of a process flow of a job scheduling method in one embodiment;

[0038] Figure 3 A schematic diagram of a process flow of a job scheduling method in one embodiment;

[0039] Figure 4 A schematic diagram of a process flow of a job scheduling method in one embodiment;

[0040] Figure 5 is a structural block diagram of a job scheduling device in one embodiment;

[0041] Figure 6 is a structural block diagram of a job scheduling device in one embodiment;

[0042] Figure 7 1 is a structural block diagram of a job scheduling device in one embodiment. DETAILED DESCRIPTION

[0043] In order to make the purpose, technical solution and advantages of the present application more clearly understood, the present application is further described in detail below in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain the present application and are not used to limit the present application.

[0044] The job scheduling method provided in this application can be applied to Figure 1 In one embodiment, a computer device is provided, which may be a server, in which a job scheduling system is deployed, and its internal structure diagram may be as shown in FIG. Figure 1 As shown. The computer device includes a processor, a memory, a communication interface, a display screen and an input device connected through a system bus. Among them, the processor of the computer device is used to provide computing and control capabilities. The memory of the computer device includes a non-volatile storage medium and an internal memory. The non-volatile storage medium stores an operating system and a computer program. The internal memory provides an environment for the operation of the operating system and the computer program in the non-volatile storage medium. The communication interface of the computer device is used to communicate with an external terminal in a wired or wireless manner, and the wireless manner can be achieved through WIFI, an operator network, NFC (near field communication) or other technologies. When the computer program is executed by the processor, a job scheduling method is implemented. The display screen of the computer device can be a liquid crystal display screen or an electronic ink display screen, and the input device of the computer device can be a touch layer covered on the display screen, or a key, trackball or touchpad set on the computer device housing, or an external keyboard, touchpad or mouse, etc.

[0045] Those skilled in the art will understand that Figure 1 The structure shown in the figure is only a block diagram of a part of the structure related to the solution of the present application, and does not constitute a limitation on the computer device to which the solution of the present application is applied. The specific computer device may include more or fewer components than those shown in the figure, or combine certain components, or have a different arrangement of components.

[0046] The job scheduling system provided in this embodiment includes a plurality of job queues with different priorities; each job queue includes at least one to-be-scheduled job corresponding to the priority of the job queue.

[0047] In this embodiment, for example, the job scheduling system can be a SLURM scheduling system, which includes N job queues, and the priorities are job queues L1 to job queues Ln from high to low. The job scheduling system adopts time-sharing polling scheduling, and job queues L1 to Ln are set in sequence. According to the order of priority, the scheduling cycle is shortened proportionally; the jobs to be scheduled in each job queue are sorted according to priority, with higher priority jobs in front and lower priority jobs in the back, and higher priority jobs will be scheduled first; if the jobs to be scheduled in the high-priority job queue do not have sufficient resources, that is, the scheduling of the jobs to be scheduled in the high-priority job queue fails, then the jobs that failed to be scheduled are placed in the next-level queue to wait for scheduling, for example, the jobs that failed to be scheduled in the L1 queue are transferred to the L2 queue.

[0048] Furthermore, in order to ensure that low-priority jobs in the job queue are scheduled within the scheduling cycle, the job scheduling system can set a timer T, with time intervals from L2 to Ln ranging from T1 to Tn-1. The time interval setting can be set as a multiple of 2 or other specific regular values. If the to-be-scheduled job in the lower-level job queue is not scheduled within the timer Tx, the job scheduling system will transfer the job to the upper-level queue to ensure that the job can be scheduled in a timely manner.

[0049] In addition, when scheduling the pending jobs in the current job queue, the SLURM system transfers each job that fails to be scheduled to a lower priority queue, and optionally maintains the corresponding priority value of the job to facilitate priority scheduling of the job in the low priority queue.

[0050] During the process of job scheduling, the above-mentioned job scheduling system timely transfers the high-priority jobs that failed to be scheduled to the low-priority queue, which can effectively ensure that the low-priority jobs in the queue at this level are scheduled in time, avoiding the problem that the low-priority jobs cannot be scheduled and are in a hungry state due to the failure of high-priority job scheduling, and at the same time improves the throughput and robustness of the SLURM scheduling system. In addition, when transferring the failed-scheduled jobs to the low-priority queue, their corresponding priorities are maintained, so that the jobs can be scheduled preferentially in the low-priority queue, ensuring the priority of scheduling the high-priority jobs. In addition, the polling period of the low-priority queue will be longer than the high-priority polling time, and the scheduling of queues with different priorities is unrelated to each other, thereby reducing the scope and time of the high-priority jobs that have been waiting for resources hindering other low-priority jobs.

[0051] The following will explain in detail the technical solution of the present application and how the technical solution of the present application solves the above-mentioned technical problems through embodiments and in combination with the accompanying drawings. The following specific embodiments can be combined with each other, and the same or similar concepts or processes may not be repeated in some embodiments. It should be noted that the present application Figure 2-Figure 4 The job scheduling method provided in the embodiment is executed by a job scheduling system or a job scheduling device, and the job scheduling device can become part or all of the job scheduling system through software, hardware, or a combination of software and hardware. In the following method embodiments, the execution subject is taken as an example to illustrate.

[0052] In one embodiment, Figure 2 As shown, a job scheduling method is provided, which involves a job scheduling system that performs scheduling according to the priority of each job queue in the SLURM scheduling system and the priority of the jobs to be scheduled in each job queue. During the job scheduling process, if there is a job that fails to be scheduled in the current job queue, the job that fails to be scheduled is transferred to the first target job queue, and the process of scheduling the jobs in the current job queue according to the priority of the remaining jobs to be scheduled in the current job queue includes the following steps:

[0053] S201 , scheduling is performed according to the priority of each job queue in the SLURM scheduling system and the priority of the job to be scheduled in each job queue.

[0054] In this embodiment, the job scheduling system may be a SLURM scheduling system, and the job scheduling system performs scheduling according to the priorities of all job queues determined in the system and the priorities of each job to be scheduled in each job queue, wherein the priority order of the job queues may be job queues L1, L2,..., Ln, and the job scheduling system allocates resources to the jobs to be scheduled in each job queue to implement job scheduling.

[0055] S202: During the job scheduling process, if there are jobs that fail to be scheduled in the current job queue, the jobs that fail to be scheduled are transferred to the first target job queue.

[0056] The priority of the first target job queue is lower than that of the current job queue.

[0057] In this embodiment, when the job scheduling system is scheduling the jobs to be scheduled in the current job queue, if there is a situation where the current job to be scheduled cannot obtain resources, that is, the scheduling of the current job to be scheduled fails, in order not to affect the normal scheduling of other jobs to be scheduled in the current job queue, the job scheduling system can transfer the failed job to a first target job queue with a lower priority than the current job queue. Optionally, the first target job queue can be a job queue with the next priority of the current job queue, or it can be other job queues with a lower priority than the current job queue.

[0058] S203: Schedule the jobs in the current job queue according to the priorities of the remaining jobs to be scheduled in the current job queue.

[0059] In this embodiment, after transferring the failed job to the first target job queue, the job scheduling system continues to schedule the job according to the priority of other remaining jobs to be scheduled in the current job queue, thereby ensuring the timeliness of scheduling other jobs to be scheduled.

[0060] In the above-mentioned job scheduling method, the SLURM scheduling system performs scheduling according to the priority of each job queue and the priority of the jobs to be scheduled in each job queue. During the job scheduling process, if there is a job that fails to be scheduled in the current job queue, the job that fails to be scheduled is transferred to the first target job queue, and the jobs in the current job queue are scheduled according to the priority of the remaining jobs to be scheduled in the current job queue. Among them, the priority of the first target job queue is lower than that of the current job queue. In this method, the SLURM scheduling system transfers the high-priority jobs that fail to be scheduled to the low-priority queue in a timely manner, which can effectively ensure that the low-priority jobs in the queue at this level are scheduled in a timely manner, avoiding the problem that the low-priority jobs cannot be scheduled and are in a hungry state due to the failure of scheduling the high-priority jobs, and at the same time improves the throughput and robustness of the SLURM scheduling system.

[0061] Before the job scheduling system performs job scheduling, the job scheduling system needs to divide the priorities and priority queues according to all the jobs to be scheduled. In one optional embodiment, Figure 3 As shown, the method also includes:

[0062] S301. Obtain the priorities of all jobs to be scheduled in the SLURM scheduling system.

[0063] In this embodiment, the job scheduling system obtains job information of all jobs to be scheduled in the system, such as job identification, job attributes, etc., and determines the priority of each job to be scheduled based on the job information of each job to be scheduled.

[0064] S302: Divide a plurality of job queues with different priorities according to the priorities of all jobs to be scheduled; each job queue includes at least one job to be scheduled.

[0065] In this embodiment, after obtaining the priorities of all jobs to be scheduled, the job scheduling system can divide the corresponding number of job queues according to the total number of all jobs to be scheduled. For example, if there are 55 jobs to be scheduled in the system, the job scheduling system can determine 5 job queues with different priorities according to the number of jobs to be scheduled in the job queues being 5, 8, 11, 14, and 17. Alternatively, the job scheduling system can also determine different priority queues according to the priorities of all jobs to be scheduled. For example, jobs with a priority of 1-2 are located in queue L1, and jobs with a priority of 3-4 are located in queue L2. This embodiment does not limit this.

[0066] In this embodiment, the job scheduling system obtains the priority of each job to be scheduled, and determines the corresponding job queue according to the priority of each job to be scheduled, so that in the subsequent job scheduling process, the job is scheduled according to the priority of the job queue and the priority of the job, thereby improving the job scheduling mechanism.

[0067] After the job scheduling system performs corresponding operations on all the jobs to be scheduled in the current job queue, the job scheduling system schedules the jobs to be scheduled in the job queue of the next priority according to the priority of the job queue. In one optional embodiment, the method further includes:

[0068] If there are no remaining jobs to be scheduled in the current job queue, the jobs to be scheduled in the first target job queue are scheduled; the priority of the job that fails to be scheduled is greater than the priority of the original job to be scheduled in the first target job queue.

[0069] In this embodiment, the fact that there are no remaining jobs to be scheduled in the current job queue means that resources have been allocated to all the jobs to be scheduled in the current job queue, or that all the jobs that have failed to be scheduled in the current job queue have completed transfer. In this case, there are no jobs to be scheduled in the current job queue. At this time, the job scheduling system accesses the job queue of the next priority according to the priority of each job queue, that is, the target job queue corresponding to the current job queue, and schedules the jobs to be scheduled in the target job queue. It should be noted that the target job queue includes the original jobs to be scheduled and the jobs that have failed to be scheduled transferred from the previous priority job queue. In order to ensure the priority of the jobs that have failed to be scheduled transferred from the previous priority job queue, the job scheduling system sets the priority of the jobs that have failed to be scheduled to be greater than the priority of the original jobs to be scheduled.

[0070] In this embodiment, the job scheduling system will transfer a high-priority job in the waiting resource queue to a low-priority queue if multiple scheduling fails, and maintain its corresponding priority, so as to facilitate priority scheduling of the job in the low-priority queue, thereby ensuring the scheduling priority of the high-priority job.

[0071] Adapting to the above-mentioned job scheduling mechanism, the job scheduling system may further configure a corresponding scheduling period for each job queue. In one optional embodiment, the method further includes:

[0072] The scheduling period of each job queue is determined according to job queues of different priorities; the higher the priority of the job queue, the shorter the scheduling period.

[0073] In this embodiment, when the job scheduling system determines the job queues of different priorities, it sets a corresponding scheduling period for each job queue and initializes a timer. Generally speaking, the higher the priority of the job queue, the shorter the scheduling period. That is, the polling period of the low-priority queue is longer than that of the high-priority queue, and the scheduling of queues with different priorities is unrelated to each other, so as to reduce the scope and time of high-priority jobs that have been waiting for resources hindering other low-priority jobs.

[0074] During the job scheduling process, the job is scheduled according to the scheduling period corresponding to each job queue. During the scheduling process according to the scheduling period, different job scheduling situations may occur.

[0075] In one of the scenarios, in one of the optional embodiments, the method further includes:

[0076] If the scheduling duration of the current job queue is greater than the duration corresponding to the scheduling period of the current job queue, the to-be-scheduled jobs in the current job queue are transferred to the second target job queue; the priority of the second target job queue is higher than that of the current job queue.

[0077] The second target job queue generally refers to a previous priority queue of the current job queue. Of course, the second target job queue may also be another job queue with a priority higher than the current job queue.

[0078] In this embodiment, during the scheduling process of the job scheduling system, if the scheduling duration of the current job queue exceeds the duration corresponding to the scheduling period of the current job queue, that is, the to-be-scheduled jobs in the current job queue have not been scheduled within the scheduling period, then the to-be-scheduled jobs in the current job queue will be transferred to the previous priority queue to ensure that the to-be-scheduled jobs in the current queue can be scheduled in time.

[0079] In another scenario, in one of the optional embodiments, the method further includes:

[0080] If there are at least two job queues whose scheduling durations are both greater than the duration corresponding to the scheduling period, the job queues are re-divided according to the priorities of all jobs to be scheduled.

[0081] In this embodiment, during the scheduling process of the job scheduling system, if there are at least two job queues whose scheduling duration exceeds the duration corresponding to the scheduling period of the current job queue, that is, the to-be-scheduled jobs in at least two job queues have not been scheduled within the scheduling period, then the job scheduling system will rearrange the to-be-scheduled jobs according to the priorities of all remaining to-be-scheduled jobs, and transfer each to-be-scheduled job to the corresponding priority job queue to ensure that the to-be-scheduled jobs in the current queue can be scheduled in time.

[0082] In this embodiment, the job scheduling system performs corresponding operations on the scheduled jobs and job queues when facing different scenarios, so that the job scheduling system can adjust the unscheduled jobs in a timely manner, optimize the job scheduling mechanism of the job scheduling system, and improve the job scheduling throughput of the job scheduling system.

[0083] In order to better illustrate the above method, Figure 4 As shown, this embodiment provides a XXXX method, which specifically includes:

[0084] S101, obtaining the priorities of all jobs to be scheduled in the SLURM scheduling system;

[0085] S102, dividing a plurality of job queues of different priorities according to the priorities of all jobs to be scheduled;

[0086] S103, determining the scheduling period of each job queue according to job queues of different priorities;

[0087] S104, scheduling according to the priority of each job queue in the SLURM scheduling system and the priority of the job to be scheduled in each job queue;

[0088] S105. During the job scheduling process, if there is a job that fails to be scheduled in the current job queue, the job that fails to be scheduled is transferred to the first target job queue;

[0089] S106, scheduling the jobs in the current job queue according to the priorities of the remaining jobs to be scheduled in the current job queue;

[0090] S107: If there are no remaining jobs to be scheduled in the current job queue, schedule the jobs to be scheduled in the first target job queue;

[0091] S108: If the scheduling duration of the current job queue is greater than the duration corresponding to the scheduling period of the current job queue, the to-be-scheduled jobs in the current job queue are transferred to the second target job queue;

[0092] S109: If there are at least two job queues whose scheduling durations are both greater than the duration corresponding to the scheduling period, the job queues are re-divided according to the priorities of all jobs to be scheduled.

[0093] In this embodiment, the SLURM scheduling system will transfer the high-priority jobs that failed to be scheduled to the low-priority queue in a timely manner, which can effectively ensure that the low-priority jobs in the queue at this level are scheduled in a timely manner, avoiding the problem of low-priority jobs being unable to be scheduled and being in a starvation state due to the failure of high-priority job scheduling, and at the same time improve the throughput and robustness of the SLURM scheduling system.

[0094] The implementation principle and technical effect of the job scheduling method provided in the above embodiment are similar to those of the above method embodiment, and will not be repeated here.

[0095] It should be understood that although Figure 2-4 The steps in the flowchart are shown in sequence as indicated by the arrows, but these steps are not necessarily executed in the order indicated by the arrows. Unless otherwise specified in this document, there is no strict order restriction for the execution of these steps, and these steps can be executed in other orders. Moreover, Figure 2-4 At least part of the steps may include multiple steps or multiple stages. These steps or stages are not necessarily performed at the same time, but can be performed at different times. The execution order of these steps or stages is not necessarily sequential, but can be performed in turn or alternately with other steps or at least part of the steps or stages in other steps.

[0096] In one embodiment, Figure 5 As shown, a job scheduling device is provided, comprising:

[0097] Scheduling module 01, used for scheduling according to the priority of each job queue in the SLURM scheduling system and the priority of the job to be scheduled in each job queue;

[0098] The transfer module 02 is used for transferring the failed-scheduled jobs to the first target job queue during the job scheduling process if there are any failed-scheduled jobs in the current job queue; the priority of the first target job queue is lower than that of the current job queue;

[0099] The scheduling module 01 is also used to schedule the jobs in the current job queue according to the priorities of the remaining jobs to be scheduled in the current job queue.

[0100] In one of the optional embodiments, Figure 6 As shown, the job scheduling device also includes a division module 03;

[0101] The division module 03 is used to obtain the priorities of all jobs to be scheduled in the SLURM scheduling system; divide the job queues with multiple different priorities according to the priorities of all jobs to be scheduled; and the job queues include at least one job to be scheduled.

[0102] In one of the optional embodiments, the scheduling module 01 is also used to schedule the jobs to be scheduled in the first target job queue if there are no remaining jobs to be scheduled in the current job queue; the priority of the job that failed to be scheduled is greater than the priority of the original job to be scheduled in the first target job queue.

[0103] In one of the optional embodiments, Figure 7 As shown, the job scheduling device also includes a determination module 04;

[0104] The determination module 03 is used to determine the scheduling period of each job queue according to the job queues of different priorities; the higher the priority of the job queue, the shorter the scheduling period.

[0105] In one of the optional embodiments, the transfer module 02 is also used to transfer the to-be-scheduled jobs in the current job queue to the second target job queue if the scheduling duration of the current job queue is greater than the duration corresponding to the scheduling period of the current job queue; the priority of the second target job queue is higher than the current job queue.

[0106] In one of the optional embodiments, the division module 03 is further used to re-divide the job queues according to the priorities of all the jobs to be scheduled if there are at least two job queues whose scheduling durations are both greater than the duration corresponding to the scheduling period.

[0107] For the specific definition of the job scheduling device, please refer to the definition of the job scheduling method above, which will not be repeated here. Each module in the above-mentioned job scheduling device can be implemented in whole or in part by software, hardware and a combination thereof. The above-mentioned modules can be embedded in or independent of the processor in the computer device in the form of hardware, or can be stored in the memory in the computer device in the form of software, so that the processor can call and execute the operations corresponding to the above modules.

[0108] In one embodiment, a computer device is provided, including a memory and a processor, wherein a computer program is stored in the memory, and when the processor executes the computer program, the following steps are implemented:

[0109] Scheduling is performed based on the priority of each job queue in the SLURM scheduling system and the priority of the jobs to be scheduled in each job queue;

[0110] During the job scheduling process, if there is a job that fails to be scheduled in the current job queue, the job that fails to be scheduled is transferred to the first target job queue; the priority of the first target job queue is lower than that of the current job queue;

[0111] Schedule the jobs in the current job queue according to the priorities of the remaining jobs to be scheduled in the current job queue.

[0112] The implementation principle and technical effect of the computer device provided in the above embodiment are similar to those of the above method embodiment, and will not be repeated here.

[0113] In one embodiment, a computer readable storage medium is provided, on which a computer program is stored, and when the computer program is executed by a processor, the following steps are implemented:

[0114] Scheduling is performed based on the priority of each job queue in the SLURM scheduling system and the priority of the jobs to be scheduled in each job queue;

[0115] During the job scheduling process, if there is a job that fails to be scheduled in the current job queue, the job that fails to be scheduled is transferred to the first target job queue; the priority of the first target job queue is lower than that of the current job queue;

[0116] Schedule the jobs in the current job queue according to the priorities of the remaining jobs to be scheduled in the current job queue.

[0117] The computer-readable storage medium provided in the above embodiment has similar implementation principles and technical effects as those of the above method embodiment, and will not be described in detail here.

[0118] Those of ordinary skill in the art can understand that all or part of the processes in the above-mentioned embodiment methods can be completed by instructing the relevant hardware through a computer program, and the computer program can be stored in a non-volatile computer-readable storage medium. When the computer program is executed, it can include the processes of the embodiments of the above-mentioned methods. Among them, any reference to memory, storage, database or other media used in the embodiments provided in this application can include at least one of non-volatile and volatile memory. Non-volatile memory can include read-only memory (ROM), magnetic tape, floppy disk, flash memory or optical memory, etc. Volatile memory can include random access memory (RAM) or external cache memory. As an illustration and not limitation, RAM can be in various forms, such as static random access memory (SRAM) or dynamic random access memory (DRAM).

[0119] The technical features of the above embodiments may be combined arbitrarily. To make the description concise, not all possible combinations of the technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this specification.

[0120] The above-mentioned embodiments only express several implementation methods of the present application, and the descriptions thereof are relatively specific and detailed, but they cannot be understood as limiting the scope of the invention patent. It should be pointed out that, for a person of ordinary skill in the art, several variations and improvements can be made without departing from the concept of the present application, and these all belong to the protection scope of the present application. Therefore, the protection scope of the patent of the present application shall be subject to the attached claims.

Claims

1. A job scheduling method, characterized in that: The method comprises: Scheduling is performed according to the priority of each job queue in the SLURM scheduling system and the priority of the job to be scheduled in each of the job queues; the SLURM scheduling system includes multiple job queues, the priority of each of the job queues is sorted from high to low, and the jobs to be scheduled in each of the job queues are sorted according to the priority, with higher priority jobs in front and lower priority jobs in the back, and higher priority jobs will be scheduled first; During the job scheduling process, if there is a job that fails to be scheduled in the current job queue, the job that fails to be scheduled is transferred to a first target job queue; the priority of the first target job queue is lower than that of the current job queue; Scheduling the jobs in the current job queue according to the priorities of the remaining jobs to be scheduled in the current job queue; If there are no remaining jobs to be scheduled in the current job queue, the jobs to be scheduled in the first target job queue are scheduled; the priority of the job that fails to be scheduled is greater than the priority of the original job to be scheduled in the first target job queue.

2. The method according to claim 1, characterized in that The method further comprises: Obtaining the priorities of all jobs to be scheduled in the SLURM scheduling system; According to the priorities of all the jobs to be scheduled, a plurality of job queues with different priorities are divided; each job queue includes at least one of the jobs to be scheduled.

3. The method according to claim 1, characterized in that The method further comprises: The scheduling period of each job queue is determined according to the job queues of different priorities; the scheduling period of the job queue with a higher priority is shorter.

4. The method according to claim 3, characterized in that The method further comprises: If the scheduling duration of the current job queue is greater than the duration corresponding to the scheduling period of the current job queue, the to-be-scheduled jobs in the current job queue are transferred to a second target job queue; the priority of the second target job queue is higher than that of the current job queue.

5. The method according to claim 3, characterized in that: The method further comprises: If there are at least two job queues whose scheduling durations are both greater than the duration corresponding to the scheduling period, the job queues are re-divided according to the priorities of all the jobs to be scheduled.

6. The method according to claim 1, characterized in that The first target job queue is a job queue with a next priority level to the current job queue or another job queue with a lower priority level than the current job queue.

7. A job scheduling system, characterized in that: The job scheduling system includes a plurality of job queues of different priorities; each of the job queues includes at least one job to be scheduled corresponding to the priority of the job queue; The system is used to execute the job scheduling method described in any one of claims 1-6.

8. A job scheduling device, characterized in that: The device comprises: A scheduling module, used for scheduling according to the priority of each job queue in the SLURM scheduling system and the priority of the job to be scheduled in each of the job queues; the SLURM scheduling system includes multiple job queues, the priority of each job queue is sorted from high to low, and the jobs to be scheduled in each of the job queues are sorted according to the priority, with higher priority jobs in front and lower priority jobs in the back, and higher priority jobs will be scheduled first; A transfer module is used for, during the job scheduling process, if there is a job that fails to be scheduled in the current job queue, transferring the job that fails to be scheduled to a first target job queue; the priority of the first target job queue is lower than that of the current job queue; if there is no remaining job to be scheduled in the current job queue, scheduling the job to be scheduled in the first target job queue; the priority of the job that fails to be scheduled is greater than the priority of the original job to be scheduled in the first target job queue; The scheduling module is further used to schedule the jobs in the current job queue according to the priorities of the remaining jobs to be scheduled in the current job queue.

9. A computer device comprising a memory and a processor, wherein the memory stores a computer program, wherein: When the processor executes the computer program, the steps of the method according to any one of claims 1 to 7 are implemented.

10. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the steps of the method according to any one of claims 1 to 7 are implemented.