<< Back to previous view

[CCACHE-38] Add ARC or CAR algorithm Created: 25/Nov/14  Updated: 25/Nov/14

Status: Open
Project: core.cache
Component/s: None
Affects Version/s: None
Fix Version/s: None

Type: Enhancement Priority: Major
Reporter: Daniel Compton Assignee: Fogus
Resolution: Unresolved Votes: 0
Labels: None


Both ARC and CAR algorithm's look like they could be an improvement on LIRS and LRU algorithms. Specifically, both of them are better at keeping frequently used items in cache.

From: http://en.wikipedia.org/wiki/Cache_algorithms#Examples

Adaptive Replacement Cache (ARC)
Constantly balances between LRU and LFU, to improve the combined result. ARC improves on SLRU by using information about recently-evicted cache items to dynamically adjust the size of the protected segment and the probationary segment to make the best use of the available cache space.

Clock with Adaptive Replacement (CAR)
Combines Adaptive Replacement Cache (ARC) and CLOCK. CAR has performance comparable to ARC, and substantially outperforms both LRU and CLOCK. Like ARC, CAR is self-tuning and requires no user-specified magic parameters.

More details on ARC are at http://blog.acolyer.org/2014/10/08/outperforming-lru-with-an-adaptive-replacement-cache-algorithm/, and the paper is at http://dbs.uni-leipzig.de/file/ARC.pdf.

CAR details are at https://www.usenix.org/conference/fast-04/car-clock-adaptive-replacement

If there is interest in this then I could look at benchmarking both of them, and putting together a patch.

Generated at Fri Nov 28 02:42:26 CST 2014 using JIRA 4.4#649-r158309.