Advertisement

The Journal of Supercomputing

, Volume 74, Issue 6, pp 2729–2746 | Cite as

Time-shift replacement algorithm for main memory performance optimization

  • Hong-Bin Tsai
  • Chin-Laung Lei
Article
  • 90 Downloads

Abstract

Page replacement algorithms of main memory in modern operating systems are crucial in system performance. When memory is full, a page replacement algorithm exploits temporal locality and frequency of page references to evict the page that is least likely to be accessed in the near future. Subsequently, loading the majority of data directly from memory improves performance by reducing I/O waits of accessing slow storage. Research of replacement algorithms that maximizes hit ratio while incurring as less overhead as possible has been constantly studied. In this paper, we propose a time-shift least recently used (TSLRU) algorithm that converts frequency information of page references into temporal locality. Frequent accesses of a page are thus recognized and accumulated in terms of time. Moreover, pages being loaded into memory for the first time are not necessarily the most recently used pages. As a result, one-pass pages are evicted sooner in our algorithm than in traditional LRU algorithm. Our performance evaluations show that the TSLRU outperforms conventional page replacement algorithms on both artificial and real application traces. For example, hit ratio of TSLRU advances ARC by \(4.17\%\) and LRU by \(5.91\%\) on normal distributed workloads. Moreover, TSLRU outperforms ARC by over \(2\%\) on half of the application traces tested.

Keywords

Page replacement algorithm Least recently used Virtual memory management Operating system Performance optimization 

References

  1. 1.
    Aho AV, Denning PJ, Ullman JD (1971) Principles of optimal page replacement. J ACM 18(1):80–93.  https://doi.org/10.1145/321623.321632 MathSciNetCrossRefzbMATHGoogle Scholar
  2. 2.
    Bansal S, Modha DS (2004) CAR: clock with adaptive replacement. In: Proceedings of the 3rd USENIX Conference on File and Storage Technologies, USENIX Association, Berkeley, CA, USA, FAST ’04, pp 187–200. http://dl.acm.org/citation.cfm?id=1096673.1096699
  3. 3.
    Bélády LA (1966) A study of replacement algorithms for a virtual-storage computer. IBM Syst J 5(2):78–101.  https://doi.org/10.1147/sj.52.0078 CrossRefGoogle Scholar
  4. 4.
    Berger DS, Sitaraman RK, Harchol-Balter M (2017) 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, USENIX Association, Boston, MA, NSDI ’17, pp 483–498. https://www.usenix.org/conference/nsdi17/technical-sessions/presentation/berger
  5. 5.
    Floratou A, Megiddo N, Potti N, Özcan F, Kale U, Schmitz-Hermes J (2016) Adaptive caching in big SQL using the HDFS cache. In: Proceedings of the 7th ACM Symposium on Cloud Computing, ACM, New York, NY, USA, SoCC ’16, pp 321–333.  https://doi.org/10.1145/2987550.2987553
  6. 6.
    Gill BS, Modha DS (2005) SARC: sequential prefetching in adaptive replacement cache. In: Proceedings of the Annual Conference on USENIX Annual Technical Conference, USENIX Association, Berkeley, CA, USA, ATEC ’05, pp 33–33. http://dl.acm.org/citation.cfm?id=1247360.1247393
  7. 7.
    Hong B, Kwon Y, Ahn JH, Kim J (2016) Adaptive and flexible key-value stores through soft data partitioning. In: Proceedings of the 34th IEEE International Conference on Computer Design, IEEE Press, Phoenix, AZ, USA, ICCD ’16, pp 296–303.  https://doi.org/10.1109/ICCD.2016.7753293
  8. 8.
    Huang S, Wei Q, Feng D, Chen J, Chen C (2016) Improving flash-based disk cache with lazy adaptive replacement. Trans Storage 12(2):8:1–8:24.  https://doi.org/10.1145/2737832 CrossRefGoogle Scholar
  9. 9.
    Jiang S, Zhang X (2002) LIRS: an efficient low inter-reference recency set replacement policy to improve buffer cache performance. SIGMETRICS Perform Eval Rev 30(1):31–42.  https://doi.org/10.1145/511399.511340 CrossRefGoogle Scholar
  10. 10.
    Johnson T, Shasha D (1994) 2Q: a low overhead high performance buffer management replacement algorithm. In: Proceedings of the 20th International Conference on Very Large Data Bases, Morgan Kaufmann Publishers Inc., San Francisco, CA, USA, VLDB ’94, pp 439–450. http://dl.acm.org/citation.cfm?id=645920.672996
  11. 11.
    Karedla R, Love JS, Wherry BG (1994) Caching strategies to improve disk system performance. Computer 27(3):38–46.  https://doi.org/10.1109/2.268884 CrossRefGoogle Scholar
  12. 12.
    Kim D, Bahn H (2017) Exploiting write-only-once characteristics of file data in smartphone buffer cache management. Pervasive Mobile Comput.  https://doi.org/10.1016/j.pmcj.2017.01.004. http://www.sciencedirect.com/science/article/pii/S1574119216301948
  13. 13.
    Koller R, Rangaswami R (2010) I/O deduplication: utilizing content similarity to improve I/O performance. Trans Storage 6(3):13:1–13:26.  https://doi.org/10.1145/1837915.1837921 CrossRefGoogle Scholar
  14. 14.
    Laboratory for Advanced System Software (2013) UMass trace repository. http://traces.cs.umass.edu/index.php/Storage/Storage. Accessed 13 Feb 2017
  15. 15.
    Lee D, Choi J, Kim JH, Noh SH, Min SL, Cho Y, Kim CS (2001) LRFU: a spectrum of policies that subsumes the least recently used and least frequently used policies. IEEE Trans Comput 50(12):1352–1361.  https://doi.org/10.1109/TC.2001.970573 MathSciNetCrossRefGoogle Scholar
  16. 16.
    Lin M, Yao Z, Xiong J (2016) History-aware page replacement algorithm for NAND flash-based consumer electronics. IEEE Trans Consum Electron 62(1):23–29.  https://doi.org/10.1109/TCE.2016.7448559 CrossRefGoogle Scholar
  17. 17.
    Luo T, Ma S, Lee R, Zhang X, Liu D, Zhou L (2013) S-CAVE: effective SSD caching to improve virtual machine storage performance. In: Proceedings of the 22nd International Conference on Parallel Architectures and Compilation Techniques, IEEE Press, Piscataway, NJ, USA, PACT ’13, pp 103–112. http://dl.acm.org/citation.cfm?id=2523721.2523739
  18. 18.
    Tarihi M, Asadi H, Haghdoost A, Arjomand M, Sarbazi-Azad H (2016) A hybrid non-volatile cache design for solid-state drives using comprehensive I/O characterization. IEEE Trans Comput 65(6):1678–1691.  https://doi.org/10.1109/TC.2015.2455978 MathSciNetCrossRefzbMATHGoogle Scholar
  19. 19.
    Megiddo N, Modha DS (2003) ARC: a self-tuning, low overhead replacement cache. In: Proceedings of the 2nd USENIX Conference on File and Storage Technologies, USENIX Association, Berkeley, CA, USA, FAST ’03, pp 115–130. http://dl.acm.org/citation.cfm?id=1090694.1090708
  20. 20.
    Megiddo N, Modha DS (2004) Outperforming LRU with an adaptive replacement cache algorithm. Computer 37(4):58–65.  https://doi.org/10.1109/MC.2004.1297303 CrossRefGoogle Scholar
  21. 21.
    Narayanan D, Donnelly A, Rowstron A (2008) Write off-loading: practical power management for enterprise storage. Trans Storage 4(3):10:1–10:23.  https://doi.org/10.1145/1416944.1416949 CrossRefGoogle Scholar
  22. 22.
    O’Neil EJ, O’Neil PE, Weikum G (1993) The LRU-K page replacement algorithm for database disk buffering. SIGMOD Rec 22(2):297–306.  https://doi.org/10.1145/170036.170081 CrossRefGoogle Scholar
  23. 23.
    Schlosser M, Condie T, Kamvar S (2003) Simulating a file-sharing P2P network. Technical Report 2003-28, Stanford InfoLab. http://ilpubs.stanford.edu:8090/589/
  24. 24.
    Storage Networking Industry Association (SNIA) (2007) IOTTA repository. http://iotta.snia.org/traces/388. Accessed 2 April 2017
  25. 25.
    Tracey D, Sreenan C (2016) CacheL—a cache algorithm using leases for node data in the internet of things. In: Proceedings of the 4th IEEE International Conference on Future Internet of Things and Cloud, IEEE Press, Vienna, Austria, FiCloud ’16, pp 1–8.  https://doi.org/10.1109/FiCloud.2016.9
  26. 26.
    Tsai HB, Lei CL (2017) A page replacement algorithm based on frequency derived from reference history. In: Proceedings of the 32st Annual ACM Symposium on Applied Computing, ACM, New York, NY, USA, SAC ’17, pp 1522–1527.  https://doi.org/10.1145/3019612.3019737
  27. 27.
    Zhou Y, Philbin J, Li K (2001) The multi-queue replacement algorithm for second level buffer caches. In: Proceedings of the General Track: 2001 USENIX Annual Technical Conference, USENIX Association, Berkeley, CA, USA, pp 91–104. http://dl.acm.org/citation.cfm?id=647055.715773

Copyright information

© Springer Science+Business Media, LLC, part of Springer Nature 2018

Authors and Affiliations

  1. 1.Department of Electrical EngineeringNational Taiwan UniversityTaipeiTaiwan
  2. 2.Department of Electrical EngineeringNational Taiwan UniversityTaipeiTaiwan

Personalised recommendations