Skip to main content

MIN_SHARDS

Constant MIN_SHARDS 

Source
pub const MIN_SHARDS: usize = 4;
Expand description

Fewest shards any arena gets.

A shard is not free — it costs its own metadata and, once touched, a whole page — so a nearly empty database wants as few as possible. It wants more than one because the count is also the concurrency and locality unit, and because a database that starts at one shard would re-shard on its first handful of records.