Block Cache, Page Cache, and Multi-Tenant Memory Density2832 words
~14 mins
If every tenant on a host runs its own RocksDB, you have to pick how their memory is shared. The page-cache route lets the OS arbitrate but charges decrypt and decompress on every read. The block-cache route is dramatically faster (37x on point reads against a 10 GB working set with a 1 GiB cache, in the run below) but pushes the arbitration problem back onto you, which is why the first non-trivial piece of the design ends up being a custom allocator.