Menu

1 / 2

Cache policy implementations vs the original papers

DEV Community·Erich·7 months ago
#k6XZoTj5
#scan#database#software#coding#pages
Long article (1500 words) — no AI summary yet.
Reading 0:00
15s threshold

Cache eviction papers are full of hit rate tables. Running the same workloads against your own code is the fastest way to find out if your implementation actually does what the paper describes, or if you read the algorithm wrong. InterchangeDB has six eviction policies behind a single trait, so I ran all six against five access patterns and compared my numbers to the published results.

The setup

FIFO, Clock, LRU, LRU-K, 2Q, and ARC. Five access patterns. Sequential and Random as baselines, Zipfian with 80/20 skew, CyclicScan for a repeating scan slightly larger than the pool, and ScanPlusHot for a hot working set under scan pressure. Pool size is 64, total pages 256, 100,000 accesses per run.

These run against a SimulatedPool with no disk I/O.…

Continue reading — create a free account

Join HashtagPLUS to read full articles, follow hashtags, vote, and join the conversation.