skip to content
==> README.md <==
1# @ajax/mesh-jobs-sched
2
3The fleet scheduler's model as the jobs' dispatcher reads it:
4
5- every member, by id, with the owner policy's busy marks;
6- each program's needs from the desired state;
7- the measured performance per program and member;
8- the weights.
9
10The fleet thread refreshes it every second and gives it to the job node (`mj_node_set_sched`) as an
11`mj_sched` (`@ajax/mesh-jobs-select`). Its verdict for an alive member that runs the program is F4's
12`sched::filter` (cordon, backends, arch, memory, avoid), then a failure of the program there, then
13`score_terms` (`@ajax/mesh-sched-score`): measured speed against the best anywhere, share, CPU and
14memory headroom, prefer, the owner penalty.
15
16## Ported from
17
18[alpha-rust-mesh](https://github.com/rsafier/alpha-rust-mesh) (Richard Safier, MIT):
19`crates/mesh-host/src/jobs.rs`: `SchedCx`, and the scheduler half of `select`.
20
21## Tests
22
23`tests/sched.c`: the Rust's `select_is_the_schedulers_filter_and_score`. It covers cordoned, busy
24backed off, not running it, down, the busy member alone, backends, a failure there, the job's members,
25and ordering by measured speed and share.
26
27## Licence
28
29MIT. See the repository's LICENSE.