2026-07-16
ARC is smart but has a dirty secret: every hit moves an entry between LRU lists, which means grabbing a lock. On a cache serving a million reads per second across 64 cores, that lock becomes the bottleneck. CAR (Clock with Adaptive Replacement) keeps ARC's self-tuning brain but replaces the LRU lists with CLOCK's reference-bit sweep — so reads become a single atomic bit flip instead of a list splice.
The structure. CAR keeps four data structures, just like ARC:
A tuning parameter p controls the target size of T1. Cache size is c; ghost lists together also hold roughly c keys.
On a hit, just set the reference bit to 1. That's it. No list movement, no lock contention. The reorganization work happens lazily during eviction.
On a miss, CAR does what ARC does — checks the ghost lists. Hit in B1? Increase p (bias toward recency). Hit in B2? Decrease p. Then evict from T1 or T2 depending on which is over its target size. Eviction sweeps the CLOCK hand: if the reference bit is 1, clear it and give the page a second chance; if it's 0, evict.
Real-world example. PostgreSQL's buffer manager uses a CLOCK variant precisely because grabbing an LRU list lock on every buffer pin would serialize the whole database. CAR extends this: NetApp's WAFL filesystem and IBM's DS8000 storage controllers use CAR (and its successor CART) for their read caches, where hit rates matter but so does concurrency across dozens of I/O threads.
Rule of thumb. If your workload's hit path is contended — many threads reading the cache concurrently — CAR beats ARC not because it caches smarter but because it caches without stopping. Measured hit rates are typically within 1–2% of ARC on standard traces (OLTP, web, DB), while lock contention drops by an order of magnitude on 16+ core machines.
When to skip it. Single-threaded caches, or caches where the working set fits comfortably in memory anyway. The complexity of four structures plus adaptive tuning plus CLOCK bookkeeping only pays off when both concurrency and eviction quality matter simultaneously.
