with Variable Object Sizes Daniel S. Berger Nathan Beckmann Mor - - PowerPoint PPT Presentation

with variable object sizes
SMART_READER_LITE
LIVE PREVIEW

with Variable Object Sizes Daniel S. Berger Nathan Beckmann Mor - - PowerPoint PPT Presentation

Practical Bounds on Optimal Caching with Variable Object Sizes Daniel S. Berger Nathan Beckmann Mor Harchol-Balter Carnegie Mellon University ACM Sigmetrics, Irvine, June 19, 2018. Caches are Everywhere 10x Web browser Web Cache Server in


slide-1
SLIDE 1

Practical Bounds on Optimal Caching with Variable Object Sizes

Daniel S. Berger Nathan Beckmann Mor Harchol-Balter

ACM Sigmetrics, Irvine, June 19, 2018.

Carnegie Mellon University

slide-2
SLIDE 2

Caches are Everywhere

1

Web browser Web Cache

Server in Europe

# requests not served from cache total # requests

Goal: minimize cache miss ratio

Web App DB Cache

Slow database

miss ratio =

10x 10-100x

slide-3
SLIDE 3

Everyone Has Worked in Caching

2

Key Question: how much further can miss ratios be improved?

lower is better

OPT

?

Results on 2016 CDN trace. Cache size: 4GB.

Def: OPT = lowest miss ratio possible on a given trace

Are we there yet?

slide-4
SLIDE 4

Defining OPT

Constraints:

  • 1. Limited cache size
  • 2. Gets to see full request trace
  • 3. No prefetching

⇒ admit an object only when it is requested

3

Def: OPT = lowest miss ratio possible on a given trace

a b c b d a c d a b c d

= offline optimal miss ratio on a given trace

slide-5
SLIDE 5

Finding OPT

4

What is OPT? Belady? No! Belady assumes equal sizes! So, can we find OPT? Unfortunately, NP-hard In fact, strongly NP complete Can we approximate OPT? 9 orders of magnitude variability!

slide-6
SLIDE 6

OPT Approximation Algorithms

5

Technique Time Complexity Approximation Guarantee

OFMA [STOC’97] O(N2) O(log cache size) LP rounding [SODA’99] O(N5) O(log (maxsize/minsize)) LocalRatio [JACM’01] O(N3) 4

OPT

State-of-the-art 4-approximation not practical

slide-7
SLIDE 7

OPT Approximation Algorithms

6

Technique Time Complexity Approximation Guarantee

Best prior approximation O(N3)

4

Independent Reference Model (IRM)

Traces are not adversarial in practice

Large systems: #objects, cache size

⇒ Probabilistic assumptions

slide-8
SLIDE 8

Our Main Result

7

Technique Time Complexity Approximation Guarantee

Best prior approximation O(N3) 4 Flow-offline optimum (FOO) O(N2log2N) 1

On trace with strong correlations: error < 0.14%

Independent Reference Model (IRM)

Traces are not adversarial in practice

Large systems: #objects, cache size

⇒ Probabilistic assumptions

slide-9
SLIDE 9

8

Detailed OPT ILP Interval ILP FOO Min Cost Flow graph

How does FOO attain OPT for large systems?

How to get OPT fast:

Interval LP

relaxation

NP-hard NP-hard Ω(N3.5) O(N2log2N)

a b c b a x(a,1) x(a,2) x(a,3) x(a,4) x(a,5)

Trace: DVs for

  • bject a:
slide-10
SLIDE 10

9

Detailed OPT ILP Interval ILP FOO Min Cost Flow graph

How does FOO attain OPT for large systems?

How to get OPT fast:

Interval LP

relaxation

NP-hard NP-hard Ω(N3.5) O(N2log2N)

Non- integer decision vars (DVs) Precedence relation, which forces integer DVs

always exists

Coupon collector problem

under IRM

Integer DVs almost surely

large systems

How to prove FOO’s correctness:

slide-11
SLIDE 11

Our Main Result

10

Technique Time Complexity Approximation Guarantee

Best prior approximation O(N3) 4 Flow-offline optimum (FOO) O(N2log2N) 1

Computable with up to 107 requests

slide-12
SLIDE 12

lower is better

Empirical Results

11

30% gap Key Question: how much further can miss ratios be improved?

Could be

  • ptimal…

Are we there yet?

  • r not
slide-13
SLIDE 13

30% gap 45% gap 61% gap 51% gap 15% gap 41% gap

Results for Other Configurations

12

CDN Small Cache Large Cache WebApp Storage

Key Question: how much further can miss ratios be improved?

slide-14
SLIDE 14

Conclusion

13

Technique Time Complexity Approximation Guarantee

Best prior approximation O(N3) 4 Flow-offline optimum (FOO) O(N2log2N) 1

Actually can do: O(N log N)

Implication: large potential for new caching policies ⇒ e.g., 60% improvement possible for WebApps

slide-15
SLIDE 15

Practical Bounds on Optimal Caching with Variable Object Sizes

Daniel S. Berger Nathan Beckmann Mor Harchol-Balter

ACM Sigmetrics, Irvine, June 19, 2018.

Carnegie Mellon University

Source code and data: available at

/dasebe/optimalwebcaching