Instant Recovery for Main-Memory Databases Ismail il Oukid id*, - - PowerPoint PPT Presentation

instant recovery for main memory databases
SMART_READER_LITE
LIVE PREVIEW

Instant Recovery for Main-Memory Databases Ismail il Oukid id*, - - PowerPoint PPT Presentation

Instant Recovery for Main-Memory Databases Ismail il Oukid id*, Wolfgang Lehner*, Thomas Kissinger*, Peter Bumbulis, and Thomas Willhalm + + Intel GmbH *TU Dresden SAP SE CIDR 2015, Asilomar, California, USA, January 5, 2015 Storage


slide-1
SLIDE 1

Instant Recovery for Main-Memory Databases

Ismail il Oukid id*°, Wolfgang Lehner*, Thomas Kissinger*, Peter Bumbulis°, and Thomas Willhalm + *TU Dresden °SAP SE

+ Intel GmbH

CIDR 2015, Asilomar, California, USA, January 5, 2015

slide-2
SLIDE 2

2

Storage Class Memory

Byte- addressable Low, asymmetric latency Denser than DRAM Energy efficient Non-Volatile Memory

SCM

slide-3
SLIDE 3

3

SCM Compared with Today‘s Technologies

Bandwidth

HDD DRAM SSD

1/Latency Capacity 1/Latency

SCM HDD SSD DRAM

SCM is a merging point between memory and storage

PCM MRAM STT-RAM Memristors

SCM

slide-4
SLIDE 4

4

SCM and Databases

Improving

  • ving the

e logging ging infra frastru tructur cture, e, e.g.: g.:

  • Fang et al. High performance database logging using Storage Class Memory. ICDE’11
  • Pelley et al. Storage management in the NVRAM era. VLDB’13
  • Huang et al. NVRAM-aware Logging in Transaction Systems. VLDB’14

Improving

  • ving spec

ecif ific c data tabase se algorith

  • rithms,

s, e.g.: g.:

  • Chen et al. Rethinking Database Algorithms for Phase Change Memory. CIDR’11
  • Stratis D. Viglas. Write-limited sorts and joins for persistent memory. VLDB’14

It takes a greenfield approach to measure the full potential of SCM

slide-5
SLIDE 5

5

SCM-enabled Architecture

Log log buffer buffer pool

… …

runtime data

Traditional Architecture

Database

SOFORT is a single

le-lev level el column-store, i.e.,

the working copy is

is the durable copy

database runtime data

SCM-enabled Architecture

HDD DRAM SCM Log Transient Main Memory Persistent Storage Transient Main Memory Non-Volatile Main Memory Moving the persistency bar Database

slide-6
SLIDE 6

6

Understanding SCM through Microbenchmarks

Hardwar ware-base ased d SCM simulation: mulation:

  • Special BIOS, tunable latency with means of a microcode patch
  • Limitation: symmetric instead of asymmetric read/write latency
  • Avoiding NUMA effects: benchmark run on a single socket
  • DRA

RAM Latency: 90ns ns SCM SCM latency: 200ns 0ns

slide-7
SLIDE 7

7

Understanding SCM through Microbenchmarks (2) SIMD-Scan performance on DRAM and SCM

8% 8% average slowdown 41% average slowdown

Workloads with sequential memory access patterns perform well on SCM

slide-8
SLIDE 8

8

Understanding SCM through Microbenchmarks (3) Skip List performance on DRAM and SCM

Workloads with random memory access patterns do not perform well on SCM

47% 49% 49%

We Still Need DRAM

slide-9
SLIDE 9

9

SOFORT Column Structure

SOFORT Column

  • Dict. Index
  • Dict. Array

Tables Value IDs

Persisted in SCM Volatile in DRAM

Tx array

On DRAM for better performance Persistent to enable continuing unfinished transactions

2 1 2 0 Asilomar 1 Dresden 2 Heidelberg (0, Asilomar) (1, Dresden) (2, Heidelberg)

Implementation details in “SOFORT: A Hybrid SCM-DRAM Storage Engine for Fast Data Recovery”, DaMoN’14

slide-10
SLIDE 10

10

Continuing Unfinished Transactions

DBMS Application

Statement 1 Statement 2 Statement 2 Abort Statement 3 Instant Recovery Connect & Begin Transaction Disconnect Reconnect

Finalize Statement

No Undo

Each executed statement is guaranteed to have persisted its changes in SCM. The Transaction array is persistent allowing unfinished transactions at crash time to continue.

slide-11
SLIDE 11

11

Performance Overview

THROUG

ROUGHP HPUT UT

RESTAR

ART TIME

Competitive performance even in high latency environment Fast restart time. No need to fetch data stored in SCM

Still not instant

18s 2s

slide-12
SLIDE 12

12

Improving Recovery Performance

SYNCHR

HRON ONOUS OUS RECOVERY

  • Step 1: Recovery memory management
  • Step 2: Recover primary data
  • Step 3: Continue unfinished statements
  • Step 4: Rebuild secondary data

structures on DRAM

  • Step 5: Start accepting user queries

INSTAN

ANT RECOV OVERY

  • Idea 1:
  • Use primary data to answer queries
  • Rebuild secondary data structures

asynchronously

  • Idea 2:
  • Persist part of or all secondary data

structures in SCM

Restart time depends on the size

  • f secondary data structures to

be rebuilt Instant responsiveness Instant recovery at peak performance

  • Perf. Penalty on throughput

Primary data already “loaded”

slide-13
SLIDE 13

13

Evaluation: Recovery Time

Throughput: -0% 0% Recovery area: -16% Recovery delta: ~8s

Synchronous Recovery Instant Recovery

0% indexes in SCM 40% indexes in SCM 100% indexes in SCM First query accepted after ~8s, i.e., Recovery delta = 8s 8s Throughput: -14% Recovery area: -82% 82% Recovery delta: <2s Throughput: -30% 30% Recovery area: -99,8% 99,8% Recovery delta: <5ms

slide-14
SLIDE 14

14

Evaluation: Throughput Vs. Recovery

Curves are not linear: secondary data structures are not equally important for TATP Throughput drop limited to 30%

Taking advantage of a workload’s characteristics leads to an optimal tradeoff

slide-15
SLIDE 15

15

Evaluation: Average Response Time

  • Max. avg. (over 100ms) Response

time:

  • 0% pers. indexes: 506

506µs

  • 100% pers. indexes: 2µs

Seek tradeoff depending on:

  • throughput requirements
  • response time requirements
  • desired recovery performance
slide-16
SLIDE 16

16

Conclusion and Future Work

WE SHOWED

ED THAT SCM CAN HELP:

  • Achieve instant recovery for main-memory databases
  • Continue unfinished transaction at crash time
  • Simplify durability management
  • Remove the need for a traditional transactional log

CURREN

RENT AND FUTURE RE WORK WORK INCLUD UDE:

  • Improve recovery performance without compromising query performance
  • Design new SCM-friendly persistent indexing structures
  • Persistent, DRAM like memory management for SCM
  • Testing tools for single-level store architectures
slide-17
SLIDE 17

17

Will SCM trigger a new rewrite of databases?

Th Thank ank You! Questi estion

  • ns?

s? Comm mments? ents?

Instant Recovery for Main-Memory Databases

ISMAIL OUKID*°, WOLFGANG LEHNER*, THOMAS KISSINGER*, PETER BUMBULIS°, AND THOMAS WILLHALM+ *TU DRESDEN °SAP SE

+ INTEL GMBH

Ismail il Oukid id

ismail.oukid@sap.com https://wwwdb.inf.tu-dresden.de/team/external-members/ismail-oukid/