Skip to content

WIP: add jobtap plugin for preemption - #6580

Open
garlick wants to merge 2 commits into
flux-framework:masterfrom
garlick:killbot
Open

WIP: add jobtap plugin for preemption#6580
garlick wants to merge 2 commits into
flux-framework:masterfrom
garlick:killbot

Conversation

@garlick

@garlick garlick commented Jan 24, 2025

Copy link
Copy Markdown
Member

This is a first cut at a jobtap plugin that dispatches preemptible jobs when there is job pressure from non-preemptible jobs, as discussed in #6524. It handles preemptible-after > 0 and doesn't preempt jobs in queues that don't have pressure.

That's about the extent of its smarts!

There's a comment at the top of the plugin that explains how it works, but the quick summary is that there are currently two "handlers" that are invoked periodically while there are potential victims and job pressure. If the overkill handler is selected, it kills all eligible victims in one go. If the onekill handler is selected, it kills one random victim, then waits a while and tries again if there is still pressure.

This is a WIP because probably we'll need another handler that's smart about node counts, and because testing doesn't cover queues yet. I was reaching a quitting point for the weekend and wanted to get this up.

Problem: RFC 14 specifies that a job can set the preemptible-after
system attribute in their jobspec to signal that the job can be
preempted, but flux-core and flux-sched currently ignore this.

The scheduler is the proper place to handle preemption, but in the
mean time, provide a jobtap plugin that can do a sloppy job of it
without knowledge of the schedule.
Problem: there are no tests for the killbot preemption plugin.

Add a sharness test.
@grondo grondo added the capability/preemption Flux 1.0 roadmap capability label Mar 11, 2026
@grondo grondo added this to the v1.0 milestone Mar 11, 2026
@codecov

codecov Bot commented Apr 5, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 84.74576% with 45 lines in your changes missing coverage. Please review.
✅ Project coverage is 79.49%. Comparing base (16f7233) to head (47a95a8).
⚠️ Report is 2357 commits behind head on master.

Files with missing lines Patch % Lines
src/modules/job-manager/plugins/killbot.c 84.74% 45 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##           master    #6580      +/-   ##
==========================================
+ Coverage   79.47%   79.49%   +0.01%     
==========================================
  Files         531      532       +1     
  Lines       88312    88607     +295     
==========================================
+ Hits        70184    70434     +250     
- Misses      18128    18173      +45     
Files with missing lines Coverage Δ
src/modules/job-manager/plugins/killbot.c 84.74% <84.74%> (ø)

... and 11 files with indirect coverage changes

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

capability/preemption Flux 1.0 roadmap capability

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants