MEMORY MEANS FOR THE FUTURE OF DATABASE SYSTEMS @ANDY_PAVLO 1973 - - PowerPoint PPT Presentation

memory
SMART_READER_LITE
LIVE PREVIEW

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


slide-1
SLIDE 1

@ANDY_PAVLO WHAT NON-VOLATILE

MEMORY

MEANS FOR THE FUTURE OF

DATABASE SYSTEMS

slide-2
SLIDE 2

1973

slide-3
SLIDE 3

1974

slide-4
SLIDE 4

1978

slide-5
SLIDE 5

1986

slide-6
SLIDE 6

1994

slide-7
SLIDE 7

2010

slide-8
SLIDE 8
slide-9
SLIDE 9

2016

slide-10
SLIDE 10

The Future

slide-11
SLIDE 11

Non Non-Vola

  • latile

tile M Memor mory

1 1

  • Persistent storage with byte-addressable operations.
  • Fast read/write latencies.
  • No difference between random vs. sequential access.
slide-12
SLIDE 12

Wh What does s NVM VM mean for D DBMSs? MSs?

1 2

  • Thinking of NVM as just a faster SSD is not interesting.
  • We want to use NVM as permanent storage for the

database, but this has major implications.

–Operating System Support –Cloud Provider Provisioning –Database Management System Architectures

slide-13
SLIDE 13

Existing Systems NVM-Only Storage Hybrid DBMS

1 3

Existing Systems NVM-Only Storage Hybrid DBMS

slide-14
SLIDE 14

Chap Chapter I r I – Exis xisting ting Systems

1 4

  • Investigate how existing systems perform with NVM for

write-heavy transaction processing (OLTP) workloads.

  • Evaluate two types of DBMS architectures.

–Disk-oriented (MySQL) –In-Memory (H-Store)

A PROLEGOMENON ON OLTP DATABASE SYSTEMS FOR NON-VOLATILE MEMORY ADMS@VLDB 2015
slide-15
SLIDE 15

1 5

DISK-ORIENTED

Buffer Pool Table Heap Log Snapshots

IN-MEMORY

Table Heap Log Snapshots

slide-16
SLIDE 16

In Intel l Labs abs NV NVM Em Emula ulator

  • r

1 6

  • Instrumented motherboard that slows down access to

the memory controller with tunable latencies.

  • Special assembly to emulate upcoming Xeon

instructions for flushing cache lines.

STORE STORE

L1 Cache

L2 Cache PCOMMIT

slide-17
SLIDE 17

Exp xperim rimental E al Evalu aluation tion

1 7

  • Compare architectures on Intel Labs NVM emulator.
  • Yahoo! Cloud Serving Benchmark:

–10 million records (~10GB) –8x database / memory –Variable skew

slide-18
SLIDE 18

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

slide-19
SLIDE 19

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

slide-20
SLIDE 20

LESSONS

2 0

Logging is a major performance bottleneck.

2 1 NVM Latency does not

have a large impact. Legacy DBMSs are not

  • t

prepared to run on NVM.

3

slide-21
SLIDE 21

What would Larry Ellison do?

slide-22
SLIDE 22
slide-23
SLIDE 23

Chap Chapter II r II – NVM VM-on

  • nly S

ly Stor

  • rag

age

  • Evaluate storage and recovery methods for a system

that only has NVM.

  • Testbed DBMS with a pluggable storage engines.
  • We had to build our own NVM-aware memory allocator.
LET'S TALK ABOUT STORAGE & RECOVERY METHODS FOR NON-VOLATILE MEMORY DATABASE SYSTEMS SIGMOD 2015

2 3

slide-24
SLIDE 24

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

slide-25
SLIDE 25

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

slide-26
SLIDE 26

NVM VM-Op Optim timiz ized Ar d Archit chitectur tures

2 6

  • Use non-volatile pointers to only record what changed

rather than how it changed.

  • Be careful about how & when things get flushed from

CPU caches to NVM.

slide-27
SLIDE 27

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

slide-28
SLIDE 28

Evalu aluation tion

2 8

  • Testbed system using the Intel NVM hardware emulator.
  • Yahoo! Cloud Serving Benchmark

–2 million records + 1 million transactions –High-skew setting

slide-29
SLIDE 29

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

slide-30
SLIDE 30

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%

slide-31
SLIDE 31

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

slide-32
SLIDE 32

LESSONS

3 2

Avoid block-oriented components.

2 1 Using NVM correctly

improves throughput & reduces weadown. NVM-only systems are 15-20 years away

3

slide-33
SLIDE 33

What would Nikita Kahn do?

slide-34
SLIDE 34
slide-35
SLIDE 35

Chap Chapter III r III – Hybrid ybrid DBMS

  • Design and build a new in-memory DBMS that will be

ready for NVM when it becomes available.

  • Hybrid Storage + Hybrid Workloads

–DRAM + NVM oriented architecture –Fast Transactions + Real-time Analytics

3 5

slide-36
SLIDE 36

Adap daptiv tive S Stor

  • rage

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 2016

A B C D

Cold Hot

A B C D

slide-37
SLIDE 37

LESSONS

slide-38
SLIDE 38

3 8

Peloton

The Self-Driving Database Management System

slide-39
SLIDE 39

3 9

NVM Ready Query Compilation Vectorized Execution Autonomous Apache Licensed

slide-40
SLIDE 40

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

slide-41
SLIDE 41

@ANDY_PAVLO