IP Library › Granted Patent US 12,737,219
Granted Patent B2
US 12,737,219 · App. 18/355,638 · Granted Sep 15, 2026

Optimizing job preemption using dynamic and static information

Inventors: Abhishek Malvankar (White Plains, NY); Lior Aronovich (Thornhill, CA); Alaa S. Youssef (Valhalla, NY); Michael Spriggs (Markham, CA)
Assignee: International Business Machines Corporation
G06F9/4881G06F9/5055
View Patent ↗
Loading inventors, assignments & file history…
Monitor This Case
Get email alerts when status or documents change.
Order Certified Copies
Most orders are placed with the USPTO same day — all within 24 business hours.
Order via The Patent Place →
Pre-filled with this patent's details
Quick Facts
Patent No.
US 12,737,219
App. No.
18/355,638
Granted
Sep 15, 2026
Kind
B2
Abstract

In an approach for optimizing job preemption using a scheduling mechanism that considers dynamic and static information, a processor, responsive to a pending job being selected to be run, determines that no computing hosts within a computing cluster have available resources capable of running the pending job and non-preemptive measures will not provide required resources for the pending job. A processor identifies candidate jobs for preemption and dynamic information and static information for each candidate job. A processor ranks the candidate jobs for preemption based on the dynamic information and the static information for each candidate job. A processor attempts to preempt a top N candidate jobs whose released resources in combination with the available resources of the computing cluster satisfy the required resources of the pending job. A processor, responsive to successfully preempting the top N candidate jobs, initiates the pending job.

Claims (79)

1 . A computer-implemented method comprising:

responsive to a pending job being selected to be run, determining, by one or more processors, that no computing hosts within a computing cluster have available resources capable of running the pending job and non-preemptive measures will not provide required resources for the pending job, wherein determining that no computing hosts within the computing cluster have available resources capable of running the pending job and the non-preemptive measures will not provide the required resources for the pending job comprises:

reviewing current jobs running and available resources within the computing cluster at a point in time by taking a snapshot; and comparing the available resources within the computing cluster to the required resources to run the pending job;

identifying, by the one or more processors, candidate jobs for preemption and dynamic information and static information for each candidate job, wherein the static information is a configured priority value assigned to a respective candidate job and pulled from a job submission script, wherein the dynamic information is identified by polling the computing cluster for the dynamic information about each candidate job as that candidate job runs in the computing cluster, wherein the one or more processors maintain, in a job scheduler component:

(i) a first data structure that stores, for each running job within the computing cluster, a latest checkpoint time detected for that running job, the latest checkpoint time being recorded explicitly using a scheduler application programming interface (API) by which the running job marks a successful completion of a checkpoint, and

(ii) a second data structure that stores, for each running job within the computing cluster, a predicted total time for completion and a start time for that running job, wherein the dynamic information includes:

an elapsed time from a last checkpoint of a respective candidate job, calculated as a difference between a current time and the latest checkpoint time recorded in the first data structure for the respective candidate job and

a predicted remaining time for completion of the respective candidate job, calculated as a difference between the predicted total time for completion recorded in the second data structure for the respective candidate job,

the start time recorded in the second data structure for the respective candidate job, and

the current time, wherein the predicted total time for completion is predicted implicitly by applying job profiling based on resources needed and resources available to predict a total time for completion of the respective candidate job using extrapolation or one or more machine learning models;

ranking, by the one or more processors, the candidate jobs for preemption based on the dynamic information and the static information for each candidate job, wherein ranking the candidate jobs for preemption is done with an objective of minimizing loss of computation time while optimizing a benefit and utilization of resources of the computing cluster, and wherein ranking the candidate jobs for preemption comprises utilizing a unified metric of the dynamic information and the static information for scoring each candidate job, the unified metric being:

Mj=WCD*CDj+WLD*LDj+WPS*PS(j),

wherein WCD, WLD, and WPS are weights for aspect functions of candidate job j, wherein CD is a first function that produces a first score such that the first score is higher as the elapsed time from the last checkpoint is lower,

wherein LD is a second function that produces a second score such that the second score is higher as the predicted remaining time is higher, and

wherein PS is a third function that produces a third score such that the third score is higher as the configured priority value is lower;

attempting to preempt, by the one or more processors, a top N candidate jobs whose released resources in combination with the available resources of the computing cluster satisfy the required resources of the pending job; and

responsive to successfully preempting the top N candidate jobs, initiating, by the one or more processors, the pending job.

2 . The computer-implemented method of claim 1 , wherein the dynamic information is an elapsed time from a last checkpoint of a respective candidate job and a predicted remaining time for completion of the respective candidate job, and wherein the static information is a configured priority value assigned to the respective candidate job.

3 . The computer-implemented method of claim 1 , wherein determining that no computing hosts within the computing cluster have the available resources capable of running the pending job and the non-preemptive measures will not provide the required resources for the pending job comprises:

reviewing, by the one or more processors, current jobs running and the available resources within the computing cluster at a point in time by taking a snapshot; and

comparing, by the one or more processors, the available resources within the computing cluster to the required resources to run the pending job.

4 . The computer-implemented method of claim 1 , wherein identifying the static information for each candidate job comprises:

pulling, by the one or more processors, the static information for each candidate job from a job submission script.

5 . The computer-implemented method of claim 2 , wherein identifying the dynamic information for each candidate job comprises:

calculating, by the one or more processors, the elapsed time from the last checkpoint of the respective candidate job as a difference between a current time and a time of the last checkpoint recorded in a data structure for the respective candidate job, wherein the data structure stores a respective time of the last checkpoint detected for each running job within the computing cluster.

6 . The computer-implemented method of claim 5 , wherein the time of the last checkpoint is detected explicitly using a scheduler application programming interface (API) by which a running job marks successful completion of a checkpoint and records a time of completion of the checkpoint for the running job in the data structure.

7 . The computer-implemented method of claim 5 , wherein the time of the last checkpoint is detected implicitly by scanning logs of a running job for strings or patterns that indicate completion of a checkpoint.

8 . The computer-implemented method of claim 5 , wherein, in a container environment, the time of the last checkpoint is detected implicitly by monitoring volumes mounted to a container to detect changes in files that indicate completion of a checkpoint or by monitoring specific network traffic that would indicate completion of a snapshot.

9 . The computer-implemented method of claim 5 , wherein, for an artificial intelligence (AI) training job, the time of the last checkpoint is detected implicitly by monitoring contents of files that are specific for an AI training framework to detect completion of a checkpoint, wherein the AI training framework has specific identifiable files where calculation results are stored, progress is recorded, and stable checkpoints can be identified.

10 . The computer-implemented method of claim 2 , wherein identifying the dynamic information for each candidate job comprises:

calculating, by the one or more processors, the predicted remaining time for completion of the respective candidate job as a difference between a predicted total time for completion recorded in a data structure for the respective candidate job, a start time recorded in the data structure for the respective candidate job, and a current time, wherein the data structure stores a respective predicted total time for completion and a respective start time for each running job within the computing cluster.

11 . The computer-implemented method of claim 10 , wherein the predicted total time for completion is predicted explicitly using a scheduler application programming interface (API) by which a running job indicates the predicted total time for completion based on statistics.

12 . The computer-implemented method of claim 10 , wherein the predicted total time for completion is predicted implicitly by applying job profiling based on which resources are needed and which resources are available to predict a total time for completion of a job using extrapolation or machine learning models.

13 . The computer-implemented method of claim 2 , wherein identifying the dynamic information for each candidate job comprises:

predicting, by the one or more processors, the predicted remaining time for completion of the respective candidate job implicitly by using information on a current training stage and future training stages, wherein the respective candidate job is an artificial intelligence (AI) training job.

14 . The computer-implemented method of claim 1 , wherein ranking the candidate jobs for preemption based on the dynamic information and the static information for each candidate job is done with an objective of minimizing loss of computation time while optimizing a benefit and utilization of resources of the computer cluster.

15 . A computer program product comprising:

one or more computer-readable storage media and program instructions collectively stored on the one or more computer-readable storage media, the stored program instructions comprising:

program instructions to responsive to a pending job being selected to be run, determine that no computing hosts within a computing cluster have available resources capable of running the pending job and non-preemptive measures will not provide required resources for the pending job, wherein determining that no computing hosts within the computing cluster have available resources capable of running the pending job and the non-preemptive measures will not provide the required resources for the pending job comprises:

program instructions to review current jobs running and available resources within the computing cluster at a point in time by taking a snapshot; and program instructions to compare the available resources within the computing cluster to the required resources to run the pending job;

program instructions to identify candidate jobs for preemption and dynamic information and static information for each candidate job, wherein the static information is a configured priority value assigned to a respective candidate job and pulled from a job submission script, wherein the dynamic information is identified by polling the computing cluster for the dynamic information about each candidate job as that candidate job runs in the computing cluster, wherein the one or more processors maintain, in a job scheduler component:

(i) a first data structure that stores, for each running job within the computing cluster, a latest checkpoint time detected for that running job, the latest checkpoint time being recorded explicitly using a scheduler application programming interface (API) by which the running job marks successful completion of a checkpoint, and

(ii) a second data structure that stores, for each running job within the computing cluster, a predicted total time for completion and a start time for that running job, wherein the dynamic information includes:

an elapsed time from a last checkpoint of a respective candidate job, calculated as a difference between a current time and the latest checkpoint time recorded in the first data structure for the respective candidate job and

a predicted remaining time for completion of the respective candidate job, calculated as a difference between the predicted total time for completion recorded in the second data structure for the respective candidate job,

the start time recorded in the second data structure for the respective candidate job, and

the current time, wherein the predicted total time for completion is predicted implicitly by applying job profiling based on resources needed and resources available to predict a total time for completion of the respective candidate job using extrapolation or one or more machine learning models;

program instructions to rank the candidate jobs for preemption based on the dynamic information and the static information for each candidate job, wherein ranking the candidate jobs for preemption is done with an objective of minimizing loss of computation time while optimizing a benefit and utilization of resources of the computing cluster, and wherein ranking the candidate jobs for preemption comprises utilizing a unified metric of the dynamic information and the static information for scoring each candidate job, the unified metric being:

Mj=WCD*CDj+WLD*LDj+WPS*PS(j),

wherein WCD, WLD, and WPS are weights for aspect functions of candidate job j. wherein CD is a first function that produces a first score such that the first score is higher as the elapsed time from the last checkpoint is lower,

wherein LD is a second function that produces a second score such that the second score is higher as the predicted remaining time is higher, and

wherein PS is a third function that produces a third score such that the third score is higher as the configured priority value is lower;

program instructions to attempt to preempt a top N candidate jobs whose released resources in combination with the available resources of the computing cluster satisfy the required resources of the pending job; and

program instructions to responsive to successfully preempting the top N candidate jobs, initiate the pending job.

16 . The computer program product of claim 15 , wherein the dynamic information is an elapsed time from a last checkpoint of a respective candidate job and a predicted remaining time for completion of the respective candidate job, and wherein the static information is a configured priority value assigned to the respective candidate job.

17 . The computer program product of claim 16 , wherein the program instructions to identify the dynamic information for each candidate job comprises:

program instructions, stored on at least one of the one or more computer readable storage media, to calculate the elapsed time from the last checkpoint of the respective candidate job as a difference between a current time and a time of the last checkpoint recorded in a data structure for the respective candidate job, wherein the data structure stores a respective time of the last checkpoint detected for each running job within the computing cluster.

18 . The computer program product of claim 16 , wherein the program instructions to identify the dynamic information for each candidate job comprises:

program instructions, stored on at least one of the one or more computer readable storage media, to calculate the predicted remaining time for completion of the respective candidate job as a difference between a predicted total time for completion recorded in a data structure for the respective candidate job, a start time recorded in the data structure for the respective candidate job, and a current time, wherein the data structure stores a respective predicted total time for completion and a respective start time for each running job within the computing cluster.

19 . A computer system comprising:

one or more computer processors;

one or more computer-readable storage media;

program instructions collectively stored on the one or more computer-readable storage media for execution by at least one of the one or more computer processors, the stored program instructions comprising:

program instructions to responsive to a pending job being selected to be run, determine that no computing hosts within a computing cluster have available resources capable of running the pending job and non-preemptive measures will not provide required resources for the pending job, wherein determining that no computing hosts within the computing cluster have available resources capable of running the pending job and the non-preemptive measures will not provide the required resources for the pending job comprises:

program instructions to review current jobs running and available resources within the computing cluster at a point in time by taking a snapshot; and program instructions to compare the available resources within the computing cluster to the required resources to run the pending job;

program instructions to identify candidate jobs for preemption and dynamic information and static information for each candidate job, wherein the static information is a configured priority value assigned to a respective candidate job and pulled from a job submission script, wherein the dynamic information is identified by polling the computing cluster for the dynamic information about each candidate job as that candidate job runs in the computing cluster, wherein the one or more processors maintain, in a job scheduler component:

(i) a first data structure that stores, for each running job within the computing cluster, a latest checkpoint time detected for that running job, the latest checkpoint time being recorded explicitly using a scheduler application programming interface (API) by which the running job marks successful completion of a checkpoint, and

(ii) a second data structure that stores, for each running job within the computing cluster, a predicted total time for completion and a start time for that running job, wherein the dynamic information includes:

an elapsed time from a last checkpoint of a respective candidate job, calculated as a difference between a current time and the latest checkpoint time recorded in the first data structure for the respective candidate job and

a predicted remaining time for completion of the respective candidate job, calculated as a difference between the predicted total time for completion recorded in the second data structure for the respective candidate job,

the start time recorded in the second data structure for the respective candidate job, and

the current time, wherein the predicted total time for completion is predicted implicitly by applying job profiling based on resources needed and resources available to predict a total time for completion of the respective candidate job using extrapolation or one or more machine learning models;

program instructions to rank the candidate jobs for preemption based on the dynamic information and the static information for each candidate job, wherein ranking the candidate jobs for preemption is done with an objective of minimizing loss of computation time while optimizing a benefit and utilization of resources of the computing cluster, and wherein ranking the candidate jobs for preemption comprises utilizing a unified metric of the dynamic information and the static information for scoring each candidate job, the unified metric being:

Mj=WCD*CDj+WLD*LDj+WPS*PS(j),

wherein WCD, WLD, and WPS are weights for aspect functions of candidate job j, wherein CD is a first function that produces a first score such that the first score is higher as the elapsed time from the last checkpoint is lower,

wherein LD is a second function that produces a second score such that the second score is higher as the predicted remaining time is higher, and

wherein PS is a third function that produces a third score such that the third score is higher as the configured priority value is lower;

program instructions to attempt to preempt a top N candidate jobs whose released resources in combination with the available resources of the computing cluster satisfy the required resources of the pending job; and

program instructions to responsive to successfully preempting the top N candidate jobs, initiate the pending job.

Assignments (1)
ASSIGNMENT OF ASSIGNOR'S INTEREST Recorded Jul 20, 2023
From: MALVANKAR, ABHISHEK; ARONOVICH, LIOR; YOUSSEF, ALAA S.; SPRIGGS, MICHAEL
To: INTERNATIONAL BUSINESS MACHINES CORPORATION
Reel/Frame 064325/0380 →
Continuity (1)
Related Publication 20250028553A1 · Jan 23, 2025
References Cited (30)
US 7444316B1 · Vengerov · 2008 [cited by applicant]
US 8458712B2 · Chan · 2013 [cited by applicant]
US 9176774B2 · Druyan et al. · 2015 [cited by applicant]
US 9424078B2 · Chakravorty · 2016 [cited by applicant]
US 9886306B2 · Hildrum · 2018 [cited by applicant]
US 10296382B2 · Alrashed · 2019 [cited by applicant]
US 10318346B1 · Harizopoulos · 2019 [cited by examiner]
US 11023283B2 · Turull · 2021 [cited by applicant]
US 11036553B2 · Zhang · 2021 [cited by applicant]
US 11150951B2 · Li · 2021 [cited by applicant]
US 11383928B2 · Agarwal · 2022 [cited by applicant]
US 20070044102A1 · Casotto · 2007 [cited by examiner]
US 20130312006A1 · Hardman · 2013 [cited by applicant]
US 20200167197A1 · Bahramshahry · 2020 [cited by applicant]
US 20210173694A1 · Hildebrand · 2021 [cited by applicant]
US 20210294661A1 · Turner · 2021 [cited by applicant]
US 20220301095A1 · Dagani · 2022 [cited by applicant]
US 20220318052A1 · Sivathanu · 2022 [cited by applicant]
CN 109656716B · 2020 [cited by applicant]
KR 101770900B1 · 2017 [cited by applicant]
“About preemptive scheduling”, IBM Corporation, Last Updated Dec. 20, 2022, 3 pages, <https://www.ibm.com/docs/en/spectrum-lsf/10.1.0?topic=scheduling-about-preemptive>. [cited by applicant]
“Introduction to Determined”, Determined AI, Version 0.19.112022, Printed Feb. 20, 2023, 11 pages, <https://docs.determined.ai/latest/introduction.html>. [cited by applicant]
“Kubernetes scheduler plugins—Capacity Scheduling”, Github, Printed Dec. 19, 2022, 4 pages, <https://github.com/kubernetes-sigs/scheduler-plugins/blob/master/pkg/capacityscheduling/README.md>. [cited by applicant]
“Kubernetes scheduler plugins” Github, Printed Dec. 19, 2022, 5 pages, <https://github.com/kubernetes-sigs/scheduler-plugins>. [cited by applicant]
“Scheduling, Preemption and Eviction”, Kubernetes, Printed Feb. 20, 2023, 44 pages, <https://kubernetes.io/docs/concepts/scheduling-eviction/_print/>. [cited by applicant]
Bertogna et al., “Optimal Selection of Preemption Points to Minimize Preemption Overhead”, 2011 23rd Euromicro Conference on Real-Time Systems, ECRTS'11, Porto, Portugal, Jul. 6-8, 2011, 46 Pages. [cited by applicant]
Kaffes et al., “Shinjuku: Preemptive Scheduling usecond-scale Tail Latency”, Proceedings of the 16th USENIX Symposium on Networked Systems Design and Implementation (NSDI '19), Boston, MA, USA, Feb. 26-28, 2019, 16 Page… [cited by applicant]
Li et al., “Best-KFF: A Multi-Objective Preemptive Resource Allocation Policy for Cloud Computing Systems”, Cluster Computing, vol. 25, Issue: 1, Sep. 8, 2021, 17 Pages. [cited by applicant]
Ward et al., “Optimizing Preemption-Overhead Accounting in Multiprocessor Real-Time Systems”, RTNS '14: Proceedings of the 22nd International Conference on Real-Time Networks and Systems, Versailles, France, Oct. 2014, … [cited by applicant]
Yabuuchi et al., “Low-Latency Job Scheduling With Preemption for the Development of Deep Learning”, Proceedings of the 2019 USENIX Conference on Operational Machine Learning (OpML '19), Santa Clara, CA, USA, May 20, 201… [cited by applicant]