pub fn shard_count(configured: usize, cores: usize) -> usizeExpand description
How many flusher shards to run, given the configured value and what the machine reports.
Zero means “ask the machine”, which is the default and the only value
config.rs documents as auto. The count is a function of core count and
nothing else — not of the resource cardinality, not of the connection count
— which is section 4’s rule for what a shard may be keyed on.
Halved, because a shard is a consumer: the producers are the decode and the runtime’s own work, and giving every core a flusher leaves nothing to feed them. Section 11 measured 1.56M records/s on 2.18 cores with one flusher per signal, so the transcode is around a third of the total and three consumers per two producers would be an idle two-thirds.