1 / 20

Proxy Cache Algorithms: Design, Implementation, and Performance

Proxy Cache Algorithms: Design, Implementation, and Performance. Junho Shim, Peter Scheuermann, and Radek Vingralek, Member, IEEE IEEE transaction on knowledge and data engineering, VOL. 11, NO. 4, JULY/AUGUST 1999. 元智大學系統實驗室 宮春富 1999/11/10. Outline. ⊙ Introduction

cruz
Télécharger la présentation

Proxy Cache Algorithms: Design, Implementation, and Performance

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. Proxy Cache Algorithms: Design, Implementation, and Performance Junho Shim, Peter Scheuermann, and Radek Vingralek, Member, IEEE IEEE transaction on knowledge and data engineering, VOL. 11, NO. 4, JULY/AUGUST 1999 元智大學系統實驗室 宮春富 1999/11/10

  2. Outline ⊙ Introduction ⊙ Proxy cache and theory ⊙ Algorithms ⊙ Implementation ⊙ Experimental evaluation ⊙ Conclusion

  3. Introduction ⊙ We describe a unified cache maintenance algorithm, LNC- R-W3-U, which integrates both cache replacement and consistency algorithms. ⊙ Cache replacement algorithms was dynamically select a suitable subset of documents for eviction from the cache. ⊙ In addition to maximizing the cache hit ratio, a cache replacement algorithm for Web documents should also minimize the cost of cache misses.

  4. Introduction(con’t) ⊙ Most proxy cache implementations rely on a consistency algorithm to ensure a suitable from of consistency for the cached documents. ⊙ A typical implementation of weak consistency assigns to each document a time-to-live (TTL) interval. ⊙ The LNC-R-W3-U (Least-Normalized Cost Replacement for the Web with Updates)algorithm is a greedy, cost-based algorithm.

  5. Proxy cache and theory ⊙ Apache 1.2.6 - TTL-based consistency algorithm. - The document with least value of TTL are replaced first. ⊙ Squid 1.1.21 - The consistency algorithm is also TTL-based. - Squid employs a separate cache replacement algorithm to reclaim free cache spaces. ⊙ Jigsaw 2.0 - The consistency algorithm is also TTL-based. - Jigsaw also uses standard LRU replacement to free cache spaces.

  6. Proxy cache and theory(con’t) ⊙ One algorithm, LRU-MIN, is used as a yardstick for performance comparison with LNC-R-W3-U in later.<M. Abrams,C. Standrige, S. Williams: Caching proxies: limitation and Potentials> ⊙ The algorithm in <J. Bolot and P. Hoschka> is cost-based.It considering the delay to fetch documents first. ⊙ The HYB algorithm uses an almost identical cost function to the one employed in LNC-R-W3, but use different mechanisms for parameters. ⊙ The GreedyDual-Size algorithm considers cost and size of documents. ⊙ “Polling-every-time” approach is another example of a strong consistency method.The Alex FTP cache is an exception in that it provide only weak consistency to the clients.

  7. Algorithms ◆ Optimal cache replacement si – the size of document i ci – the mean delay to perform a validation check di – mean delay to fetch document i ri – mean reference rate to document i ui – the mean validation rate of document i A typical goal of a cache replacement algorithm is to minimize response time. Another typical objective of most cache replacement algorithms designed for database buffer or file system management is to maximize cache hit ratio.

  8. Algorithms(con’t) delay saving ratio (DSR) byte hit ratio (BHR) The optimal off-line algorithm, Optim, assigns to each document a cost function calledprofit defined as

  9. Algorithms(con’t) ◆ LNC-R-W3-U Algorithm

  10. Implementation ◆ Time Efficiency ‧ A naive implementation of the algorithm would have O (n‧log n) time complexity as opposed to LRU with only O (1). ‧ We can organizing the metadata as a heap that will reduce the time complexity down to O (log n). ‧ Adding the LNC-R-W3-U algorithm to Apache does not slow down the Apache proxy. ‧ In our implementation the heap is built only once upon the startup of proxy when the cache becomes full the first time.<rebuild after a removal of the document with minimal profit>

  11. Implementation(con’t) The performance of qsort() and heap-based cache replacement

  12. Implementation(con’t) ◆ Space Efficiency ‧ The LNC-R-W3-U algorithm needs to keep with every document two sliding windows:one with the last K reference times and one with the last K distinct Last-Modified times. ‧ For the optimal value of K determined in later section, K=3, the resulting overhead is 24 bytes per document. ‧ We can reduce the sliding window overhead down to 2‧(4 + (K - 1)‧2) => 4‧(K - 1) For K = 3 we can reduce the overhead to 8 bytes per document.

  13. Experimental evaluation ◆ Experimental setup

  14. Experimental evaluation(con’t) ◆ Performance metrics and yardsticks ‧The delay saving ratio (DSR) is the primary cache performance metric in all experiments.We also use hit ratio (HR) as a secondary performance metric. We use staleness ratio (SR) as the primary cache consistency metric. ‧We compared the performance of LNC-R-W3-U against plain LRU, LRU- MIN, AND LNC-R-W3. ‧LRU-MIN does not consider the delay to fetch documents to the cache and estimates reference rate to each document using only the time of last reference.

  15. Experimental evaluation(con’t) ◆ Fine-Tuning LNC-R-W3-U ‧Selection of K.

  16. Experimental evaluation(con’t) ◆ Fine-Tuning LNC-R-W3-U ‧Selection of b.

  17. Experimental evaluation(con’t) ◆ Cache Performance Comparison (DSR)

  18. Experimental evaluation(con’t) ◆ Cache Performance Comparison (HR)

  19. Experimental evaluation(con’t) ◆ Cache Performance Comparison (SR)

  20. Conclusion ⊙ A new unified algorithm for Web proxy cache maintenance, LNC-R-W3-, which incorporates components for cache replacement and consistency maintenance. ⊙ Our algorithm can be easily integrated into any commercial cache proxy since it does not require any extensions to the HTTP protocol or to any changes to the servers. ⊙ Replicated servers are more complex to manage, but they also bring additional advantages for reliability purpose.

More Related