CLOCK
Approximate-LRU cache eviction with a circular reference bit.
Origin
Fernando Corbato's CLOCK was first described in 1968 as the page-replacement policy for Multics. Postgres uses a variant in its buffer pool; Redis allkeys-lru uses it as approximate LRU.
Where it shows up in production
- Postgres buffer pool Clock-sweep replacement — much cheaper than maintaining strict LRU on hot tables.
- Redis allkeys-lru Sampled approximate LRU; CLOCK-like behaviour at scale.
On Semicolony
Sources & further reading
Found this useful?