Managing Non-Volatile Memory in Database...
Transcript of Managing Non-Volatile Memory in Database...
![Page 1: Managing Non-Volatile Memory in Database Systemsnvmw.ucsd.edu/nvmw2019-program/unzip/current/nvmw2019...2015], wB-Tree [VLDB 2015], FP-Tree [SIGMOD 2016], WO[A]RT/ART+CoW[FAST 2017],](https://reader033.fdocuments.net/reader033/viewer/2022060511/5f28ea47b7be101d234652b9/html5/thumbnails/1.jpg)
Managing Non-Volatile Memory in Database Systems
Alexander van Renen, Viktor Leis,Alfons Kemper, Thomas Neumann
Takushi Hashida, Kazuichi Oe, Yoshiyasu Doi,Lilian Harada, Mitsuru Sato
-- Originally presented at SIGMOD 2018
![Page 2: Managing Non-Volatile Memory in Database Systemsnvmw.ucsd.edu/nvmw2019-program/unzip/current/nvmw2019...2015], wB-Tree [VLDB 2015], FP-Tree [SIGMOD 2016], WO[A]RT/ART+CoW[FAST 2017],](https://reader033.fdocuments.net/reader033/viewer/2022060511/5f28ea47b7be101d234652b9/html5/thumbnails/2.jpg)
2
Terminology, Assumptions, and Background• For this talk: NVM (PMem, NVRAM, SCM, NVMM)
• NVM assumptions:
• NVM is byte addressible
• NVM has a higher access latency than DRAM
• NVM has lower cost/GB than DRAM
• NVM has higher capacity than DRAM
• Sources:
• Paper: https://db.in.tum.de/~leis/papers/nvm.pdf
• Video: https://youtu.be/6RRe_cmDl0U
![Page 3: Managing Non-Volatile Memory in Database Systemsnvmw.ucsd.edu/nvmw2019-program/unzip/current/nvmw2019...2015], wB-Tree [VLDB 2015], FP-Tree [SIGMOD 2016], WO[A]RT/ART+CoW[FAST 2017],](https://reader033.fdocuments.net/reader033/viewer/2022060511/5f28ea47b7be101d234652b9/html5/thumbnails/3.jpg)
3
Database ArchitecturesMain Memory DBs• Primary data location in DRAM• Snapshots written to SSD• Logging to SSD
Disk-based DBs• Primary data location on disk• Loaded to DRAM for processing• Logging to SSD
![Page 4: Managing Non-Volatile Memory in Database Systemsnvmw.ucsd.edu/nvmw2019-program/unzip/current/nvmw2019...2015], wB-Tree [VLDB 2015], FP-Tree [SIGMOD 2016], WO[A]RT/ART+CoW[FAST 2017],](https://reader033.fdocuments.net/reader033/viewer/2022060511/5f28ea47b7be101d234652b9/html5/thumbnails/4.jpg)
4
Database ArchitecturesMain Memory DBs• Primary data location in DRAM• Snapshots written to SSD• Logging to SSD
How do we change dbs architecture for the NVM ?
Disk-based DBs• Primary data location on disk• Loaded to DRAM for processing• Logging to SSD
![Page 5: Managing Non-Volatile Memory in Database Systemsnvmw.ucsd.edu/nvmw2019-program/unzip/current/nvmw2019...2015], wB-Tree [VLDB 2015], FP-Tree [SIGMOD 2016], WO[A]RT/ART+CoW[FAST 2017],](https://reader033.fdocuments.net/reader033/viewer/2022060511/5f28ea47b7be101d234652b9/html5/thumbnails/5.jpg)
NVM-direct Approach
5
In-place updates• Requires failure atomicity• High NVM latency• No DRAM• No SSD
CDDS-Tree [VLDB 2015], NV-Tree [FAST 2015], wB-Tree [VLDB 2015], FP-Tree [SIGMOD 2016], WO[A]RT/ART+CoW [FAST 2017], HiKV [USENIX ATC 2017], Bz-Tree [VLDB 2018], BDCC+NVM [ICDE 2018], SAP Hana for NVM [VLDB 2017]
Root pointer
![Page 6: Managing Non-Volatile Memory in Database Systemsnvmw.ucsd.edu/nvmw2019-program/unzip/current/nvmw2019...2015], wB-Tree [VLDB 2015], FP-Tree [SIGMOD 2016], WO[A]RT/ART+CoW[FAST 2017],](https://reader033.fdocuments.net/reader033/viewer/2022060511/5f28ea47b7be101d234652b9/html5/thumbnails/6.jpg)
NVM-direct Data Structures
[Data Management on Non-Volatile Memory: A Perspective @Datenbank-Spektrum 18]
![Page 7: Managing Non-Volatile Memory in Database Systemsnvmw.ucsd.edu/nvmw2019-program/unzip/current/nvmw2019...2015], wB-Tree [VLDB 2015], FP-Tree [SIGMOD 2016], WO[A]RT/ART+CoW[FAST 2017],](https://reader033.fdocuments.net/reader033/viewer/2022060511/5f28ea47b7be101d234652b9/html5/thumbnails/7.jpg)
NVM-direct Approach
7
In-place updates• Requires failure atomicity• High NVM latency• No DRAM• No SSD
CDDS-Tree [VLDB 2015], NV-Tree [FAST 2015], wB-Tree [VLDB 2015], FP-Tree [SIGMOD 2016], WO[A]RT/ART+CoW [FAST 2017], HiKV [USENIX ATC 2017], Bz-Tree [VLDB 2018], BDCC+NVM [ICDE 2018], SAP Hana for NVM [VLDB 2017]
Root pointer
![Page 8: Managing Non-Volatile Memory in Database Systemsnvmw.ucsd.edu/nvmw2019-program/unzip/current/nvmw2019...2015], wB-Tree [VLDB 2015], FP-Tree [SIGMOD 2016], WO[A]RT/ART+CoW[FAST 2017],](https://reader033.fdocuments.net/reader033/viewer/2022060511/5f28ea47b7be101d234652b9/html5/thumbnails/8.jpg)
Buffered Approach
8
Out-of-place updates• No byte-addressability• No SSD
FOEDUS [SIGMOD 2015], SAP Hana for NVM [VLDB 2017]
![Page 9: Managing Non-Volatile Memory in Database Systemsnvmw.ucsd.edu/nvmw2019-program/unzip/current/nvmw2019...2015], wB-Tree [VLDB 2015], FP-Tree [SIGMOD 2016], WO[A]RT/ART+CoW[FAST 2017],](https://reader033.fdocuments.net/reader033/viewer/2022060511/5f28ea47b7be101d234652b9/html5/thumbnails/9.jpg)
State of the Art
9
![Page 10: Managing Non-Volatile Memory in Database Systemsnvmw.ucsd.edu/nvmw2019-program/unzip/current/nvmw2019...2015], wB-Tree [VLDB 2015], FP-Tree [SIGMOD 2016], WO[A]RT/ART+CoW[FAST 2017],](https://reader033.fdocuments.net/reader033/viewer/2022060511/5f28ea47b7be101d234652b9/html5/thumbnails/10.jpg)
The Ideal System: “Dream Chart”
10
![Page 11: Managing Non-Volatile Memory in Database Systemsnvmw.ucsd.edu/nvmw2019-program/unzip/current/nvmw2019...2015], wB-Tree [VLDB 2015], FP-Tree [SIGMOD 2016], WO[A]RT/ART+CoW[FAST 2017],](https://reader033.fdocuments.net/reader033/viewer/2022060511/5f28ea47b7be101d234652b9/html5/thumbnails/11.jpg)
1. Cache-Line-Grained Loading
11
We transfer individual cache lines (64Byte) instead of entire pages (16KB) between DRAM and NVM.
![Page 12: Managing Non-Volatile Memory in Database Systemsnvmw.ucsd.edu/nvmw2019-program/unzip/current/nvmw2019...2015], wB-Tree [VLDB 2015], FP-Tree [SIGMOD 2016], WO[A]RT/ART+CoW[FAST 2017],](https://reader033.fdocuments.net/reader033/viewer/2022060511/5f28ea47b7be101d234652b9/html5/thumbnails/12.jpg)
1. Cache-Line-Grained Loading
12
We transfer individual cache lines (64Byte) instead of entire pages (16KB) between DRAM and NVM.
![Page 13: Managing Non-Volatile Memory in Database Systemsnvmw.ucsd.edu/nvmw2019-program/unzip/current/nvmw2019...2015], wB-Tree [VLDB 2015], FP-Tree [SIGMOD 2016], WO[A]RT/ART+CoW[FAST 2017],](https://reader033.fdocuments.net/reader033/viewer/2022060511/5f28ea47b7be101d234652b9/html5/thumbnails/13.jpg)
1. Cache-Line-Grained Loading
13
We transfer individual cache lines (64Byte) instead of entire pages (16KB) between DRAM and NVM.
![Page 14: Managing Non-Volatile Memory in Database Systemsnvmw.ucsd.edu/nvmw2019-program/unzip/current/nvmw2019...2015], wB-Tree [VLDB 2015], FP-Tree [SIGMOD 2016], WO[A]RT/ART+CoW[FAST 2017],](https://reader033.fdocuments.net/reader033/viewer/2022060511/5f28ea47b7be101d234652b9/html5/thumbnails/14.jpg)
1. Cache-Line-Grained Loading
14
We transfer individual cache lines (64Byte) instead of entire pages (16KB) between DRAM and NVM.
![Page 15: Managing Non-Volatile Memory in Database Systemsnvmw.ucsd.edu/nvmw2019-program/unzip/current/nvmw2019...2015], wB-Tree [VLDB 2015], FP-Tree [SIGMOD 2016], WO[A]RT/ART+CoW[FAST 2017],](https://reader033.fdocuments.net/reader033/viewer/2022060511/5f28ea47b7be101d234652b9/html5/thumbnails/15.jpg)
1. Cache-Line-Grained Loading
15
We transfer individual cache lines (64Byte) instead of entire pages (16KB) between DRAM and NVM.
San Diego
![Page 16: Managing Non-Volatile Memory in Database Systemsnvmw.ucsd.edu/nvmw2019-program/unzip/current/nvmw2019...2015], wB-Tree [VLDB 2015], FP-Tree [SIGMOD 2016], WO[A]RT/ART+CoW[FAST 2017],](https://reader033.fdocuments.net/reader033/viewer/2022060511/5f28ea47b7be101d234652b9/html5/thumbnails/16.jpg)
1. Cache-Line-Grained Loading
16
We transfer individual cache lines (64Byte) instead of entire pages (16KB) between DRAM and NVM.
San Diego
![Page 17: Managing Non-Volatile Memory in Database Systemsnvmw.ucsd.edu/nvmw2019-program/unzip/current/nvmw2019...2015], wB-Tree [VLDB 2015], FP-Tree [SIGMOD 2016], WO[A]RT/ART+CoW[FAST 2017],](https://reader033.fdocuments.net/reader033/viewer/2022060511/5f28ea47b7be101d234652b9/html5/thumbnails/17.jpg)
2. Mini Pages
17
We implement mini pages which store only 16 cache lines (~1KB instead of 16KB).
![Page 18: Managing Non-Volatile Memory in Database Systemsnvmw.ucsd.edu/nvmw2019-program/unzip/current/nvmw2019...2015], wB-Tree [VLDB 2015], FP-Tree [SIGMOD 2016], WO[A]RT/ART+CoW[FAST 2017],](https://reader033.fdocuments.net/reader033/viewer/2022060511/5f28ea47b7be101d234652b9/html5/thumbnails/18.jpg)
2. Mini Pages
18
We implement mini pages which store only 16 cache lines (~1KB instead of 16KB).
San Diego
![Page 19: Managing Non-Volatile Memory in Database Systemsnvmw.ucsd.edu/nvmw2019-program/unzip/current/nvmw2019...2015], wB-Tree [VLDB 2015], FP-Tree [SIGMOD 2016], WO[A]RT/ART+CoW[FAST 2017],](https://reader033.fdocuments.net/reader033/viewer/2022060511/5f28ea47b7be101d234652b9/html5/thumbnails/19.jpg)
2. Mini Pages
19
We implement mini pages which store only 16 cache lines (~1KB instead of 16KB).
San Diego
![Page 20: Managing Non-Volatile Memory in Database Systemsnvmw.ucsd.edu/nvmw2019-program/unzip/current/nvmw2019...2015], wB-Tree [VLDB 2015], FP-Tree [SIGMOD 2016], WO[A]RT/ART+CoW[FAST 2017],](https://reader033.fdocuments.net/reader033/viewer/2022060511/5f28ea47b7be101d234652b9/html5/thumbnails/20.jpg)
3. Pointer Swizzling
20
We use pointer swizzling and low-overhead replacement strategies to reduce the buffer manager cost.
![Page 21: Managing Non-Volatile Memory in Database Systemsnvmw.ucsd.edu/nvmw2019-program/unzip/current/nvmw2019...2015], wB-Tree [VLDB 2015], FP-Tree [SIGMOD 2016], WO[A]RT/ART+CoW[FAST 2017],](https://reader033.fdocuments.net/reader033/viewer/2022060511/5f28ea47b7be101d234652b9/html5/thumbnails/21.jpg)
Performance Impact of Techniques
21
Buffer management needs to be tuned for NVM.
![Page 22: Managing Non-Volatile Memory in Database Systemsnvmw.ucsd.edu/nvmw2019-program/unzip/current/nvmw2019...2015], wB-Tree [VLDB 2015], FP-Tree [SIGMOD 2016], WO[A]RT/ART+CoW[FAST 2017],](https://reader033.fdocuments.net/reader033/viewer/2022060511/5f28ea47b7be101d234652b9/html5/thumbnails/22.jpg)
The Ideal System: “Dream Chart”
22
![Page 23: Managing Non-Volatile Memory in Database Systemsnvmw.ucsd.edu/nvmw2019-program/unzip/current/nvmw2019...2015], wB-Tree [VLDB 2015], FP-Tree [SIGMOD 2016], WO[A]RT/ART+CoW[FAST 2017],](https://reader033.fdocuments.net/reader033/viewer/2022060511/5f28ea47b7be101d234652b9/html5/thumbnails/23.jpg)
4. Utilize SSDs
23
By using fixed-size pages, we can extend the maximum possible workload size with SSDs.
![Page 24: Managing Non-Volatile Memory in Database Systemsnvmw.ucsd.edu/nvmw2019-program/unzip/current/nvmw2019...2015], wB-Tree [VLDB 2015], FP-Tree [SIGMOD 2016], WO[A]RT/ART+CoW[FAST 2017],](https://reader033.fdocuments.net/reader033/viewer/2022060511/5f28ea47b7be101d234652b9/html5/thumbnails/24.jpg)
Conclusion
24