Expand description
Right-sizing advice from the job history: the spread of each profile’s and each job’s sampled peaks, waits and
slot use, and the memory and slots to set. Pure: the store reads the history, the daemon serves the result
(api::Sizing). It never changes the config: a client applies advice through PUT /v1/config, which validates
it like any other config, and under [sizing] auto the daemon applies what auto::changes picks the same way.
Modules§
- auto
- Auto sizing: which profiles’
memory,slotsandcpusthe daemon changes now, from the advice, the runs since each profile’s last change and the limits[sizing]and each profile set. Pure: the daemon reads the history and when each profile last changed, writes each change through the config check asPUT /v1/configdoes, and records it. Never lowers a profile while a job is on its cap, never changesmemoryfrom fewer than[sizing] min_jobsjobs, never lowers within[sizing] intervalof a profile’s last change or raises withinraise_interval, never leaves a profile outside its bounds, and sizes each profile against the budget the changes before it in the same look leave. Movescpusonly on the CPU averages of runs at the profile’s currentcpussince its last change and since the daemon got them, never on CPU peaks: a parallel build peaks at whatever cap it gets. - memory
- What a profile’s runs say about its
memory(ADR 0070): each job’s sizing window (admission::recent), what a raise needs (raise_need: only runs that met the current cap since the profile took it), what a lowering must stay above (lower_floor: every windowed run’s need), and a lowering auto sizing made that went too far, which is reverted. Pure;adviseand auto sizing read it, never a client.
Structs§
- CpusSet
- A profile’s
cpusas the daemon ran it fromat(ms), by itsprofile.changedevent: one when it started with the profile, and after each reload or restart that changed the profile’s image, CPUs, memory or slots. - Held
- One runner container’s time in a slot for a job. Times in milliseconds.
- History
- What the store reads for sizing.
- Memory
Set - A profile’s
memoryas the daemon ran it fromat(ms), by itsprofile.changedevent, asCpusSethas itscpus. - Ran
- One finished job of this daemon’s runners, as sizing reads it. Times in milliseconds.
- Window
- What
advisesizes against besides the history.
Enums§
- Capped
- What a run says about its container’s memory cap (ADR 0070).
- Measure
- What a run’s sampled memory counts.
Functions§
- advise
- The advice for every profile of
configfromhistory, against the slice’smemory_maxasconfig’s admission policy budgets it. Peaks, and the memory advice, go by each job’s sizing window over the history’s last 30 days (memory, ADR 0070);window.sincenarrows only the waits, the busy share and the starts.