Skip to content

Proposal: goal-oriented scheduling for background work (cross-scope resource arbitration) #297

Description

@kuangmi-bit

Design discussion follow-up to the closed ADR (#120) — maintainer @ReganBell suggested reopening as an issue, so here it is.

The pattern. QM currently schedules work time-driven (crons, monitors, wake). If QM ever needs to arbitrate resources across concurrent scopes (interactive user sessions vs. background crons vs. long-running watchers), a goal-oriented scheduler is an alternative worth having on the radar: declare goals per scope ("interactive < 2s", "batch crons stay in budget") instead of tuning per-job priorities, run a closed-loop controller, and let importance-based preemption arbitrate contention.

Prior art. IBM z/OS WLM is the canonical implementation of this (goal mode + service classes + importance). I have a Go prototype of the semantics for Linux — deeparchi-ai/wlm — built on cgroup v2 + PSI pressure signals: 34 tests, zero production use. Honest about the prototype-to-production gap; it exists to test the semantics, not to be a dependency.

What I'm asking. Not an implementation proposal — a design discussion:

  1. Does QM's scheduler have a foreseeable cross-scope contention problem (e.g. an interactive request starving behind a heavy cron)?
  2. Would a goal-mode layer on top of the existing scheduler (rather than replacing it) fit QM's architecture?
  3. Is there interest in a written ADR on this, given adr: goal-oriented scheduling for background work #120 was closed?

Happy to write up the ADR in QM's format if there's appetite.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions