A Case for Delay-conscious Caching of Web Documents Peter Scheuermann, Junho Shim, Radek Vingralek Department of Electrical and Computer Engineering Northwestern University, Evanston, IL Oracle Corporation 400 Oracle Parkway, Box , Redwood Shores, CA 元智大學系統實驗室 宮春富 1999/12/1
Outline ⊙ Introduction ⊙ Design ⊙ Experimental Evaluation ⊙ Conclusion
Introduction ⊙ The World Wide Web has become the predominant client/server architecture. ⊙ The high response time perceived by Web clients is caused primarily by the long communication delays, although other factors (such as slow service times) also contribute. ⊙ The communication delay to a certain extent can be reduced by buying links with a higher bandwidth and improving the efficiency of communication protocols. ⊙ One of the most effective ways of reducing the communication delay is by employing caching.
⊙ The documents can be cached at clients as is done currently by most Web browsers, or by the Web servers themselves, which is most useful when a server contains many pointers to other servers. ⊙ In an attempt to tune the performance of caching proxies several techniques have been used, such as avoiding caching of documents that originate at nearby servers, and hierarchies of caches. ⊙ Cache replacement algorithms usually maximize the cache hit ratio by attempting to cache the data items which are most likely to be referenced in the future ⊙ We maximizing the cache hit ratio alone does not guarantee the best client response time in the Web environment. Cache Replacement
⊙ We define a new performance metric called delay-savings ratio which generalizes the hit ratio metric by explicitly considering cache miss costs. ⊙ We describe a new cache replacement algorithm LNC-R which maximizes the delay-savings ratio. ⊙ The LNC-R cache replacement algorithm approximates the optimal cache replacement algorithm, ⊙ The design of LNC-R relies on a solid theoretical foundation. New Algorithm
。 is the average delay to fetch document to cache 。 is the total number of references to 。 is the number of references to which were satisfied from the cache 。 average rate of reference to document 。 size of document ---- (1) ---- (2) ---- (3) Parameters and Functions
LNC-R Algorithm ⊙ LNC-R ( Least Normalized Cost Replacement ) selects for replacement the least profitable documents. ⊙ LNC-R sorts all documents held in the cache in ascending order of profit and selects the candidates for eviction in the sort order. ⊙ LNC-R simply tries to maximize the delay savings ratio by maximizing the profit from each unit of storage.
LNC-R-W3 Algorithm ⊙ Several studies of Web reference patterns show that Web clients exhibit a strong preference for accessing small documents --- (4) --- (5) -- (6)
Experimental Setup ⊙ We evaluated the performance of LNC-R-W3 on a client trace collected at Northwestern University. ⊙ We concentrate on two aspects: the dependence of reference rate on document size the correlation between the delay to fetch a document to cache and the size of the document ⊙ Previously published trace analyses show that small files are much more frequently referenced than large files. ⊙ The correlation between the document size and the delay to fetch the document is defined as :
Experimental Setup(con’t) ⊙ Some parameters: is the covariance between size and delay is the variance of size is the variance of delay show whether the delay to fetch a document to cache varies across documents of similar size ⊙ We measured the value on our trace as , which is relatively low.Therefore, delay-conscious caching is indeed necessary.
Experimental Setup(con’t)
Performance Metrics ⊙ We also use cache hit ratio (HR) as a secondary metric, which is defined as: is the number of references to document which were satisfied from cache is the total number of references to document ⊙ LRU-MIN exploits the preference of Web clients for accessing small documents. 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.
Parameter K ⊙ Increasing the value of K improves the reliability of reference rate estimates. ⊙ Large value of K also result in higher spatial overhead to store the reference samples. ⊙ The transition from K=1 to K=2 is particularly sharp, since LNC-R-W3 with K=1 does not need to retain any reference samples after eviction of corresponding documents. ⊙ We conjecture that K should be set to 2 or 3 to obtain the best performance.
Parameter K (con’t)
Parameter b ⊙ Parameter b determines the skew of dependence of reference rate on document size. ⊙ The higher the value of b, the stronger the preference of clients to access small documents. ⊙ We conjecture that for best performance on most web workloads b should be set between 1 and 2.
Parameter b (con’t)
Performance Comparison
Conclusion ⊙ The main contribution of this paper is to show the importance of delay- conscious cache replacement algorithms for Web document cache management. ⊙ To address the need for design of delay-conscious cache replacement algorithms, we developed a new cache replacement algorithm LNC-R-W3. ⊙ The experimental results indicate that LNC-R-W3 provides consistently better performance than LRU and LRU-MIN.