pub struct Budgets {
pub transfers: usize,
pub open_repos: usize,
pub memory_bytes: u64,
pub wait_ms: u64,
pub handle_cache_bytes: u64,
pub handle_cache_share: u64,
pub over_promised: bool,
pub transfers_from: Source,
pub machine: Machine,
}Expand description
The three ceilings, and the box they were derived from.
Fields§
§transfers: usizeConcurrent git transfers. Becomes
SshConfig::max_concurrent_transfers, which is the ceiling of the
governor’s band; the floor is half of it
(gunnar_ssh::governor::LimitBand::for_budget).
open_repos: usizeRepository handles the cache may keep open.
memory_bytes: u64Bytes the admission ledger may give out to operations in flight.
wait_ms: u64How long a transfer may wait for a slot, in milliseconds.
handle_cache_bytes: u64What Budgets::open_repos handles can hold, at
BYTES_PER_OPEN_REPO each, against
Budgets::handle_cache_share — the memory the cache is allowed.
Carried as a value rather than left as arithmetic in a doc comment
because it is the number that was wrong: the ceiling said 256 handles on
a 16 GB box while one handle really held 137 MB, and nothing anywhere
multiplied those two together. Now announce does, out loud.
MemAvailable × HANDLE_CACHE_PERCENT / 100: what the cache may hold.
over_promised: boolThe floor could not be afforded. true when
limits::MIN_OPEN_REPOS handles cost more than
Budgets::handle_cache_share — a box too small for the minimum cache
this server insists on having.
It is not an error and it does not refuse to serve: a server with no handle cache is not a server, so the floor still wins and the process still starts. What changes is that it is now said. The 2 GB appliance reached the indexer watchdog’s floor with the cache holding the memory it was looking for, and every log line on the way there looked ordinary.
transfers_from: SourceWhere Budgets::transfers came from.
machine: MachineThe box.
Trait Implementations§
impl Copy for Budgets
impl Eq for Budgets
impl StructuralPartialEq for Budgets
Auto Trait Implementations§
impl Freeze for Budgets
impl RefUnwindSafe for Budgets
impl Send for Budgets
impl Sync for Budgets
impl Unpin for Budgets
impl UnsafeUnpin for Budgets
impl UnwindSafe for Budgets
Blanket Implementations§
impl<T> Allocation for T
Source§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
Source§impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
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.Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
Source§fn in_current_span(self) -> Instrumented<Self> ⓘ
fn in_current_span(self) -> Instrumented<Self> ⓘ
Source§impl<T> IntoRequest<T> for T
impl<T> IntoRequest<T> for T
Source§fn into_request(self) -> Request<T>
fn into_request(self) -> Request<T>
T in a tonic::Request