pub struct Budget {
pub slice: String,
pub memory_max: Option<u64>,
pub memory_in_use: u64,
pub admission: AdmissionPolicy,
pub held: bool,
pub mirror_memory: u64,
pub seed_memory: Vec<SeedMemory>,
pub shell_memory: Vec<ShellMemory>,
pub host: Option<HostBudget>,
pub cpu: Option<CpuBudget>,
pub slice_cpus: Option<u64>,
}Expand description
The memory budget runners and the mirror share, in bytes.
Fields§
§slice: StringThe systemd slice runner containers run in.
memory_max: Option<u64>The slice’s MemoryMax; None when it is unlimited.
memory_in_use: u64Memory the running containers reserve: the runners’ caps, or under measured admission the larger of each runner’s predicted peak and its last sampled memory, and the caps of the seed containers, shells and the mirror.
admission: AdmissionPolicyWhat a new runner must fit in beside them.
held: boolUnder measured admission, whether the slice is at the high-water mark, so no runner starts.
mirror_memory: u64The mirror’s part of memory_in_use: its cap while it is enabled or still running, else 0.
seed_memory: Vec<SeedMemory>The seed containers’ part of memory_in_use, one per profile that reseeds, by profile name.
shell_memory: Vec<ShellMemory>The shells’ part of memory_in_use, one per shell open in a record, by job.
host: Option<HostBudget>What the host’s memory leaves runners beside its other programs, from a recent reading of it; absent without one.
cpu: Option<CpuBudget>The CPU budget, under [host] cpu_overcommit. Absent without one.
slice_cpus: Option<u64>The CPUs the slice may use, in millicores: its AllowedCPUs or the host’s, less under a lower CPUQuota,
whether or not a CPU budget admits runners. The runners’ CPU limits are quotas that may add up past it.
Absent when it could not be read.
Implementations§
Source§impl Budget
impl Budget
Sourcepub fn memory_reading(&self) -> Reading
pub fn memory_reading(&self) -> Reading
What is reserved of what, as every client shows it: 8G of 24G reserved in runnerd.slice, or without
MemoryMax 8G reserved in runnerd.slice, which has no MemoryMax; how runners are admitted
(Budget::admission_note) follows the slice.
Sourcepub fn clauses(&self) -> Vec<String>
pub fn clauses(&self) -> Vec<String>
The budget’s clauses in the order clients show them: memory (Budget::memory_reading), then CPU
(CpuBudget::line) and the host (Budget::host_line) when the daemon reports them.
Sourcepub fn host_line(&self) -> Option<String>
pub fn host_line(&self) -> Option<String>
The host’s line as clients show it, such as host: 31G of 64G available, 1.5% stalled for memory; leaves the slice 40G; when that is less room than MemoryMax leaves (Budget::host_withheld), …; leaves the slice 25G of its 46G, so 6.5G is free, and without MemoryMax, where the host alone bounds it, …; leaves the slice 25G, so 6.5G is free; while it stalls, …; stalling, so no runner starts. While the slice is held
(Budget::held), nothing is free, so it says no figure of it. With programs outside the slice large enough to
name, …; programs outside CI hold 30G, most java 9.3G (HostMemory::outside_line). None without a recent
reading of the host.
Sourcepub fn host_withheld(&self) -> Option<u64>
pub fn host_withheld(&self) -> Option<u64>
What the host’s memory holds back of the room MemoryMax leaves beside what runs, in bytes: that room less
what the host has to spare (HostBudget::spare), when the host leaves less. None while it leaves as much,
while it stalls (its line says no runner starts), without a recent reading of it, and without MemoryMax.
Trait Implementations§
Source§impl<'de> Deserialize<'de> for Budget
impl<'de> Deserialize<'de> for Budget
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
impl Eq for Budget
impl StructuralPartialEq for Budget
Auto Trait Implementations§
impl Freeze for Budget
impl RefUnwindSafe for Budget
impl Send for Budget
impl Sync for Budget
impl Unpin for Budget
impl UnsafeUnpin for Budget
impl UnwindSafe for Budget
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> DeserializeOwned for Twhere
T: for<'de> Deserialize<'de>,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key and return true if they are equal.