skip to content
[readonly]

The fleet scheduler's rebalancer: migrations with hysteresis, a budget and dwell, the owner policy, lockstep group re-form proposals, and moves' verdicts

sh
$ sexc add @ajax/mesh-sched-tracker
  • total 3
  • drwxr-xr-x-../
  • drwxr-xr-x-Oct 27 04:09v/# 1 version
  • drwxr-xr-x-Oct 27 04:09files/# the files of 0.1.0
latest
0.1.0, published Oct 27 04:09 by ajax
owners
ajax
license
MIT
dependencies
@ajax/mesh-check ^0.1.0, @ajax/mesh-mt ^0.1.0, @ajax/mesh-member-list ^0.1.0, @ajax/mesh-sched-member ^0.1.0, @ajax/mesh-sched-needs ^0.1.0, @ajax/mesh-sched-weights ^0.1.0, @ajax/mesh-sched-score ^0.1.0, @ajax/mesh-sched-place ^0.1.0, @ajax/mesh-fleet-doc ^0.1.0, @ajax/mesh-strmap ^0.1.0
dependents
@ajax/mesh-peer-codec, @ajax/mesh-peer-relay, @ajax/mesh-reconcile
keywords
mesh alphaos fleet scheduler rebalance migration
homepage
https://github.com/thomasdavis/alpha-c-mesh/tree/main/packages/mesh-sched-tracker
repository
https://github.com/thomasdavis/alpha-c-mesh
==> README.md <==
1# @ajax/mesh-sched-tracker
2
3The fleet scheduler's rebalancer and the leader's moves. A program moves (`mst_step`) only when its best
4alternative scores `improve` (25 %) better than where it is, for `hold_ms` in a row, at least `dwell_ms`
5after its last move, one migration at a time and at most `per_min` a minute; an operator's pin moves it
6at once (with its view). The owner policy (`mst_owner`, HTCondor's) marks a member busy while other
7tenants load it, with hysteresis. A lockstep group is never moved: `mst_group_step` proposes a re-form.
8Moves live in the document (`mst_start_move`, `mst_end_move`), so a new leader takes over a migration
9the old one started (`mst_resume_moves`), and a move's verdict (`mst_mig_verdict`) is its own programs'
10outcomes on the target, not the target's whole reconcile pass.
11
12## Ported from
13
14[alpha-rust-mesh](https://github.com/rsafier/alpha-rust-mesh) `crates/mesh-host/src/sched.rs`: `Move`,
15`Tracker` (`owner`, `recent`, `moved`, `step`, `group_step`), `unit`, `start_move`, `resume_moves`,
16`MigOutcome`, `mig_verdict`, `end_move`.
17
18## Tests
19
20`tests/tracker.c`: the Rust's `colocation_and_pins`, `hysteresis_and_budget`,
21`owner_policy_has_hysteresis`, `groups_are_proposed_not_moved`, `a_new_leader_takes_over_a_migration`,
22`the_moves_verdict_is_its_programs_not_the_whole_pass`, the scheduler's half of
23`a_pin_never_splits_a_colocated_pair`, and `simulation_is_stable_and_valid` (10 simulated minutes:
24members leave and return, the load oscillates; the placement stays valid and nothing flaps).
25
26## Licence
27
28MIT. See the repository's LICENSE.