Skip to main content

Module samples

Module samples 

Source
Expand description

A sample of each schedr process a minute (decision 464): the leading master writes its masters’ and workers’ (one row per process, however many roles it runs: a standalone is one), rolls each closed 15-minute window up into averages and peaks, and deletes minute rows past a day and rollups past 30 days. A webserver in a process of its own writes its own.

Structs§

Pass
What a pass did, for the statement bound (decision 464): 3 a minute, 7 when a window closes (its read and insert, then the two deletes), more at a new sampler’s first pass, which rolls every window not rolled yet.
SampleSettings
How the samples are taken and kept (hidden timings, decision 464).
Sampler
The sampler’s memory between passes: each process’s last CPU time with when it was measured and the cores it gave, the last window rolled.

Constants§

MASTERS_HEARD_BEATS
A master heard from within this many of its heartbeats is sampled.
ROLL_GRACE
How long after its end a window waits to be rolled up: a sample stored late (a webserver’s timer, a slow insert) is in it by then.

Functions§

rolled_up
minutes (by process, then time) as one rollup per process at at: memory’s averages rounded and peaks, CPU’s average and peak over the minutes that have one, the container’s latest limit, every role the window saw, the minutes it covers, and a worker’s parts on average over every minute (its largest tasks left out), so the 7 and 30 days show memory by kind too.
sample_webserver
A webserver in a process of its own samples itself every interval (decision 464) on db as process_id, its figures from usage, until stop completes; a failure is logged.