@ANDY_PAVLO WHAT NON-VOLATILE
MEMORY
MEANS FOR THE FUTURE OF
MEMORY MEANS FOR THE FUTURE OF DATABASE SYSTEMS @ANDY_PAVLO 1973 - - PowerPoint PPT Presentation
WHAT NON-VOLATILE MEMORY MEANS FOR THE FUTURE OF DATABASE SYSTEMS @ANDY_PAVLO 1973 1974 1978 1986 1994 2010 2016 The Future Non Non-Vola olatile tile M Memor mory Persistent storage with byte-addressable operations. Fast
@ANDY_PAVLO WHAT NON-VOLATILE
MEANS FOR THE FUTURE OF
Non Non-Vola
tile M Memor mory
1 1
Wh What does s NVM VM mean for D DBMSs? MSs?
1 2
database, but this has major implications.
–Operating System Support –Cloud Provider Provisioning –Database Management System Architectures
Existing Systems NVM-Only Storage Hybrid DBMS
1 3
Existing Systems NVM-Only Storage Hybrid DBMS
Chap Chapter I r I – Exis xisting ting Systems
1 4
write-heavy transaction processing (OLTP) workloads.
–Disk-oriented (MySQL) –In-Memory (H-Store)
A PROLEGOMENON ON OLTP DATABASE SYSTEMS FOR NON-VOLATILE MEMORY ADMS@VLDB 20151 5
DISK-ORIENTED
Buffer Pool Table Heap Log Snapshots
IN-MEMORY
Table Heap Log Snapshots
In Intel l Labs abs NV NVM Em Emula ulator
1 6
the memory controller with tunable latencies.
instructions for flushing cache lines.
STORE STORE
L1 Cache
L2 Cache PCOMMIT
Exp xperim rimental E al Evalu aluation tion
1 7
–10 million records (~10GB) –8x database / memory –Variable skew
YCSB // //
1 8
50,000 100,000 150,000 200,000
MySQL H-Store Read-Only Workload 2x Latency Relative to DRAM
SKEW AMOUNT (HIGH→LOW) TXN/SEC
YCSB // //
1 9
10,000 20,000 30,000 40,000
TXN/SEC
MySQL H-Store 50% Reads / 50% Writes Workload 2x Latency Relative to DRAM
SKEW AMOUNT (HIGH→LOW)
8x 8x La Latency
2 0
Logging is a major performance bottleneck.
2 1 NVM Latency does not
have a large impact. Legacy DBMSs are not
prepared to run on NVM.
3
Chap Chapter II r II – NVM VM-on
ly Stor
age
that only has NVM.
2 3
Copy-on-Write
Table Heap No Logging
Log-Structured
No Table Heap Log-only Storage
DBM DBMS Ar Architec ectures es
24
In-Place
Table Heap Log + Snapshots
Copy-on-Write
Table Heap No Logging
Log-Structured
No Table Heap Log-only Storage
In In-Place Place En Engin ine
2 5
Table Heap Log Snapshots
1 2 3
UPDATE table SET val=ABC WHERE id=123
Delta Record New Tuple New Tuple
NVM
NVM VM-Op Optim timiz ized Ar d Archit chitectur tures
2 6
rather than how it changed.
CPU caches to NVM.
NVM VM-Awar are In In-Place Place En Engin ine
2 7
Table Heap Log
1 2 Tuple Pointers New Tuple
Log Record TxnId Pointer UPDATE table SET val=ABC WHERE id=123
Evalu aluation tion
2 8
–2 million records + 1 million transactions –High-skew setting
YCSB // //
2 9
400,000 800,000 1,200,000 In-Place Copy-on-Write Log-Structured
NVM-Optimized Traditional 10% Reads / 90% Writes Workload 2x Latency Relative to DRAM ↑63
63%
↑122
22%
↑50%
0%
TXN/SEC
YCSB // //
3 0
100 200 300 400 In-Place Copy-on-Write Log-Structured
NVM-Optimized Traditional 10% Reads / 90% Writes Workload 2x Latency Relative to DRAM
NVM STORES (M)
↓40%
0%
↓25
25%
↓20%
0%
YCSB // //
3 1
NVM-Optimized Traditional Elapsed time to replay log with varying log sizes 2x Latency Relative to DRAM
RECOVERY TIME (MS)
0.01 0.1 1 10 100 1000 10^3 10^4 10^5 10^3 10^4 10^5 10^3 10^4 10^5 In-Place Copy-on-Write Log-Structured
No Recovery Needed
3 2
Avoid block-oriented components.
2 1 Using NVM correctly
improves throughput & reduces weadown. NVM-only systems are 15-20 years away
3
Chap Chapter III r III – Hybrid ybrid DBMS
ready for NVM when it becomes available.
–DRAM + NVM oriented architecture –Fast Transactions + Real-time Analytics
3 5
Adap daptiv tive S Stor
age
3 6
Or Orig iginal D inal Data Ada dapt pted D ed Data
SELECT AVG(B) FROM myTable WHERE C < “yyy” UPDATE myTable SET A = 123, B = 456, C = 789 WHERE D = “xxx”
A B C D
BRIDGING THE ARCHIPELAGO BETWEEN ROW-STORES AND COLUMN-STORES FOR HYBRID WORKLOADS SIGMOD 2016A B C D
Cold Hot
A B C D
3 8
3 9
NVM Ready Query Compilation Vectorized Execution Autonomous Apache Licensed
Anthony Tomasic Todd Mowry Prashanth Menon Michael Zhang Lin Ma Matthew Perron Dana Van Aken Yingjun Wu Ran Xian Runshen Zhu Jiexi Lin Jianhong Li Ziqi Wang
http://pelotondb.org
Joy Arulraj