Practical Bounds on Optimal Caching with Variable Object Sizes

Many recent caching systems aim to improve miss ratios, but there is no good sense among practitioners of how much further miss ratios can be improved. In other words, should the systems community continue working on this problem? Currently, there is no principled answer to this question. In practice, object sizes often vary by several orders of magnitude, where computing the optimal miss ratio (OPT) is known to be NP-hard. The few known results on caching with variable object sizes provide very weak bounds and are impractical to compute on traces of realistic length. We propose a new method to compute upper and lower bounds on OPT. Our key insight is to represent caching as a min-cost flow problem, hence we call our method the flow-based offline optimal (FOO). We prove that, under simple independence assumptions, FOO's bounds become tight as the number of objects goes to infinity. Indeed, FOO's error over 10M requests of production CDN and storage traces is negligible: at most 0.3%. FOO thus reveals, for the first time, the limits of caching with variable object sizes. While FOO is very accurate, it is computationally impractical on traces with hundreds of millions of requests. We therefore extend FOO to obtain more efficient bounds on OPT, which we call practical flow-based offline optimal (PFOO). We evaluate PFOO on several full production traces and use it to compare OPT to prior online policies. This analysis shows that current caching systems are in fact still far from optimal, suffering 11--43% more cache misses than OPT, whereas the best prior offline bounds suggest that there is essentially no room for improvement.

[1]  Feller William,et al.  An Introduction To Probability Theory And Its Applications , 1950 .

[2]  Irfan Ahmad,et al.  Cache Modeling and Optimization using Miniature Simulations , 2017, USENIX Annual Technical Conference.

[3]  Hao Che,et al.  Hierarchical Web caching systems: modeling, design and experimental results , 2002, IEEE J. Sel. Areas Commun..

[4]  Marek Chrobak,et al.  Caching Is Hard - Even in the Fault Model , 2010, ESA.

[5]  W. Frank King,et al.  Analysis of Demand Paging Algorithms , 1971, IFIP Congress.

[6]  Fernando Paganini,et al.  Optimizing TTL Caches under Heavy-Tailed Demands , 2016, SIGMETRICS.

[7]  David A. Wood,et al.  A Comparison of Trace-Sampling Techniques for Multi-Megabyte Caches , 1994, IEEE Trans. Computers.

[8]  Gerhard Weikum,et al.  An optimality proof of the LRU-K page replacement algorithm , 1999, JACM.

[9]  Ludmila Cherkasova,et al.  Improving WWW Proxies Performance with Greedy-Dual- Size-Frequency Caching Policy , 1998 .

[10]  Massimo Gallo,et al.  Performance evaluation of the random replacement policy for networks of caches , 2012, SIGMETRICS '12.

[11]  Michele Garetto,et al.  A unified approach to the performance analysis of caching systems , 2014, INFOCOM.

[12]  Rajeev Motwani,et al.  Modeling correlations in web traces and implications for designing replacement policies , 2004, Comput. Networks.

[13]  Daniel Sánchez,et al.  Modeling cache performance beyond LRU , 2016, 2016 IEEE International Symposium on High Performance Computer Architecture (HPCA).

[14]  Predrag R. Jelenkovic,et al.  Performance of the move-to-front algorithm with Markov-modulated request sequences , 1999, Oper. Res. Lett..

[15]  Alan L. Cox,et al.  GD-Wheel: a cost-aware replacement policy for key-value stores , 2015, EuroSys.

[16]  Irving L. Traiger,et al.  Evaluation Techniques for Storage Hierarchies , 1970, IBM Syst. J..

[17]  Gerhard Weikum,et al.  The LRU-K page replacement algorithm for database disk buffering , 1993, SIGMOD Conference.

[18]  Ramesh K. Sitaraman,et al.  Overlay Networks: An Akamai Perspective , 2014 .

[19]  Laszlo A. Belady,et al.  A Study of Replacement Algorithms for Virtual-Storage Computer , 1966, IBM Syst. J..

[20]  Christos Koufogiannakis,et al.  A Nearly Linear-Time PTAS for Explicit Fractional Packing and Covering Linear Programs , 2013, Algorithmica.

[21]  Stratis Ioannidis,et al.  Adaptive Caching Networks With Optimality Guarantees , 2016, IEEE/ACM Transactions on Networking.

[22]  Peter J. Denning,et al.  Operating Systems Theory , 1973 .

[23]  Pietro Michiardi,et al.  Cache policies for linear utility maximization , 2017, INFOCOM.

[24]  Binny S. Gill On Multi-level Exclusive Caching: Offline Optimality and Why Promotions Are Better Than Demotions , 2008, FAST.

[25]  Vassilis G. Papanicolaou,et al.  The Coupon Collector's Problem Revisited: Asymptotics of the Variance , 2012, Advances in Applied Probability.

[26]  Sachin Katti,et al.  Cliffhanger: Scaling Performance Cliffs in Web Memory Caches , 2016, NSDI.

[27]  Benny Van Houdt,et al.  Transient and steady-state regime of a family of list-based cache replacement algorithms , 2016, Queueing Syst. Theory Appl..

[28]  John McCabe,et al.  On Serial Files with Relocatable Records , 1965 .

[29]  Eliane R. Rodrigues THE PERFORMANCE OF THE MOVE-TO-FRONT SCHEME UNDER SOME PARTICULAR FORMS OF MARKOV REQUESTS , 1995 .

[30]  Ole Tange,et al.  GNU Parallel: The Command-Line Power Tool , 2011, login Usenix Mag..

[31]  Akanksha Jain,et al.  Back to the Future: Leveraging Belady's Algorithm for Improved Cache Replacement , 2016, 2016 ACM/IEEE 43rd Annual International Symposium on Computer Architecture (ISCA).

[32]  Asit Dan,et al.  An approximate analysis of the LRU and FIFO buffer replacement schemes , 1990, SIGMETRICS '90.

[33]  Daniel Sánchez,et al.  Talus: A simple way to remove cliffs in cache performance , 2015, 2015 IEEE 21st International Symposium on High Performance Computer Architecture (HPCA).

[34]  Reuven Bar-Yehuda,et al.  A unified approach to approximating resource allocation and scheduling , 2000, STOC '00.

[35]  David Pisinger,et al.  Large Neighborhood Search , 2018, Handbook of Metaheuristics.

[36]  Joseph Naor,et al.  Randomized Competitive Algorithms for Generalized Caching , 2012, SIAM J. Comput..

[37]  Naoto Miyoshi,et al.  Fluid limit analysis of FIFO and RR caching for independent reference models , 2012, Perform. Evaluation.

[38]  Daniel A. Spielman,et al.  Faster approximate lossy generalized flow via interior point algorithms , 2008, STOC.

[39]  Florin Ciucu,et al.  Exact analysis of TTL cache networks , 2014, Perform. Evaluation.

[40]  Chandra Chekuri,et al.  Multicommodity demand flow in a tree and packing integer programs , 2007, TALG.

[41]  Béla Bollobás,et al.  The Height of a Random Partial Order: Concentration of Measure , 1992 .

[42]  Alfred V. Aho,et al.  Principles of Optimal Page Replacement , 1971, J. ACM.

[43]  Tony Tung,et al.  Scaling Memcache at Facebook , 2013, NSDI.

[44]  David K. Smith Network Flows: Theory, Algorithms, and Applications , 1994 .

[45]  W. Hoeffding A Non-Parametric Test of Independence , 1948 .

[46]  Neal E. Young,et al.  On-Line Paging Against Adversarially Biased Random Inputs , 2000, J. Algorithms.

[47]  Ioannis Stavrakakis,et al.  Approximate analysis of LRU in the case of short term correlations , 2008, Comput. Networks.

[48]  Philippe Robert,et al.  A versatile and accurate approximation for LRU cache performance , 2012, 2012 24th International Teletraffic Congress (ITC 24).

[49]  L. Dagum,et al.  OpenMP: an industry standard API for shared-memory programming , 1998 .

[50]  Andreas Karrenbauer,et al.  A Combinatorial $\tilde{O}(m^{3/2})$-time Algorithm for the Min-Cost Flow Problem , 2013, ArXiv.

[51]  Jirí Sgall,et al.  General Caching Is Hard: Even with Small Pages , 2015, Algorithmica.

[52]  Armand M. Makowski,et al.  Optimal replacement policies for nonuniform cache objects with optional eviction , 2003, IEEE INFOCOM 2003. Twenty-second Annual Joint Conference of the IEEE Computer and Communications Societies (IEEE Cat. No.03CH37428).

[53]  James Allen Fill,et al.  On the distribution of search cost for the move-to-front rule , 1996, Random Struct. Algorithms.

[54]  Predrag R. Jelenkovic,et al.  Least-recently-used caching with dependent requests , 2004, Theor. Comput. Sci..

[55]  Ao Tang,et al.  A Generalized Coupon Collector Problem , 2010, Journal of Applied Probability.

[56]  Sanjeev Khanna,et al.  Page replacement for general caching problems , 1999, SODA '99.

[57]  Roy Friedman,et al.  TinyLFU: A Highly Efficient Cache Admission Policy , 2014, 2014 22nd Euromicro International Conference on Parallel, Distributed, and Network-Based Processing.

[58]  Mihaela van der Schaar,et al.  Popularity-driven content caching , 2016, IEEE INFOCOM 2016 - The 35th Annual IEEE International Conference on Computer Communications.

[59]  David Tse,et al.  Probabilistic methods for web caching , 2001, Perform. Evaluation.

[60]  W. W. Daniel Applied Nonparametric Statistics , 1979 .

[61]  Robbert van Renesse,et al.  An analysis of Facebook photo caching , 2013, SOSP.

[62]  Konstantinos Psounis,et al.  A randomized Web-cache replacement scheme , 2001, Proceedings IEEE INFOCOM 2001. Conference on Computer Communications. Twentieth Annual Joint Conference of the IEEE Computer and Communications Society (Cat. No.01CH37213).

[63]  Peter J. Varman,et al.  PC-OPT: Optimal Offline Prefetching and Caching for Parallel I/O Systems , 2002, IEEE Trans. Computers.

[64]  Bruno Sericola,et al.  New results on a generalized coupon collector problem using Markov chains , 2015 .

[65]  Florin Ciucu,et al.  Maximizing Cache Hit Ratios by Variance Reduction , 2015, PERV.

[66]  Bruce M. Maggs,et al.  Algorithmic Nuggets in Content Delivery , 2015, CCRV.

[67]  Erol Gelenbe,et al.  A Unified Approach to the Evaluation of a Class of Replacement Algorithms , 1973, IEEE Transactions on Computers.

[68]  Peter Neal,et al.  The Generalised Coupon Collector Problem , 2008, Journal of Applied Probability.

[69]  P. Pardalos,et al.  Handbook of Combinatorial Optimization , 1998 .

[70]  James Allen Fill,et al.  THE MOVE-TO-FRONT RULE FOR SELF-ORGANIZING LISTS WITH MARKOV DEPENDENT REQUESTS· , 1995 .

[71]  Alhussein A. Abouzeid,et al.  Optimal Device-Aware Caching , 2017, IEEE Transactions on Mobile Computing.

[72]  M E J Newman,et al.  Random graph models for directed acyclic networks. , 2009, Physical review. E, Statistical, nonlinear, and soft matter physics.

[73]  Ramesh K. Sitaraman,et al.  AdaptSize: Orchestrating the Hot Object Memory Cache in a Content Delivery Network , 2017, NSDI.

[74]  Gabi Dreo Rodosek,et al.  Simulation and optimization of Content Delivery Networks considering user profiles and preferences of Internet Service Providers , 2016, 2016 Winter Simulation Conference (WSC).

[75]  P. J. Burville,et al.  On a model for storage and search , 1973, Journal of Applied Probability.

[76]  Li Fan,et al.  Web caching and Zipf-like distributions: evidence and implications , 1999, IEEE INFOCOM '99. Conference on Computer Communications. Proceedings. Eighteenth Annual Joint Conference of the IEEE Computer and Communications Societies. The Future is Now (Cat. No.99CH36320).

[77]  Vijay V. Vazirani,et al.  Approximation Algorithms , 2001, Springer Berlin Heidelberg.

[78]  Philippe Flajolet,et al.  Birthday Paradox, Coupon Collectors, Caching Algorithms and Self-Organizing Search , 1992, Discret. Appl. Math..

[79]  Sandy Irani,et al.  Page Replacement with Multi-Size Pages and Applications to Web Caching , 2002, Algorithmica.

[80]  Edward A. Fox,et al.  Caching Proxies: Limitations and Potentials , 1995, WWW.

[81]  P. Jelenkovic Asymptotic approximation of the move-to-front search cost distribution and least-recently used caching fault probabilities , 1999 .

[82]  W. J. Hendricks The stationary distribution of an interesting Markov chain , 1972, Journal of Applied Probability.

[83]  Predrag R. Jelenkovic,et al.  Optimizing LRU Caching for Variable Document Sizes , 2004, Combinatorics, Probability and Computing.

[84]  Michael J. Freedman,et al.  Hyperbolic Caching: Flexible Caching for Web Applications , 2017, USENIX ATC.

[85]  Pierre Michaud,et al.  Some Mathematical Facts About Optimal Cache Replacement , 2016, ACM Trans. Archit. Code Optim..