1 / 32

FRD: A Filtering based Buffer Cache Algorithm that Considers both Frequency and Reuse Distance

FRD: A Filtering based Buffer Cache Algorithm that Considers both Frequency and Reuse Distance. 33rd International Conference on Massive Storage Systems and Technology ( MSST 2017). OUTLINE. INTRODUCTION BACKGROUND & MOTIVATION PROPOSED FRD ALGORITHM EVALUATION CONCLUSION. OUTLINE.

Download Presentation

FRD: A Filtering based Buffer Cache Algorithm that Considers both Frequency and Reuse Distance

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. FRD: A Filtering based Buffer Cache Algorithm thatConsiders both Frequency and Reuse Distance 33rdInternational Conference on Massive StorageSystems and Technology (MSST 2017)

  2. OUTLINE • INTRODUCTION • BACKGROUND&MOTIVATION • PROPOSED FRDALGORITHM • EVALUATION • CONCLUSION

  3. OUTLINE • INTRODUCTION • BACKGROUND&MOTIVATION • PROPOSED FRDALGORITHM • EVALUATION • CONCLUSION

  4. INTRODUCTION(1/3) • Buffer cachealgorithms play a major role in building amemory hierarchy in a storage system. • Buffer cache is one of the key factors for improving performance. • Because of its simplicity and low overhead, a least-recently-used (LRU) algorithm is one of the most commonly used buffer cache algorithms.

  5. INTRODUCTION(2/3) • However, the LRU algorithm performs poorly forthe following workloads because of certain characteristics. • Scanning workload. • →meaningful blocks arepresent in the cache, the scanning workload evicts them. • Cyclic access (loop-like) workload in which loop lengthis greater than cache size. • →request sequence is1-2-3-4-1-2-3-4-1-2-3-4 2 1 4 3

  6. INTRODUCTION(3/3) • We propose a buffer cache algorithm, called frequency and reuse distance (FRD), that considers both frequency and reuse distance. • Through careful analysis on various real-world workloads, we find that infrequently accessed blocks are dominant in most cases and such blocks are the main source of cache pollution. • We concentrate on the manner in which to identify these infrequently accessed blocks and exclude them from the cache.

  7. OUTLINE • INTRODUCTION • BACKGROUND&MOTIVATION • PROPOSED FRDALGORITHM • EVALUATION • CONCLUSION

  8. BACKGROUND&MOTIVATION(1/6)

  9. BACKGROUND&MOTIVATION(2/6)

  10. BACKGROUND&MOTIVATION(3/6) • Observation #1. Approximately 50 to 90% of blocks are infrequently accessed in a real-world workload. • Most blocks are infrequently accessed and only a few blocks are frequently accessed. • If a cache algorithm performs in an LRU manner, blocks to be frequently accessed may be easily evicted from a cache because of infrequently accessed blocks. • Therefore, infrequently accessed blocks should be evicted prior to frequently accessed blocks, and frequently accessed blocks should be retained for a long time to make more cache hits.

  11. BACKGROUND&MOTIVATION(4/6)

  12. BACKGROUND&MOTIVATION(5/6) • Observation #2. Reuse distance for infrequently accessed blocks is either very short or very long. • Regarding cache size, most distribution is less than 10% or greater than 100% of cache size.

  13. BACKGROUND&MOTIVATION(6/6) • Type 1(Infrequently accessed with a long reuse distance)blocks generate pure cache pollution and this algorithm cannot be a cache hit as well. • The Type 2(Infrequently accessed with a short reuse distance)blocks might be a cache hit because it has a short reuse distance. • However, after a cache hit, it still produces cache pollution because it has infrequently accessed characteristics.

  14. OUTLINE • INTRODUCTION • BACKGROUND&MOTIVATION • PROPOSED FRDALGORITHM • EVALUATION • CONCLUSION

  15. PROPOSED FRDALGORITHM(1/11) • We propose a buffer cache algorithm that considers both access frequency and reuse distance, known as FRD. • The FRD effectively filters out cache polluting blocks using a filter stack and effectively maintains meaningful blocks using a reuse distance stack.

  16. PROPOSED FRDALGORITHM(2/11) • We have classified the infrequently accessed blocks by reuse distance (Type 1 and 2). • In this section, we expand the block classification into four Classification.

  17. PROPOSED FRDALGORITHM(3/11) • Cache pollution caused by Class IS or IL commonly occurs as a result of a scan-like workload in a LRU cache algorithm. • To avoid this cache pollution, we design our cache algorithm using two types of buffers: temporal and actual cache buffers. Temporal cache (Filter stack) Actual cache (Reuse distance stack)

  18. PROPOSED FRDALGORITHM(4/11) 5 actual block 8 7 8 5 5 7 5 history block MRU LRU HIT!!! 6 8 9 8 9 5 8 6 9 7 8 6 5 Temporal cache (Filter stack) LRU MRU 6 8 9 5 8 5 7 8 9 5 9 8 6 6 Actual cache (Reuse distance stack)

  19. PROPOSED FRDALGORITHM(5/11) HIT!!! 5 actual block 5 5 history block MRU LRU 6 8 9 8 9 5 8 6 9 7 8 6 5 Temporal cache (Filter stack) LRU MRU HIT!!! 6 8 9 5 8 5 7 8 7 8 9 6 5 9 5 9 8 6 6 Actual cache (Reuse distance stack)

  20. PROPOSED FRDALGORITHM(6/11) • When the two stacks are full, a total of four cases arepossible for a block request because of the history blockaccesses. • Case 1) Cache miss and history miss • Case 2) Cache miss but history hit • Case 3) Cache hit in the filter stack • Case 4) Cache hit in the reuse distance stack

  21. PROPOSED FRDALGORITHM(7/11) • Case 1) Cache miss and history miss: 12 12 MRU LRU 6 8 7 9 8 8 9 5 8 6 9 12 7 6 8 6 5 Temporal cache (Filter stack) LRU MRU 4 3 5 1 6 8 9 5 8 5 2 7 8 10 9 5 7 8 9 6 5 9 5 9 8 6 6 Actual cache (Reuse distance stack)

  22. PROPOSED FRDALGORITHM(8/11) • Case 2) Cache miss but history hit 10 MRU LRU 6 8 9 8 9 5 8 6 9 7 8 6 5 Temporal cache (Filter stack) LRU MRU HIT!!! 4 3 9 1 9 5 8 5 2 7 8 5 10 8 9 7 8 6 10 9 5 9 6 6 6 1 Actual cache (Reuse distance stack)

  23. PROPOSED FRDALGORITHM(9/11) • Case 3) Cache hit in the filter stack 6 MRU LRU HIT!!! 8 6 8 7 6 9 7 Temporal cache (Filter stack) LRU MRU 4 3 10 7 8 9 5 8 5 2 7 8 5 10 8 6 7 8 6 10 9 9 6 6 6 1 9 Actual cache (Reuse distance stack)

  24. PROPOSED FRDALGORITHM(10/11) • Case 4) Cache hit in the reuse distance stack 4 MRU LRU 6 8 9 7 Temporal cache (Filter stack) LRU MRU HIT!!! 4 3 3 9 2 4 2 10 10 7 8 7 8 9 6 1 6 1 Actual cache (Reuse distance stack)

  25. PROPOSED FRDALGORITHM(11/11) • The filter stack has two purposes. • Identify noise blocks (e.g., Class IS or IL) • Identify blocks with short reuse distance (e.g., Class IS or FS). • The reuse distance stack also has two purposes. • Maintain history block in reuse distance order. • Store frequently accessed blocks for later used (e.g., Class FL).

  26. OUTLINE • INTRODUCTION • BACKGROUND&MOTIVATION • PROPOSED FRDALGORITHM • EVALUATION • CONCLUSION

  27. EVALUATION(1/4)

  28. EVALUATION(2/4)

  29. EVALUATION(3/4) 37.8% 20%

  30. EVALUATION(4/4)

  31. OUTLINE • INTRODUCTION • BACKGROUND&MOTIVATION • PROPOSED FRDALGORITHM • EVALUATION • CONCLUSION

  32. CONCLUSION(1/1) • We proposed a buffer cache algorithm calledFRD that considers both frequency and reuse distance. • The primary purpose of the FRDis to exclude infrequently accessed blocks that may cause cache pollution and to maintain frequently accessed blocks based on reuse distance. • Experimental results showed that the FRD outperformed ARC or LIRS and that FRD’s hit ratio was stable for various cache sizes.

More Related