Shardmap

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:

  1. Rehash a cached shard to a larger number of hash buckets
  2. Reshard a stored shard fifo to divide it into multiple, smaller shards.

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:

  1. The representation of directory data is not the same on media as it is in cache. On media we have fifos, but in cache we have hash tables.
  2. Updating a fifo is cache efficient. Only the tail block of the fifo needs to be present in cache. The cache footprint of the media image of a shardmap is therefore just one disk block per shard.
  3. A small fifo on media is easily loaded and converted to an efficient hash table shard on demand. Once in cache, index updates are performed by updating the cached hash table and appending the same entries to the final block of the shard fifo.

The shardmap implementation in the Tux3 file system uses SipHash hash function designed by Jean-Philippe Aumasson and Daniel J. Bernstein.

See also

Content Disclaimer

Informasi ini disarikan dari Wikipedia dan disajikan kembali untuk tujuan edukasi. Konten tersedia di bawah lisensi CC BY-SA 3.0. Kami tidak bertanggung jawab atas ketidakakuratan data yang bersumber dari kontribusi publik tersebut.

  1. The information displayed on this website is sourced in part or in whole from Wikipedia and has been adapted for the purpose of restating it. We strive to provide accurate and relevant information, however:
  2. There is no guarantee of absolute accuracy. Wikipedia is an open, collaborative project that can be edited by anyone, so information is subject to change.
  3. It is not intended to constitute professional advice. The content displayed is for informational and educational purposes only. For important decisions (e.g., medical, legal, or financial), please consult a professional.
  4. Content copyright. Wikipedia is licensed under the Creative Commons Attribution-ShareAlike License (CC BY-SA). This means that content may be reused with appropriate attribution and shared under a similar license.
  5. Responsible use. Any risk arising from the use of information from this website is entirely the responsibility of the user.