pub struct SelectionConfig {
pub strategy: SelectionStrategy,
pub min_success_rate: f64,
pub weights: SelectionWeightConfig,
pub fairness: FairnessConfig,
pub affinity: AffinityConfig,
pub max_load_per_core: Option<f64>,
pub min_free_gb: Option<f64>,
pub disk_gb_per_slot: f64,
pub disk_critical_free_ratio: f64,
pub disk_critical_ratio_cap_gb: Option<f64>,
}Expand description
Configuration for the worker selection algorithm.
Fields§
§strategy: SelectionStrategySelection strategy to use.
min_success_rate: f64Minimum success rate (0.0-1.0) for a worker to be considered.
weights: SelectionWeightConfigFactor weights for the balanced strategy.
fairness: FairnessConfigFairness settings for fair_fastest strategy.
affinity: AffinityConfigCache affinity settings for project-to-worker pinning.
max_load_per_core: Option<f64>Maximum load-per-core threshold. Workers exceeding this are skipped. Set to None to disable load-based filtering.
min_free_gb: Option<f64>Minimum free disk space in GB. Workers below this are skipped. Set to None to disable the free-space floor; per-slot disk derating still applies.
disk_gb_per_slot: f64Disk budget in GiB per concurrent slot, after reserving min_free_gb.
Must be finite and positive. Unknown disk telemetry preserves configured slots.
disk_critical_free_ratio: f64Free-disk ratio at or below which rchd marks a worker Critical and gives it no slots (bd-xxck3). Read by rchd at startup.
disk_critical_ratio_cap_gb: Option<f64>When set, the ratio rule above trips only while free space is also at or below this many GB, so a large disk is judged by absolute headroom (5% of 900 GB is 45 GB). Unset keeps the ratio rule unconditional.