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


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.


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


  1. 1.
    Aho AV, Denning PJ, Ullman JD (1971) Principles of optimal page replacement. J ACM 18(1):80–93. 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.
  3. 3.
    Bélády LA (1966) A study of replacement algorithms for a virtual-storage computer. IBM Syst J 5(2):78–101. 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.
  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.
  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.
  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.
  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. 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. 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.
  11. 11.
    Karedla R, Love JS, Wherry BG (1994) Caching strategies to improve disk system performance. Computer 27(3):38–46. 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.
  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. CrossRefGoogle Scholar
  14. 14.
    Laboratory for Advanced System Software (2013) UMass trace repository. 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. 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. 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.
  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. 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.
  20. 20.
    Megiddo N, Modha DS (2004) Outperforming LRU with an adaptive replacement cache algorithm. Computer 37(4):58–65. 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. 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. CrossRefGoogle Scholar
  23. 23.
    Schlosser M, Condie T, Kamvar S (2003) Simulating a file-sharing P2P network. Technical Report 2003-28, Stanford InfoLab.
  24. 24.
    Storage Networking Industry Association (SNIA) (2007) IOTTA repository. 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.
  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.
  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.

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