Documentation
¶
Overview ¶
Package cputhrottle measures how much the CPU limit of a container holds it back: the share of the CFS periods in which the container was throttled, over a sliding window of a few minutes, from the cpu.stat of its cgroup (v2).
Index ¶
Constants ¶
View Source
const ( // WindowSpan is how far back the ratio looks. WindowSpan = 5 * time.Minute // MinPeriods is the fewest periods in a window a ratio is reported for: the counters only run while the container is // busy, and a few periods say nothing. MinPeriods = 30 // Step is the granularity of the reported percent: a smaller change is not news. Step = 10 // AlertPercent is the share above which a container counts as starved by its limit. AlertPercent = 50 )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Stat ¶
type Stat struct{ Periods, Throttled uint64 }
Stat is the throttling counters of a cgroup: periods elapsed with a quota in force, and how many of them throttled.
Click to show internal directories.
Click to hide internal directories.