View text source at Wikipedia
Shardmap is a directory index design by Daniel Phillips who created the HTree and PHTree tree data structures and the Tux3 file system.
A Shardmap index consists of a scalable number of index shards. Each shard entry maps a hash key to the logical block number of a directory entry block known to contain a name that hashes to that key.
Each shard is represented as an unsorted fifo on disk and a small hash table in memory.
Shardmap scales in two ways:
These operations are staggered to avoid latency spikes. The reshard operation imposes a modest degree of write multiplication on the Shardmap design, asymptotically approaching a factor of two.
The key ideas of Shardmap are:
The shardmap implementation in the Tux3 file system uses SipHash hash function designed by Jean-Philippe Aumasson and Daniel J. Bernstein.