Justin DeBrabant
Big and Fast
Anti-Caching in OLTP Systems
Big and Fast Anti-Caching in OLTP Systems Justin DeBrabant Online - - PowerPoint PPT Presentation
Big and Fast Anti-Caching in OLTP Systems Justin DeBrabant Online Transaction Processing transaction-oriented small footprint write-intensive 2 A bit of history 3 OLTP Through the Years relational model rise of the web
Justin DeBrabant
Anti-Caching in OLTP Systems
2
3
4
1972 relational model 1993 OLAP rise of the web Ingres/System R 2015 “end of an era”
5
6
7
memory DBMS
OLTP systems
8
9
10
11 price per GB ($) 1E+00 1E+05 1E+10 1970 1973 1976 1979 1982 1985 1988 1991 1994 1997 2000 2003 2006 2009 2012
12
13
14
OLTP Through the Looking Glass, and What We Found There
SIGMOD ‘08
12%
Buffer Pool Locking Recovery Real Work
15
16
Cache Layer Persistence Layer
17
▸ multiple copies of data ▸ application’s responsibility
18
19
20
21
22
23
24
persistent storage
25
26
▸ asynchronous disk fetches
▸ maintain ordering of evicted data accesses
▸ single copy of data
▸ efficient memory use, no swizzling
27
28
29
30
31
32
33
34
Anti-Caching Phase: Evict Anti-Caching Phase: Pre-Pass Anti-Caching Phase: Fetch Anti-Caching Phase: Merge
anti-cache
36
37
38
copies, must maintain consistency
39
40
41
throughput (txn/s)
30000 60000 90000 120000
workload skew (high —> low)
1.5 1.25 1 0.75 0.5
anti-cache MySQL MySQL + memcached
42
throughput (txn/s)
30000 60000 90000 120000
workload skew (high —> low)
1.5 1.25 1 0.75 0.5
anti-cache MySQL MySQL + memcached
43
▸ use relative timestamps to track accesses ▸ to evict, take subset of tuples and evict based on timestamp age ▸ questions: ▸ timestamp granularity ▸ sample size (power of two)
44
45
46
throughput (txn/s)
22500 45000 67500 90000
workload skew (high —> low)
1.5 1.25 1 0.75 0.5
aLRU chain timestamp-low timestamp-high
47
48
49
50
51
52
53
54
55
56
57
throughput (txn/s)
45000 90000 135000 180000
workload skew (high —> low)
1.5 1.25 1 0.75 0.5
anti-caching MySQL
58
throughput (txn/s)
45000 90000 135000 180000
workload skew (high —> low)
1.5 1.25 1 0.75 0.5
anti-caching MySQL
59
60
61
62
63
64
debrabant@cs.brown.edu
65