I'm building an implementation of the dynamo paper, yottastore. Given a key, I need to find which NVMe block stores the data. To do that I hash the key to find the shard where I have an in memory array in which at position [hash] I can find a struct with:
- 32 bit hash (needed for resizing)
- 64 bit pointer to NVMe block
- 32 bit of metadata
The random storage node is: 48 core cpu, 1 tb ram, 24*16 tb SSD
At 128 bit per key-value, it's 64 GB of ram per 16 TB disk, or 1.5 TB of ram in total, way too much.
How could I deal with this?
Options I envisioned:
Using a btree, but it will make access much slower, and I still have 96 bit of records to deal with
Pointer compression: I could divide the disks in zones of 256 mb, so for each record I will only need a 16 bit offsets instead of 64 bits. I would also need to store a a 64 bit start for each zone in a separate hash table
I could mix the approaches, storing a btree to find the zone, and then having an hashmap with offsets
Any other ideas? The array already persists on disk with a LSM tree, I would like to have an in memory copy for fast access.
tableName/recordName
I get the 64 bit pointer representing the sector number on disk $\endgroup$