pub struct PoolConfig {
pub enabled: bool,
pub min_idle: usize,
pub max_size: usize,
pub max_concurrent_boots: usize,
pub idle_ttl_secs: u64,
pub scaling: ScalingPolicy,
pub snapshot_fork: bool,
}Expand description
Warm pool configuration for pre-booted VMs.
Fields§
§enabled: boolEnable warm pool (default: false)
min_idle: usizeMinimum number of pre-warmed idle VMs to maintain
max_size: usizeMaximum number of VMs in the pool (idle + in-use)
max_concurrent_boots: usizeMaximum number of VM boots that may run concurrently during pool fill. A bounded value prevents a large warm pool from exhausting host CPU and memory while retaining parallel startup for independent VMs.
idle_ttl_secs: u64Time-to-live for idle VMs in seconds (0 = unlimited)
scaling: ScalingPolicyAutoscaling policy for dynamic min_idle adjustment
snapshot_fork: boolFill the pool by snapshot-fork instead of cold boot: boot ONE template VM once, snapshot it, then replenish every other slot by restoring that snapshot (MAP_PRIVATE CoW) — turning per-VM fill from a full cold boot (~1.7s) into a restore (~tens of ms). All same-image pool VMs share one RAM image.
Trait Implementations§
Source§impl Clone for PoolConfig
impl Clone for PoolConfig
Source§fn clone(&self) -> PoolConfig
fn clone(&self) -> PoolConfig
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more