1 / 35

The Cache Location Problem

The Cache Location Problem. Overview. TERCs Vs. Proxies Stability Cache location. Proxy Web Caching is Good. Saves network bandwidth Reduces delay Reduces server’s load But it is not perfect: not everybody uses it (configuration) may become a bottleneck and increase delay

reyna
Download Presentation

The Cache Location Problem

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. The Cache Location Problem

  2. Overview • TERCs Vs. Proxies • Stability • Cache location

  3. Proxy Web Caching is Good • Saves network bandwidth • Reduces delay • Reduces server’s load • But it is not perfect: • not everybody uses it (configuration) • may become a bottleneck and increase delay • increases delay for unsatisfied pages

  4. Transparent En-Route Caches (TERCs) • Caches are located along routes from clients to servers, and are transparent to both server and client • Requests are intercepted by the TERC on their way to the server, and either • answered by the cache if the information exists • otherwise, forwarded to the server • Advantages: • No configuration required! No management! • No change required in current network infrastructure • Can be deployed independently within an ISP subnetwork

  5. TERCs (-) • Must be on the route from client to server: • sensitive to route changes • hierarchies are much harder to implemen • Needs to intercept traffic: • implementation problem • more complex • can TERCs work at line speed? • Depends on routing stability, and flow stability Where should TERCs be placed?

  6. Route Stability • Published results indicate that routing is stable (Paxon, Labovitz) • We need stability only during the connection lifetime (~1 min.): • [KRS00] measurements to more that 13000 destinations show that >93% of connections were stable • real numbers are probably higher • TCP route caching • equivalent of IP addresses

  7. Stability of Flows • We built the flow tree from servers: • Data from Bell-Labs servers (www.bell-labs.com, www.multimedia.bell-labs.com ) • Nov. 97 - Jan. 98 • ~14000 different hosts, 1 Gbytes, ~200k cachable requests (per week) • From log files to results: • extract unique host • run traceroute for each host • obtain the routing tree (or is it DAG?)

  8. Stability - Visual

  9. Client return rate between days

  10. Stability (3) • The relative flow in the tree is stable in time, although the client population changes significantly • Routing is stable for the lifetime of the connection • Placing caches based on past traffic yields good results

  11. How Fixed is the Hit Ratio?

  12. How Fixed is the Hit Ratio?(2)

  13. Where Should the TERCs be Placed?

  14. The Model • Wide area network • Requests are represented by a set of demands (of client i from server j) • Goal: minimize average delay = minimize total flow • The hit ratio (P) abstracts cache behavior • most hits due to small number of popular pages • full dependency - the same pages are cached everywhere • But part of the flow can come from Proxies => Each flow is associated with a hit ratio Pi,j

  15. The General k-cache Location Problem • Instance: • an undirected graph G=(V,E) • a set of demands F={fi,j} • a set of hit ratios P={pi,j} • k - the number of caches • Solution: K, a subset of V of size k • Objective: minimizing total flow å min fi,j [pi,j d(i,v) + (1-pi,j) (d(i,v)+d(v,j))] i,j v  K+{j}

  16. The k-TERC Location Problem • Instance: • an undirected graph G=(V,E) • a set of demands F={fi,j} • a set of hit ratios P={pi,j} • k - the number of caches • Solution: K, a subset of V of size k • Objective: minimizing total flow å min fi,j [pi,j d(i,v) + (1-pi,j) (d(i,v)+d(v,j))] i,j v  K+{j} on the path from j to i

  17. Remarks • A generalization of the p-median problem(in the p-median problem we want to minimize the total cost of serving a set of demands from at mostpcenters) • In the k-TERC location problem: • it is enough to solve the problem for fixed p (pi,j = p) • The optimal set K does not depend on p. • (not true in general) • The k-TERC location problem is a special case of the general k-location problem(p=1/n)

  18. The independence of ps,c TERC constant

  19. Hardness Results line tree general graph NP - hard one server Poly. Poly. m servers Poly. NP - hard NP - hard

  20. Placement on a line 0 1 2 n-1 • Topology: a line of n nodes • Every node may be a server, a client, or both. • FR(i) – The flow demand on the segment (i-1,i) • FR can be easily computed from the input. • FC(i,lo,li) - The flow on the segment (i-1,i) when the closest caches to i are in lo andli. • FC can be computed from the input with p=1. • Note: FR(i) = FC(i,n-1,0)

  21. Placement on a line • C(j,lo,li,k)the overall flow in segment [0,j] when k caches are locate optimally inside the segment, and the closest caches to j are in lo andli.

  22. The dynamic Program • Base case (j=1) • For j>1:

  23. The Algorithm • Compute C(1,li,1,1) and C(1,li,0,0) for 1≤li≤n-1 • For each j>1 compute C(j,lo,li,k’) for all 0≤k’≤k and 0≤li≤j≤lo≤n-1 Complexity: O(n3k)

  24. Optimizing for a single server • The routes from the server to all clients form a tree (actually a DAG) • We’ll use dynamic programing to find the optimal cache locations

  25. The Greedy Algorithm • Optimal algorithm using a bottom up dynamic programming: • not trivial • complexity O(n k2 h) • Greedy: • repeat k times{find the best cache location} • complexity O(n k) • How bad can it be?

  26. Greedy Vs. Optimal

  27. Dynamic Programming for Tree • First we convert the tree to a binary tree by adding dummy nodes. • Sort all nodes in reverse BFS order: nodes descendents are numbered before the node itself. Children of node i are: iRand iL

  28. Notations C(i,k’,l) is the cost of a subtree rooted at i with k’ optimally located caches, where the next cache up the tree is at distance l from i. F(i,k’,l) is the sum of demands in the subtree i that do not pass thru a cache in the solution C(i,k’,l).

  29. The Dynamic Program

  30. The DP Formula for C(i,k,l) The cost if a cache is not placed at node i: The cost if a cache is placed at node i: Complexity: O(n·h·k) variables  O(n·h·k2) time cmplx Finer analysis yields O(n·h·k) time complexity

  31. The Server’s Point of View

  32. Traffic Reduction

  33. TERCs Vs. Edge Caches

  34. The Server’s Point of View (2)

  35. Popularity Stability

More Related