AMP: ProgramContext Specific Buffer Caching - PowerPoint PPT Presentation

1 / 16
About This Presentation
Title:

AMP: ProgramContext Specific Buffer Caching

Description:

Usenix tech conf 2005, April 14, 2005. 2. Buffer caching beyond LRU ... Detection: UBM (OSDI'00), DEAR (Usenix'99), PCC (OSDI'04) ... – PowerPoint PPT presentation

Number of Views:28
Avg rating:3.0/5.0
Slides: 17
Provided by: zl
Category:

less

Transcript and Presenter's Notes

Title: AMP: ProgramContext Specific Buffer Caching


1
AMP Program-Context Specific Buffer Caching
  • Feng Zhou, Rob von Behren, Eric Brewer
  • University of California, Berkeley
  • Usenix tech conf 2005, April 14, 2005

2
Buffer caching beyond LRU
  • LRU good for workload with temporal locality, but
    very bad for loops and scans
  • Large (gtcache size) one-time scan evicts all
    blocks
  • Large (gtcache size) loops get zero hits
  • Renewed interests in buffer caching
  • Adaptation ARC (FAST03), CAR (FAST04)
  • Detection UBM (OSDI00), DEAR (Usenix99), PCC
    (OSDI04)
  • basic idea detect loops and scans and apply MRU
    or variant

3
Adaptive Multi-Policy (AMP) caching
  • Robust algorithm for detecting looping patterns
  • more robust against local reorders or small
    spurious loops
  • Randomized scheme for managing many cache
    partitions
  • much cheaper than previous precise methods
  • PC-specific caching that classifies disk accesses
    by program contexts
  • independent from PCC by Gniady et al (OSDI04)

4
PC-specific Buffer Caching
  • Program context the current PC all return
    addresses on the call stack

Ideal policies 1 MRU 2 LFU
3 LRU
5
Loop detection scheme
  • Intuition measure the average recency of the
    blocks accessed
  • For the i-th access
  • Li list of all previously accessed blocks,
    ordered from the oldest to the most recent by
    their last access time.
  • Li length of Li
  • pi position in Li of the block accessed (0 to
    Li-1)
  • Define the recency of the access as,

6
Loop detection scheme cont.
  • Average recency R of the whole sequence is the
    average of all defined Ri (0ltRlt1)
  • Detection result
  • loop, if R lt Tloop (e.g. 0.4)
  • temporally clustered, if R gt Ttc (e.g. 0.6)
  • others, o.w. (near 0.5)

7
Loop detection example 1
  • Block sequence 1 2 3 1 2 3
  • R 0, detected pattern is loop

8
Loop detection example 2
  • Block sequence 1 2 3 4 4 3 4 5 6 5 6, R 0.79

9
Randomized Cache Partition Management
  • Need to decide cache sizes devoted to each PC
  • Marginal gain (MG) the expected number of extra
    hits over unit time if one extra block is
    allocate
  • Local optimum when every partition has the same
    MG
  • Concrete scheme
  • Expand the LRU partition by one if ghost buffer
    hit
  • Expand an MRU partition by one every
    loop_size/ghost_buffer_size accesses to the
    partition
  • Compared to previous schemes
  • No need to find partition smallest MG (O(logN))

10
Detection of synthesized sequences
tctemporally clustered Colored detection
results are wrongClassifying tc as other is
deemed correct.
11
Simulation dbt3 (tpc-h)
12
Simulation scan
13
Implementation
  • Kernel patch for Linux 2.6
  • Shortens time to index Linux source code using
    glimpseindex by up to 13 (read traffic down 43)
  • Shortens time to complete DBT3 (tpc-h) DB
    workload by 9.6 (read traffic down 24)
  • Linux implementation and simulatorhttp//www.cs.
    berkeley.edu/zf/amp

14
(No Transcript)
15
DBT3 on AMP implementation
  • Overall execution time reduced by 9.6 (1091 secs
    ?986 secs)
  • Disk reads reduced by 24.8 (15.4GB ? 11.6GB),
    writes 6.5

16
Correctness of partition size adaptation
  • During time period t, number of expansion of ARC
    is

  • (B1B2ghost_buffer_size)
  • The number of expansions of an MRU partition i is
  • They are both proportional to their respective MG
    with the same constant
Write a Comment
User Comments (0)
About PowerShow.com