Presentation is loading. Please wait.

Presentation is loading. Please wait.

Using Access Probabilities In Address Lookups Jim Washburn & Katerina Argyraki EE384Y Class Project.

Similar presentations


Presentation on theme: "Using Access Probabilities In Address Lookups Jim Washburn & Katerina Argyraki EE384Y Class Project."— Presentation transcript:

1 Using Access Probabilities In Address Lookups Jim Washburn & Katerina Argyraki EE384Y Class Project

2 Access probabilities are not uniform Lookup table contains set of keys K i Access probabilities P i Access times A i Avg access time E i =  i { A i P i }

3 Where is accounting info stored? Per key Per nexthop

4 Lookup table operations add(key) delete(key) search(key) compile( ) –When to compile? –What happens to searches while compiling ? –How long to maintain accounting info?

5 Approach to the problem Amortize the optimization Incrementally optimize at search time Perform optimization step with low probability per access –keeps cost low!

6 Base structure: BST on intervals Can do prefix matches or exact matches Allows many different tree configurations for the same set of keys –can be dynamically reconfigurable Permits localized incremental operations – affect just two nodes

7 BST rotation operation C BA y x z CB A x z y right left Only nodes x and y are written

8 Self-adjusting heuristics single rotation on every access –too conservative? move-to-root on every access –too aggressive? move-up on every access –“middle ground” solution –but how many nodes?

9 Low-cost heuristics single rotation with low probability p –decrease the amount of writes move-to-root with probability proportional to node depth –favor nodes that are deep down the tree move-up with counters –per node counter keeps # of hits –a node is never moved above another node with higher counter

10 BST as Markov Chain Tree can be in any of its possible configurations, with probabilities given by the stationary distribution. …

11 Markov calculations (1) Optimal Single Rotation Move to Root Expected Access time 1.32831.46431.4633 Expected time to first passage to optimal NA59.939.7 Done with 60 randomly selected access distributions, for a 3 node tree Probability of optimization step set to 0.1

12 Markov Calculations (2)

13 Simulation results (1) avgOPTSRMTRSRRMTRRMUP access’s4.5610.359.387.625.15.87 reads4.569.214.827.514.955.7 writes01.134.550.110.150.16 Scenario 1: 99% hit on 7 rules –.5,.25,.12,.6,.3,.1 Average performance (the good news):

14 Simulation results (2) worstOPTSRRMTRRMUP access’s12574235 reads12572131 writes022114 Scenario 1: 99% hit on 7 rules –.5,.25,.12,.6,.3,.1 Worst-case performance (the bad news):

15 Simulation results (3) avgOPTSRRMTRRMUP access’s6.7914.937.6 reads6.7914.757.347.37 writes00.170.260.23 Scenario 2: 60% hit on 12 rules –.13,.09,.06,.05,.04,.03,.02,.01,.01,.01 Average performance:

16 Simulation results (4) worstOPTSRRMTRRMUP access’s10744229 reads10722225 writes022114 Scenario 2: 60% hit on 12 rules –.13,.09,.06,.05,.04,.03,.02,.01,.01,.01 Worst-case performance:

17 Simulation results (5) avgOPTSRRMTRRMUP access’s722.859.329.61 reads722.658.979.3 writes00.20.340.31 Scenario 3: uniform distribution –The worst-case for our heuristics! Average performance:

18 Simulation results (6) worstOPTSRRMTRRMUP access’s9624032 reads96122 writes022016 Scenario 3: uniform distribution –The worst-case for our heuristics! Worst-case performance:

19 Bounding the tree depth Check before moving a node –If move will increase depth beyond max, don’t do it How to check? –Keep extra info per node e.g., node depth –Must not introduce extra accesses for maintenance! –Impossible with single rotation or move up 

20 MTRR with bounded worst-case Augmented BST –Each node knows the depth of its longest branch on the left the depth of its longest branch on the right –Rotating a node up, requires updating all its ancestors up to the root –With move-to-root we do that anyway

21 Simulation results (1) avgOPTMTRRMTRB access’s4.565.16.47 reads4.564.956.24 writes00.150.23 Scenario 1: 99% hit on 7 rules –.5,.25,,12,.6,.3,.1 Average performance:

22 Simulation results (2) worstOPTMTRRMTRB access’s94240 reads92220 writes02120 Scenario 1: 99% hit on 7 rules –.5,.25,,12,.6,.3,.1 Worst-case performance:

23 Conclusions We can optimize without having to maintain per-key accounting state, or periodically recompiling the entire data structure. Average access time results comparable to compiled results, which are close to lower bound which is determined by entropy. Worst case results not as good, need more heuristics to bound the tree depth


Download ppt "Using Access Probabilities In Address Lookups Jim Washburn & Katerina Argyraki EE384Y Class Project."

Similar presentations


Ads by Google