To Cache or Not to Cache
Abstract
:1. Introduction
2. Background and Motivation
2.1. Non-Datapath Caching Algorithms
2.2. The Fear of Missing Out
3. Design
3.1. Miss-History
3.2. FOMO States
Algorithm 1 FOMO algorithm. |
, |
RecordHits(x) |
time++ |
if time % period_size == 0: then |
if state == Insert: then |
if : then |
state = Filter |
else |
if : then |
state = Insert |
CleanUp() |
if x in Cache: then |
Cache.Request(x) |
if x in MissHistory: then |
MissHistory.Remove(x) |
else |
insert = state == Insert |
if x in MissHistory: then |
if state == Filter: then |
MissHistory.Remove(x) |
insert = True |
else |
MissHistory.MoveToFront(x) |
else |
if MissHistory.IsFull(): then |
MissHistory.RemoveLast() |
MissHistory.AddToFront(x) |
if insert: then Cache.Request(x) |
3.3. Overheads
4. Evaluation
4.1. Setup
4.1.1. Algorithms
4.1.2. Experimental Setup
4.1.3. Workloads
4.1.4. Metrics
4.2. Non-Datapath Appropriate Write Rate
4.3. Consistent Hit Rate Performance
4.4. Admission Policy Hit Rate Performance
4.5. FOMO’s Miss-History: A Case Study
4.6. Adversarial Workloads
5. Related Work
5.1. Non-Datapath Caches
5.2. Admission Policies
5.3. Write Optimizing Caches
5.4. Offline Optimality
5.5. Caches for CDNs
6. Conclusions
Author Contributions
Funding
Data Availability Statement
Conflicts of Interest
Abbreviations
FOMO | Fear of Missing Out |
mARC | Multimodal Adaptive Replacement Cache |
LARC | Lazy Adaptive Replacement Cache |
References
- Dan, A.; Towsley, D. An Approximate Analysis of the LRU and FIFO Buffer Replacement Schemes. In Proceedings of the 1990 ACM SIGMETRICS Conference on Measurement and Modeling of Computer Systems, Boulder, CO, USA, 22–25 May 1990. [Google Scholar]
- Tanenbaum, A.S. Modern Operating Systems; Prentice Hall Press: Upper Saddle River, NJ, USA, 2007. [Google Scholar]
- Megiddo, N.; Modha, D. ARC: A Self-tuning, Low Overhead Replacement Cache. In Proceedings of the 2nd USENIX Conference on File and Storage Technologies (FAST’03), San Francisco, CA, USA, 31 March–2 April 2003. [Google Scholar]
- Zhou, Y.; Philbin, J.F.; Li, K. The Multi-Queue Replacement Algorithm for Second Level Buffer Caches. In Proceedings of the USENIX Annual Technical Conference, Boston, MA, USA, 25–30 June 2001; pp. 91–104. [Google Scholar]
- Jiang, S.; Zhang, X. LIRS: An Efficient Low Inter-reference Recency Set Replacement Policy to Improve Buffer Cache Performance. ACM SIGMETRICS Perform. Eval. Rev. 2002, 30, 31–42. [Google Scholar] [CrossRef]
- Leventhal, A. Flash Storage Memory. Commun. ACM 2008, 51, 47–51. [Google Scholar] [CrossRef]
- Byan, S.; Letini, J.; Madan, J.; Pabon, L.; Condict, M.; Kimmel, J.; Kleiman, S.; Small, C.; Storer, M. Mercury: Host-side Flash Caching for the Data Center. In Proceedings of the 2012 IEEE 28th Symposium on Mass Storage Systems and Technologies (MSST), Grove, CA, USA, 16–20 April 2012. [Google Scholar]
- Saxena, M.; Swift, M.M.; Zhang, Y. FlashTier: A Lightweight, Consistent and Durable Storage Cache. In Proceedings of the 7th ACM European Conference on Computer Systems, Bern, Switzerland, 10–13 April 2012. [Google Scholar]
- Boboila, S.; Desnoyers, P. Write Endurance in Flash Drives: Measurements and Analysis. In Proceedings of the 8th USENIX Conference on File and Storage Technologies (FAST’08), San Jose, CA, USA, 23–26 February 2010; pp. 115–128. [Google Scholar]
- Yang, J.; Kim, J.; Hoseinzadeh, M.; Izraelevitz, J.; Swanson, S. An Empirical Guide to the Behavior and Use of Scalable Persistent Memory. In Proceedings of the 18th USENIX Conference on File and Storage Technologies (FAST’20), Santa Clara, CA, USA, 24–27 February 2020; pp. 169–182. [Google Scholar]
- Cheng, Y.; Douglis, F.; Shilane, P.; Wallace, G.; Desnoyers, P.; Li, K. Erasing Belady’s Limitations: In Search of Flash Cache Offline Optimality. In Proceedings of the 2016 USENIX Annual Technical Conference (USENIX ATC 16), Denver, CO, USA, 22–24 June 2016; pp. 379–392. [Google Scholar]
- Zhang, L.; Karimi, R.; Ahmad, I.; Vigfusson, Y. Optimal Data Placement for Heterogeneous Cache, Memory, and Storage Systems. Proc. ACM Meas. Anal. Comput. Syst. 2020, 4, 6. [Google Scholar] [CrossRef]
- Santana, R.; Lyons, S.; Koller, R.; Rangaswami, R.; Liu, J. To ARC Or Not To ARC. In Proceedings of the USENIX HotStorage, Santa Clara, CA, USA, 6–7 July 2015. [Google Scholar]
- Huang, S.; Wei, Q.; Chen, J.; Chen, C.; Feng, D. Improving Flash-based Disk Cache with Lazy Adaptive Replacement. In Proceedings of the 2013 IEEE 29th Symposium on Mass Storage Systems and Technologies (MSST), Long Beach, CA, USA, 6–10 May 2013. [Google Scholar]
- Ajdari, M.; Peykani Sani, P.; Moradi, A.; Khanalizadeh Imani, M.; Bazkhanei, A.H.; Asadi, H. Re-architecting I/O caches for emerging fast storage devices. In Proceedings of the 28th ACM International Conference on Architectural Support for Programming Languages and Operating Systems, Vancouver, BC, Canada, 25–29 March 2023; Volume 3, pp. 542–555. [Google Scholar]
- Yang, J.; Zhang, Y.; Qiu, Z.; Yue, Y.; Vinayak, R. FIFO queues are all you need for cache eviction. In Proceedings of the the 29th Symposium on Operating Systems Principles, Koblenz, Germany, 23–26 October 2023; pp. 130–149. [Google Scholar]
- Einziger, G.; Friedman, R. TinyLFU: A Highly Efficient Cache Admission Policy. In Proceedings of the 2014 22nd Euromicro International Conference on Parallel, Distributed, and Network-Based Processing, Turin, Italy, 12–14 February 2014; pp. 146–153. [Google Scholar]
- Li, C. DLIRS: Improving Low Inter-Reference Recency Set Cache Replacement Policy with Dynamics. In Proceedings of the SYSTOR ’18: International Systems and Storage Conference, Haifa, Israel, 4–7 June 2018; pp. 59–64. [Google Scholar] [CrossRef]
- Caffeine. 2021. Available online: https://github.com/ben-manes/caffeine/ (accessed on 1 September 2023).
- SNIA. Block I/O Traces. Available online: http://iotta.snia.org/traces/block-io (accessed on 1 September 2023).
- Storage Networking Industry Association. The SNIA’s I/O Traces, Tools, and Analysis (IOTTA) Repository. Available online: http://iotta.snia.org/ (accessed on 2 September 2023).
- Koller, R.; Rangaswami, R. I/O Deduplication: Utilizing Content Similarity to Improve I/O Performance. In Proceedings of the USENIX Conference on File and Storage Technologies (FAST’10), San Jose, CA, USA, 23–26 February 2010. [Google Scholar]
- Narayanan, D.; Donnelly, A.; Thereska, E.; Elnikety, S.; Rowstron, A. Everest: Scaling Down Peak Loads Through I/O Off-Loading. In Proceeding of the USENIX Symposium on Operating Systems Design and Implementation (OSDI’08), San Diego, CA, USA, 8–10 December 2008. [Google Scholar]
- Arteaga, D.; Zhao, M. Client-side Flash Caching for Cloud Systems. In Proceedings of the International Conference on Systems and Storage (SYSTOR 2014), Haifa, Israel, 30 June–2 July 2014; pp. 7:1–7:11. [Google Scholar] [CrossRef]
- Waldspurger, C.A.; Park, N.; Garthwaite, A.; Ahmad, I. Efficient MRC Construction with SHARDS. In Proceedings of the 13th USENIX Conference on File and Storage Technologies (FAST’15), Santa Clara, CA, USA, 16–19 February 2015; pp. 95–110. [Google Scholar]
- Huang, H.; Hung, W.; Shin, K.G. FS2: Dynamic Data Replication In Free Disk Space For Improving Disk Performance And Energy Consumption. In Proceedings of the SOSP05: ACM SIGOPS 20th Symposium on Operating Systems Principles, Brighton, UK, 23–26 October 2005. [Google Scholar]
- Tolia, N.; Kozuch, M.; Satyanarayanan, M.; Karp, B.; Bressoud, T. Opportunistic Use of Content Addressable Storage for Distributed File Systems. In Proceeding of the USENIX Annual Technical Conference, San Antonio, TX, USA, 9–14 June 2003. [Google Scholar]
- Li, W.; Jean-Baptise, G.; Riveros, J.; Narasimhan, G.; Zhang, T.; Zhao, M. CacheDedup: In-line Deduplication for Flash Caching. In Proceedings of the 14th USENIX Conference on File and Storage Technologies (FAST’16), Santa Clara, CA, USA, 22–25 February 2016; pp. 301–314. [Google Scholar]
- Facebook Inc. Facebook FlashCache. Available online: https://github.com/facebook/flashcache/ (accessed on 31 December 2012).
- Beckmann, N.; Chen, H.; Cidon, A. LHD: Improving Cache Hit Rate by Maximizing Hit Density. In Proceedings of the 15th USENIX Symposium on Networked Systems Design and Implementation (NSDI 18), Renton, WA, USA, 9–11 April 2018; pp. 389–403. [Google Scholar]
- Yang, T.W.; Pollen, S.; Uysal, M.; Merchant, A.; Wolfmeister, H. {CacheSack}: Admission Optimization for Google Datacenter Flash Caches. In Proceedings of the 2022 USENIX Annual Technical Conference (USENIX ATC 22), Carlsbad, CA, USA, 11–13 July 2022; pp. 1021–1036. [Google Scholar]
- Park, S.; Jung, D. CFLRU: A Replacement Algorithm for Flash Memory. In Proceedings of the 2006 International Conference on Compilers, Architecture and Synthesis for Embedded Systems, Seoul, Republic of Korea, 22–25 October 2006; pp. 234–241. [Google Scholar]
- Berger, D.S. Towards Lightweight and Robust Machine Learning for CDN Caching. In Proceedings of the HotNets’18: The 17th ACM Workshop on Hot Topics in Networks, Redmond, WA, USA, 15–16 November 2018; pp. 134–140. [Google Scholar] [CrossRef]
- Berger, D.S.; Beckmann, N.; Harchol-Balter, M. Practical Bounds on Optimal Caching with Variable Object Sizes. arXiv 2017, arXiv:1711.03709. [Google Scholar]
- Atre, N.; Sherry, J.; Wang, W.; Berger, D.S. Caching with Delayed Hits. In Proceedings of the SIGCOMM’20: The Annual Conference of the ACM Special Interest Group on Data Communication on the Applications, Technologies, Architectures, and Protocols for Computer Communication, Virtual Event, 10–14 August 2020; pp. 495–513. [Google Scholar] [CrossRef]
- Song, Z.; Berger, D.S.; Li, K.; Lloyd, W. Learning Relaxed Belady for Content Distribution Network Caching. In Proceedings of the 17th USENIX Symposium on Networked Systems Design and Implementation (NSDI20), Santa Clara, CA, USA, 25–27 February 2020; pp. 529–544. [Google Scholar]
- Liu, K.; Wu, K.; Wang, H.; Zhou, K.; Wang, P.; Zhang, J.; Li, C. SLAP: Segmented Reuse-Time-Label Based Admission Policy for Content Delivery Network Caching. ACM Trans. Archit. Code Optim. 2024, 21, 1–24. [Google Scholar] [CrossRef]
- Berger, D.S.; Sitaraman, R.K.; Harchol-Balter, M. AdaptSize: Orchestrating the Hot Object Memory Cache in a Content Delivery Network. In Proceedings of the 14th USENIX Symposium on Networked Systems Design and Implementation (NSDI 17), Boston, MA, USA, 27–29 March 2017; pp. 483–498. [Google Scholar]
Dataset | # Traces | Details |
---|---|---|
FIU [21,22] | 10 | End user/developer home directories; Web server for faculty/staff/students; Apache webserver for research projects; Web interface for the mail server; Online course management system |
MSR [21,23] | 36 | User home directories; Hardware monitoring; Source control; Web staging; Test web server |
CloudVPS [24] | 18 | VMs for cloud provider |
CloudCache [24] | 6 | Online course management website; Web server for a CS department user webpages |
CloudPhysics [25] | 106 | VMware VM block traces. Due to the size of many of the traces within this set, only the first day of each trace was used for tests. |
Disclaimer/Publisher’s Note: The statements, opinions and data contained in all publications are solely those of the individual author(s) and contributor(s) and not of MDPI and/or the editor(s). MDPI and/or the editor(s) disclaim responsibility for any injury to people or property resulting from any ideas, methods, instructions or products referred to in the content. |
© 2024 by the authors. Licensee MDPI, Basel, Switzerland. This article is an open access article distributed under the terms and conditions of the Creative Commons Attribution (CC BY) license (https://creativecommons.org/licenses/by/4.0/).
Share and Cite
Lyons, S., Jr.; Rangaswami, R. To Cache or Not to Cache. Algorithms 2024, 17, 301. https://doi.org/10.3390/a17070301
Lyons S Jr., Rangaswami R. To Cache or Not to Cache. Algorithms. 2024; 17(7):301. https://doi.org/10.3390/a17070301
Chicago/Turabian StyleLyons, Steven, Jr., and Raju Rangaswami. 2024. "To Cache or Not to Cache" Algorithms 17, no. 7: 301. https://doi.org/10.3390/a17070301
APA StyleLyons, S., Jr., & Rangaswami, R. (2024). To Cache or Not to Cache. Algorithms, 17(7), 301. https://doi.org/10.3390/a17070301