pub struct MemBudget {
pub free_vram: usize,
pub free_pinnable_ram: usize,
}Expand description
Runtime free-memory budget (SPILLING-PLAN §2). Both numbers are QUERIED at load, never hardcoded — free host RAM “varies with other LLM servers”, so the split between pinned (Tier 1) and disk (Tier 2) must be decided against the live machine state.
Fields§
§free_vram: usizeFree VRAM in bytes, from cuMemGetInfo (authoritative; accounts for other GPU processes).
free_pinnable_ram: usizeBytes of host RAM safe to pin: /proc/meminfo MemAvailable × pinned_frac (default 0.60).
Capped so cudaHostAlloc can neither OOM nor evict the page cache the Tier-2 mmap depends on.
Implementations§
Trait Implementations§
Auto Trait Implementations§
impl Freeze for MemBudget
impl RefUnwindSafe for MemBudget
impl Send for MemBudget
impl Sync for MemBudget
impl Unpin for MemBudget
impl UnsafeUnpin for MemBudget
impl UnwindSafe for MemBudget
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
Mutably borrows from an owned value. Read more