Skip to main content

SURB_BUFFER_TARGET_NUMERATOR

Constant SURB_BUFFER_TARGET_NUMERATOR 

Source
pub(crate) const SURB_BUFFER_TARGET_NUMERATOR: usize = 2;
Expand description

Fraction of the SURB ring buffer a Session’s balancer target may occupy.

The remainder is headroom for balancer overshoot. The target used to be the ring buffer capacity itself, which left none: a Session whose buffer sat at target — the normal state when Entry → Exit traffic far exceeds the reverse, since the Exit then drains almost nothing — turned every overshot SURB into an immediate eviction of the oldest entry. Under PIX that is a lost SSA share, not just a lost SURB, because a share reaches the reconstructor only when its SURB is used.