Skip to main content

default_pipeline_concurrency

Function default_pipeline_concurrency 

Source
fn default_pipeline_concurrency(available_parallelism: usize) -> usize
Expand description

Default per-stage pipeline concurrency (the ready-queue depth feeding the shared Rayon pool) used when a PacketPipelineConfig concurrency field is unset or zero.

This is a queue depth, not a thread count, so it is derived from the CPU count (available_parallelism * PIPELINE_CONCURRENCY_PER_CPU) and is deliberately independent of the Rayon pool size. In production the pool is only available_parallelism()/2; sizing the ingress decode default from the pool (pool - 2) collapsed it to a near-serial 1 on small hosts and halved relay forwarding throughput. Fair sharing under a congested pool is handled by the arbiter in hopr_utils::parallelize::cpu, not by shrinking this default.