Skip to main content
Log in

Applying machine learning to enhance the cache performance using reuse distance

  • Research Paper
  • Published:
Evolutionary Intelligence Aims and scope Submit manuscript

Abstract

The motivation for the search of efficient cache management policies is due to the drawback of the large number of CPU cycles taken to fetch a block from the main memory to the last level cache. Recently, Researchers are using most recent advancements in machine learning (ML) to optimise the performance of cache. They designed different models using ML techniques to improve the performance of cache. Unfortunately, the schemes suffer from several drawbacks like storage complexity incurred while storing the extra bits required for prediction, excess time required for prediction, increase in difficulty of reuse prediction when workloads are increased, increase in energy consumption during the prediction process and lack in achieving expected accuracy. In order to overcome these drawbacks, cache reuse prediction is analysed using classification problem, which is actual view of the learning problem. The vital parameters used are the Frequency of access and reuse distance, in which the latter is modelled as stack distance. As an innovative idea, reuse distance is calculated based on status of each block into account. In addition, numerical nature of the dataset used in this article, helps in exploration of the ensemble-based ML, which is less frequently experimented into the context of cache memories rather than the deep learning approach. By applying suitably placed models, the memory references with high reuse capabilities are fetched into the cache. They are predicted with the aid of classification and cross-validation on the feature sets, which improve the accuracy and sensitivity by 6.2% and 5.46% respectively, when compared to the existing works.

This is a preview of subscription content, log in via an institution to check access.

Access this article

Price excludes VAT (USA)
Tax calculation will be finalised during checkout.

Instant access to the full article PDF.

Fig. 1
Fig. 2
Fig. 3
Fig. 4
Fig. 5
Fig. 6
Fig. 7
Fig. 8
Fig. 9
Fig. 10
Fig. 11
Fig. 12
Fig. 13
Fig. 14
Fig. 15
Fig. 16
Fig. 17
Fig. 18
Fig. 19

Similar content being viewed by others

Data availability

The data generated during and/or analysed during the current study are available from the corresponding author on reasonable request.

References

  1. Jiménez DA, Lin C (2001) Dynamic branch prediction with perceptrons. In: Proceedings of HPCA seventh international symposium on high-performance computer architecture, pp 197–206

  2. Jimenez DA, Teran E (2017) Multi perspective reuse prediction. In: Proceedings of the 50th Annual IEEE/ACM international symposium on microarchitecture (MICRO-50), pp 436 –448. https://doi.org/10.1145/3123939.3123942

  3. Teran E, Wang Z, Jimenez DA (2016) Perceptron learning for reuse prediction. In: 49thAnnual IEEE/ACM international symposium on microarchitecture (MICRO). https://doi.org/10.1109/micro.2016.7783705

  4. Rai JK, Negi A, Wankar R, Nayak KD (2010) A ML based meta-scheduler for multi-core processors. Int J Adapt Resil Auton Syst 1(4):46–59. https://doi.org/10.4018/jaras.2010100104

    Article  Google Scholar 

  5. Pekhimenko G, Huberty T, Cai R, Mutlu O, Gibbons PB, Kozuch MA, Mowry TC (2015) Exploiting compressed block size as an indicator of future reuse. In: 2015 IEEE 21st international symposium on high performance computer architecture (HPCA), pp 51–63

  6. Wu C-J, Jaleel A , Hasenplaugh W, Martonosi M, Simon J, Steely C, Emer J (2011) SHiP Signature-based hit predictor for high performance caching. In: Proceedings of the 44th annual IEEE/ ACM international symposium on microarchitecture (MICRO- 44) New York, NY, USA, pp 430–441

  7. Peled L, Weiser U, Etsion Y (2018) A neural network memory prefetcher using semantic locality

  8. Keramidas G, Petoumenos P, Kaxiras S (2007) Cache replacement based on reuse- distance prediction. In: 25th international conference on computer design, pp 245–250

  9. Ajorpaz SM, Garza E, Jindal S, Jiménez DA (2018) Exploring predictive replacement policies for instruction cache and branch target buffer. In: ACM/ IEEE 45th annual international symposium on computer architecture (ISCA), pp 519–532

  10. Lai AC, Falsafi B (2000) Selective, accurate, and timely self-invalidation using last-touch prediction. In: International symposium on computer architecture, pp 139–148

  11. Lai AC, Falsafi Fide CB (2001) Dead-block prediction and dead-block correlating prefetchers. SIGARCH Comput Archit News 29(2):144–154

    Article  Google Scholar 

  12. Somogyi S, Wenisch TF, Hardavellas, N, Kim J, Ailamaki A , Falsafi B (2004) Memory coherence activity prediction in commercial workloads. In: Proceedings of the 3rd workshop on memory performance issues(WMPI ’04), New York, NY, USA, pp 37–45

  13. Hu Z, Kaxira S, Martonosi M (2002) Timekeeping in the memory system: predicting and optimizing memory behavior. SIGARCH Computer Archit News 30(2):209–220

    Article  Google Scholar 

  14. Abella A, Gonzalez X, Vera M, O’Boy FP (2005) Iatac: a smart predictor to turn-off l2 cache lines. ACM Trans Archit Code Optim 2(1):55–77

    Article  Google Scholar 

  15. Liu H, Ferdman M, Huh ,Burger D (2008) Cache bursts: a new approach for eliminating dead blocks and increasing cache efficiency. In: Proceedings of the IEEE/ ACM international symposium on microarchitecture, Los Alamitos, CA, USA, pp 222–233

  16. Khan SM, Tian Y, Jimenez DA ( 2010) Sampling dead block prediction for last-level caches. In: 43rd Annual IEEE/ACM international symposium on microarchitecture, pp 175–186

  17. Sweety Prachi C (2018) Branch prediction techniques used in pipeline processors: a review. Int J Pure Appl Math 119(15):2843–2851

    Google Scholar 

  18. Rosenblatt F (1962) Principles of neurodynamic: perceptrons and the theory of brain mechanisms. Spartan, London

    MATH  Google Scholar 

  19. Shi Z, Huang X, Jain A, Lin C (2019) Applying deep learning to the cache replacement problem. In: Proceedings of the 52nd annual IEEE/ACM international symposium on microarchitecture, pp 413–425

  20. Gawehn E, Hiss JA, Schneider G (2016) Deep learning in drug discovery. Mol Inf 2:1178

    Google Scholar 

  21. Goh GB, Hodas NO, Vishnu A (2017) Deep learning for computational chemistry. J Comput Chem 38(16):11258

    Article  Google Scholar 

  22. Vietri G, Rodriguez LV, Martinez WA, Lyons S, Liu J, Rangaswami R, Narasimhan G (2018) Driving cache replacement with ml-based lecar. In: 10th USENIX workshop on hot topics in storage and filesystems

  23. Hashemi M, Swersky K, Smith JA, Ayers G, Litz H, Chang J, Kozyrakis CE, Ranganathan P (2018) Learning memory AAccess patterns. In: Proceedings of the 35th international conference on ML, PMLR 80, pp 1919–1928

  24. Wang H, Hao H, Alizadeh MI, Mao H (2019) Learning caching policies with subsampling. In: Procedings of the 33rd conference on neural information processing systems (NeurIPS 2019), Vancouver, Canada

  25. Drault LB (2017) Evaluation of cache inclusion policies in cache management

  26. Herodotou H (2019) AutoCache: employing ML to automate caching in distributed file systems. In: 2019 IEEE 35th international conference on data engineering workshops (ICDEW), pp 133–139

  27. The ChampSim simulator (2017) https://github.com/ChampSim/ChampSim

  28. Nethercote N, Seward J (2007) Valgrind: a framework for heavyweight dynamic binary instrumentation. In: Proceedings of the 28th ACM SIGPLAN conference on programming language design and implementation (PLDI ’07), San Diego, California, USA, pp 89–100

  29. Aarshay J (2016) Complete guide to parameter tuning in XGBoost with codes in Python

  30. Vishal M, Venkat AS (2019) XGBoost algorithm: Long May She Reign

  31. Pedregosa F, Varoquaux G, Gramfort A, Michel V, Thirion B, Grisel O, Blondel M, Prettenhofer P, Weiss R, Dubourg V, Vanderplas J, Passor A, Cournapeau D, Brucher M, Perrot M, Duchesnay E (2011) Scikit-learn: ML in Python. J ML Res 12:2825–2830

    MATH  Google Scholar 

  32. Nagesh SC (2019) Introduction to artificial neural networks (ANN)

  33. Jeff H (2018) TPOT automated ML in python

  34. Song S, Wu Q (2017) Experiments with SPEC CPU 2017: similarity, balance, phase behavior and SimPoints, Department of Electrical and Computer Engineering,The University of Texas at Austin, TR-180515-01

  35. Limaye A, Adegbija T (2018) A workload characterization of the SPEC CPU2017 benchmark suite. In: Proceedings of IEEE international symposium on performance analysis of systems and software (ISPASS). Belfast, pp 149–158. https://doi.org/10.1109/ISPASS.2018.00028

  36. Son DO, Kim GB, Kim JM, Kim CH (2018) Cache reuse aware replacement policy for improving GPU cache performance. In: Kim K, Kim H, Baek N (eds) IT convergence and security 2017. Lecture Notes in Electrical Engineering, vol 450, Springer. https://doi.org/10.1007/978-981-10-6454-818

  37. Freund Y, Schapire R (1995) A decision-theoretic generalization of on-line learning and an application to boosting

  38. Glorot Xavier, Bengio Y (2010) Understanding the difficulty of training deep feedforward neural networks. In: International conference on artificial intelligence and statistics

  39. Zhang H (2004) The optimality of Naive Bayes. In: Proceedings of FLAIRS

  40. Smola AJ, Schölkopf B (2004) A tutorial on support vector regression statistics. Comput Arch 14(3):199–222

    Google Scholar 

  41. Henning JL (2006) SPEC CPU2006 benchmark descriptions. SIGARCH Comput Archit News 4(4):1–17

    Article  Google Scholar 

  42. Olanrewaju RF, Baba A, Khan BUI, Yaacob M, Azman AW, Mir MS (2016) A study on performance evaluation of conventional cache replacement algorithms: a review. In: 2016 fourth IEEE international conference on parallel, distributed and grid computing (PDGC), pp 550–556

Download references

Author information

Authors and Affiliations

Authors

Corresponding author

Correspondence to Jobin Jose.

Additional information

Publisher's Note

Springer Nature remains neutral with regard to jurisdictional claims in published maps and institutional affiliations.

Rights and permissions

Reprints and permissions

About this article

Check for updates. Verify currency and authenticity via CrossMark

Cite this article

Jose, J., Ramasubramanian, N. Applying machine learning to enhance the cache performance using reuse distance. Evol. Intel. 16, 1195–1216 (2023). https://doi.org/10.1007/s12065-022-00730-1

Download citation

  • Received:

  • Revised:

  • Accepted:

  • Published:

  • Issue Date:

  • DOI: https://doi.org/10.1007/s12065-022-00730-1

Keywords

Navigation