hardware support for acid transactions in...

70
Arpit Joshi, Vijay Nagarajan, Marcelo Cintra, Stratis Viglas Hardware Support for ACID Transactions in Persistent Memory NVMW 2019

Upload: others

Post on 26-Mar-2020

3 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: Hardware Support for ACID Transactions in …nvmw.ucsd.edu/nvmw2019-program/unzip/current/nvmw2019...B = 20 W Write-sets in commercial HTMs limited by the size of the L1 cache. Atomic

Arpit Joshi, Vijay Nagarajan, Marcelo Cintra, Stratis Viglas

Hardware Support for ACID Transactions in Persistent Memory

NVMW 2019

Page 2: Hardware Support for ACID Transactions in …nvmw.ucsd.edu/nvmw2019-program/unzip/current/nvmw2019...B = 20 W Write-sets in commercial HTMs limited by the size of the L1 cache. Atomic

Persistent Memory SystemsL1

LLC

Persistent Memory

L1

!2

Page 3: Hardware Support for ACID Transactions in …nvmw.ucsd.edu/nvmw2019-program/unzip/current/nvmw2019...B = 20 W Write-sets in commercial HTMs limited by the size of the L1 cache. Atomic

Persistent Memory SystemsL1

LLC

Persistent Memory

L1• Persistent Memory

- Non-volatility over the memory bus- Load/Store interface to persistent data

!2

Page 4: Hardware Support for ACID Transactions in …nvmw.ucsd.edu/nvmw2019-program/unzip/current/nvmw2019...B = 20 W Write-sets in commercial HTMs limited by the size of the L1 cache. Atomic

Persistent Memory SystemsL1

LLC

Persistent Memory

L1• Persistent Memory

- Non-volatility over the memory bus- Load/Store interface to persistent data

!2

System Crashes

Page 5: Hardware Support for ACID Transactions in …nvmw.ucsd.edu/nvmw2019-program/unzip/current/nvmw2019...B = 20 W Write-sets in commercial HTMs limited by the size of the L1 cache. Atomic

Persistent Memory SystemsL1

LLC

Persistent Memory

L1• Persistent Memory

- Non-volatility over the memory bus- Load/Store interface to persistent data

• Crash Consistency- Is the persistent state consistent?- Programming Model: ACID Transactions

!2

System Crashes

Page 6: Hardware Support for ACID Transactions in …nvmw.ucsd.edu/nvmw2019-program/unzip/current/nvmw2019...B = 20 W Write-sets in commercial HTMs limited by the size of the L1 cache. Atomic

Persistent Memory SystemsL1

LLC

Persistent Memory

L1• Persistent Memory

- Non-volatility over the memory bus- Load/Store interface to persistent data

• Crash Consistency- Is the persistent state consistent?- Programming Model: ACID Transactions

!2

System Crashes

“Ensuring failure atomicity for all this computation without failure-atomic transactions is practically infeasible, if not impossible.”

Marathe et al. [HotStorage’17]

Page 7: Hardware Support for ACID Transactions in …nvmw.ucsd.edu/nvmw2019-program/unzip/current/nvmw2019...B = 20 W Write-sets in commercial HTMs limited by the size of the L1 cache. Atomic

Persistent Memory SystemsL1

LLC

Persistent Memory

L1• Persistent Memory

- Non-volatility over the memory bus- Load/Store interface to persistent data

• Crash Consistency- Is the persistent state consistent?- Programming Model: ACID Transactions

!2

System Crashes

“Ensuring failure atomicity for all this computation without failure-atomic transactions is practically infeasible, if not impossible.”

Marathe et al. [HotStorage’17]

How fast can we support ACID?

Page 8: Hardware Support for ACID Transactions in …nvmw.ucsd.edu/nvmw2019-program/unzip/current/nvmw2019...B = 20 W Write-sets in commercial HTMs limited by the size of the L1 cache. Atomic

ACID TransactionsL1

LLC

Persistent Memory

L1

!3

Page 9: Hardware Support for ACID Transactions in …nvmw.ucsd.edu/nvmw2019-program/unzip/current/nvmw2019...B = 20 W Write-sets in commercial HTMs limited by the size of the L1 cache. Atomic

ACID TransactionsL1

LLC

Persistent Memory

L1

!3

Atomic Visibility

Page 10: Hardware Support for ACID Transactions in …nvmw.ucsd.edu/nvmw2019-program/unzip/current/nvmw2019...B = 20 W Write-sets in commercial HTMs limited by the size of the L1 cache. Atomic

ACID TransactionsL1

LLC

Persistent Memory

L1

!3

Atomic Visibility

Atomic Durability

Page 11: Hardware Support for ACID Transactions in …nvmw.ucsd.edu/nvmw2019-program/unzip/current/nvmw2019...B = 20 W Write-sets in commercial HTMs limited by the size of the L1 cache. Atomic

ACID TransactionsL1

LLC

Persistent Memory

L1

!3

Atomic Visibility

Atomic Durability

Locks HTMSTM

Page 12: Hardware Support for ACID Transactions in …nvmw.ucsd.edu/nvmw2019-program/unzip/current/nvmw2019...B = 20 W Write-sets in commercial HTMs limited by the size of the L1 cache. Atomic

ACID TransactionsL1

LLC

Persistent Memory

L1

!3

Atomic Visibility

Atomic Durability

Locks HTMSTM

Check-pointing

H/W Logging

S/WLogging

Page 13: Hardware Support for ACID Transactions in …nvmw.ucsd.edu/nvmw2019-program/unzip/current/nvmw2019...B = 20 W Write-sets in commercial HTMs limited by the size of the L1 cache. Atomic

ACID TransactionsL1

LLC

Persistent Memory

L1

!3

Atomic Visibility

Atomic Durability

Locks HTMSTM

Check-pointing

H/W Logging

S/WLogging

Page 14: Hardware Support for ACID Transactions in …nvmw.ucsd.edu/nvmw2019-program/unzip/current/nvmw2019...B = 20 W Write-sets in commercial HTMs limited by the size of the L1 cache. Atomic

Atomic Visibility: HTM

!4

Page 15: Hardware Support for ACID Transactions in …nvmw.ucsd.edu/nvmw2019-program/unzip/current/nvmw2019...B = 20 W Write-sets in commercial HTMs limited by the size of the L1 cache. Atomic

Atomic Visibility: HTM

• Commercial HTMs [Intel, IBM]

!4

L1 Cache

Cache Line

A = 15

R

B = 20

W

11

Page 16: Hardware Support for ACID Transactions in …nvmw.ucsd.edu/nvmw2019-program/unzip/current/nvmw2019...B = 20 W Write-sets in commercial HTMs limited by the size of the L1 cache. Atomic

Atomic Visibility: HTM

• Commercial HTMs [Intel, IBM]- Version Management: read/write sets in

L1 cache

!4

L1 Cache

Cache Line

A = 15

R

B = 20

W

11

Page 17: Hardware Support for ACID Transactions in …nvmw.ucsd.edu/nvmw2019-program/unzip/current/nvmw2019...B = 20 W Write-sets in commercial HTMs limited by the size of the L1 cache. Atomic

Atomic Visibility: HTM

• Commercial HTMs [Intel, IBM]- Version Management: read/write sets in

L1 cache- Conflict Detection: piggy back on the

coherence protocol

!4

L1 Cache

Cache Line

A = 15

R

B = 20

W

11

Page 18: Hardware Support for ACID Transactions in …nvmw.ucsd.edu/nvmw2019-program/unzip/current/nvmw2019...B = 20 W Write-sets in commercial HTMs limited by the size of the L1 cache. Atomic

Atomic Visibility: HTM

• Commercial HTMs [Intel, IBM]- Version Management: read/write sets in

L1 cache- Conflict Detection: piggy back on the

coherence protocol- Commit: make updates non-speculative

!4

L1 Cache

Cache Line

A = 15

R

B = 20

W

Page 19: Hardware Support for ACID Transactions in …nvmw.ucsd.edu/nvmw2019-program/unzip/current/nvmw2019...B = 20 W Write-sets in commercial HTMs limited by the size of the L1 cache. Atomic

Atomic Visibility: HTM

• Commercial HTMs [Intel, IBM]- Version Management: read/write sets in

L1 cache- Conflict Detection: piggy back on the

coherence protocol- Commit: make updates non-speculative- Abort: invalidate write set

!4

L1 Cache

Cache Line R

B = 20

W

Page 20: Hardware Support for ACID Transactions in …nvmw.ucsd.edu/nvmw2019-program/unzip/current/nvmw2019...B = 20 W Write-sets in commercial HTMs limited by the size of the L1 cache. Atomic

Atomic Visibility: HTM

• Commercial HTMs [Intel, IBM]- Version Management: read/write sets in

L1 cache- Conflict Detection: piggy back on the

coherence protocol- Commit: make updates non-speculative- Abort: invalidate write set

!4

L1 Cache

Cache Line R

B = 20

W

Write-sets in commercial HTMs limited by the size of the L1 cache.

Page 21: Hardware Support for ACID Transactions in …nvmw.ucsd.edu/nvmw2019-program/unzip/current/nvmw2019...B = 20 W Write-sets in commercial HTMs limited by the size of the L1 cache. Atomic

Atomic Durability: Logging

!5

Page 22: Hardware Support for ACID Transactions in …nvmw.ucsd.edu/nvmw2019-program/unzip/current/nvmw2019...B = 20 W Write-sets in commercial HTMs limited by the size of the L1 cache. Atomic

Atomic Durability: Logging

• Logging for durability [Doshi’16, Joshi’17, Shin’17, Ogleari’18]

!5

Persistent Memory

In-place Values

A = 10B = 20C = 30

Page 23: Hardware Support for ACID Transactions in …nvmw.ucsd.edu/nvmw2019-program/unzip/current/nvmw2019...B = 20 W Write-sets in commercial HTMs limited by the size of the L1 cache. Atomic

Atomic Durability: Logging

• Logging for durability [Doshi’16, Joshi’17, Shin’17, Ogleari’18]- Write a log entry for every update

!5

Persistent Memory

In-place Values

A = 10B = 20C = 30

Transaction Log

A = 15B = 25

Page 24: Hardware Support for ACID Transactions in …nvmw.ucsd.edu/nvmw2019-program/unzip/current/nvmw2019...B = 20 W Write-sets in commercial HTMs limited by the size of the L1 cache. Atomic

Atomic Durability: Logging

• Logging for durability [Doshi’16, Joshi’17, Shin’17, Ogleari’18]- Write a log entry for every update- Commit: Update the values in-place

!5

Persistent Memory

In-place Values

A = 15B = 25C = 30

Transaction Log

Page 25: Hardware Support for ACID Transactions in …nvmw.ucsd.edu/nvmw2019-program/unzip/current/nvmw2019...B = 20 W Write-sets in commercial HTMs limited by the size of the L1 cache. Atomic

Atomic Durability: Logging

• Logging for durability [Doshi’16, Joshi’17, Shin’17, Ogleari’18]- Write a log entry for every update- Commit: Update the values in-place- Abort: Undo any in-place updates

!5

Persistent Memory

In-place Values

A = 15B = 25C = 30

Transaction Log

A = 10B = 20

Page 26: Hardware Support for ACID Transactions in …nvmw.ucsd.edu/nvmw2019-program/unzip/current/nvmw2019...B = 20 W Write-sets in commercial HTMs limited by the size of the L1 cache. Atomic

Atomic Durability: Logging

• Logging for durability [Doshi’16, Joshi’17, Shin’17, Ogleari’18]- Write a log entry for every update- Commit: Update the values in-place- Abort: Undo any in-place updates

!5

Persistent Memory

In-place Values

A = 15B = 25C = 30

Transaction Log

A = 10B = 20

In-place updates in the critical path of commit High memory write bandwidth requirement

Page 27: Hardware Support for ACID Transactions in …nvmw.ucsd.edu/nvmw2019-program/unzip/current/nvmw2019...B = 20 W Write-sets in commercial HTMs limited by the size of the L1 cache. Atomic

ACID = HTM + Logging

Goals:- Support fast commits - Minimise memory bandwidth consumption- Extend the supported transaction size- Maintain the simplicity of commercial HTMs

!6

Page 28: Hardware Support for ACID Transactions in …nvmw.ucsd.edu/nvmw2019-program/unzip/current/nvmw2019...B = 20 W Write-sets in commercial HTMs limited by the size of the L1 cache. Atomic

DHTM: Durable Hardware Transactional Memory

L1

LLC

Persistent Memory

L1

!7

Log Writes

Page 29: Hardware Support for ACID Transactions in …nvmw.ucsd.edu/nvmw2019-program/unzip/current/nvmw2019...B = 20 W Write-sets in commercial HTMs limited by the size of the L1 cache. Atomic

Commercial HTM + Hardware Redo Log

DHTM: Durable Hardware Transactional Memory

L1

LLC

Persistent Memory

L1

!7

Log Writes

Page 30: Hardware Support for ACID Transactions in …nvmw.ucsd.edu/nvmw2019-program/unzip/current/nvmw2019...B = 20 W Write-sets in commercial HTMs limited by the size of the L1 cache. Atomic

Commercial HTM + Hardware Redo Log- H/W Redo Log + Log Buffer

Reduced memory bandwidth Fast commits

DHTM: Durable Hardware Transactional Memory

L1

LLC

Persistent Memory

L1

!7

Log Writes

Page 31: Hardware Support for ACID Transactions in …nvmw.ucsd.edu/nvmw2019-program/unzip/current/nvmw2019...B = 20 W Write-sets in commercial HTMs limited by the size of the L1 cache. Atomic

Commercial HTM + Hardware Redo Log- H/W Redo Log + Log Buffer

Reduced memory bandwidth Fast commits

- H/W Log + Sticky State Extended transaction size to the LLC Simplicity of commercial HTM

DHTM: Durable Hardware Transactional Memory

L1

LLC

Persistent Memory

L1

!7

Log Writes

Page 32: Hardware Support for ACID Transactions in …nvmw.ucsd.edu/nvmw2019-program/unzip/current/nvmw2019...B = 20 W Write-sets in commercial HTMs limited by the size of the L1 cache. Atomic

!8

L1

LLC

Persistent Memory

L1

Log Writes

DHTM: Log Buffer

Page 33: Hardware Support for ACID Transactions in …nvmw.ucsd.edu/nvmw2019-program/unzip/current/nvmw2019...B = 20 W Write-sets in commercial HTMs limited by the size of the L1 cache. Atomic

!8

L1

LLC

Persistent Memory

L1• Redo Log Bandwidth Problem

Log Writes

DHTM: Log Buffer

Page 34: Hardware Support for ACID Transactions in …nvmw.ucsd.edu/nvmw2019-program/unzip/current/nvmw2019...B = 20 W Write-sets in commercial HTMs limited by the size of the L1 cache. Atomic

!8

L1

LLC

Persistent Memory

L1• Redo Log Bandwidth Problem

- write a log entry for every storeLog Writes

DHTM: Log Buffer

Page 35: Hardware Support for ACID Transactions in …nvmw.ucsd.edu/nvmw2019-program/unzip/current/nvmw2019...B = 20 W Write-sets in commercial HTMs limited by the size of the L1 cache. Atomic

!8

L1

LLC

Persistent Memory

L1• Redo Log Bandwidth Problem

- write a log entry for every store- multiple stores create multiple log entriesLog Writes

DHTM: Log Buffer

Page 36: Hardware Support for ACID Transactions in …nvmw.ucsd.edu/nvmw2019-program/unzip/current/nvmw2019...B = 20 W Write-sets in commercial HTMs limited by the size of the L1 cache. Atomic

!8

L1

LLC

Persistent Memory

L1• Redo Log Bandwidth Problem

- write a log entry for every store- multiple stores create multiple log entries

• Solution: Log Buffer

Log Writes

DHTM: Log Buffer

Page 37: Hardware Support for ACID Transactions in …nvmw.ucsd.edu/nvmw2019-program/unzip/current/nvmw2019...B = 20 W Write-sets in commercial HTMs limited by the size of the L1 cache. Atomic

!8

L1

LLC

Persistent Memory

L1• Redo Log Bandwidth Problem

- write a log entry for every store- multiple stores create multiple log entries

• Solution: Log Buffer - track cache lines being modified

Log Writes

DHTM: Log Buffer

Page 38: Hardware Support for ACID Transactions in …nvmw.ucsd.edu/nvmw2019-program/unzip/current/nvmw2019...B = 20 W Write-sets in commercial HTMs limited by the size of the L1 cache. Atomic

!8

L1

LLC

Persistent Memory

L1• Redo Log Bandwidth Problem

- write a log entry for every store- multiple stores create multiple log entries

• Solution: Log Buffer - track cache lines being modified- multiple writes coalesced in a log entry

Log Writes

DHTM: Log Buffer

Page 39: Hardware Support for ACID Transactions in …nvmw.ucsd.edu/nvmw2019-program/unzip/current/nvmw2019...B = 20 W Write-sets in commercial HTMs limited by the size of the L1 cache. Atomic

!8

L1

LLC

Persistent Memory

L1• Redo Log Bandwidth Problem

- write a log entry for every store- multiple stores create multiple log entries

• Solution: Log Buffer - track cache lines being modified- multiple writes coalesced in a log entry - log entry written to persistent memory on eviction

from log buffer

Log Writes

DHTM: Log Buffer

Page 40: Hardware Support for ACID Transactions in …nvmw.ucsd.edu/nvmw2019-program/unzip/current/nvmw2019...B = 20 W Write-sets in commercial HTMs limited by the size of the L1 cache. Atomic

DHTM: Transaction States

!9

Page 41: Hardware Support for ACID Transactions in …nvmw.ucsd.edu/nvmw2019-program/unzip/current/nvmw2019...B = 20 W Write-sets in commercial HTMs limited by the size of the L1 cache. Atomic

DHTM: Transaction States

!9

Active

Begin Transaction

Page 42: Hardware Support for ACID Transactions in …nvmw.ucsd.edu/nvmw2019-program/unzip/current/nvmw2019...B = 20 W Write-sets in commercial HTMs limited by the size of the L1 cache. Atomic

DHTM: Transaction States

!9

Active Commit

Begin Transaction

End Transaction&

Log RecordsPersisted

Page 43: Hardware Support for ACID Transactions in …nvmw.ucsd.edu/nvmw2019-program/unzip/current/nvmw2019...B = 20 W Write-sets in commercial HTMs limited by the size of the L1 cache. Atomic

DHTM: Transaction States

!9

Active Commit CommitComplete

Begin Transaction

End Transaction&

Log RecordsPersisted

In-place DataPersisted

Page 44: Hardware Support for ACID Transactions in …nvmw.ucsd.edu/nvmw2019-program/unzip/current/nvmw2019...B = 20 W Write-sets in commercial HTMs limited by the size of the L1 cache. Atomic

DHTM: Transaction States

!9

Active Commit CommitComplete

Abort

Begin Transaction

End Transaction&

Log RecordsPersisted

In-place DataPersisted

Conflict

Page 45: Hardware Support for ACID Transactions in …nvmw.ucsd.edu/nvmw2019-program/unzip/current/nvmw2019...B = 20 W Write-sets in commercial HTMs limited by the size of the L1 cache. Atomic

DHTM: Commit ExampleL1 Cache

Cache Line R W

Persistent Memory

In-place Values

A = 15B = 25A = 10B = 20C = 30

Transaction Log

A = 10B = 20

State

Log Buffer Begin_Transaction

Write (A=15)

Read (B)

Write (B=25)

End_Transaction

!10

Page 46: Hardware Support for ACID Transactions in …nvmw.ucsd.edu/nvmw2019-program/unzip/current/nvmw2019...B = 20 W Write-sets in commercial HTMs limited by the size of the L1 cache. Atomic

Active

DHTM: Commit ExampleL1 Cache

Cache Line R W

Persistent Memory

In-place Values

A = 15B = 25A = 10B = 20C = 30

Transaction Log

A = 10B = 20

State

Log Buffer Begin_Transaction

Write (A=15)

Read (B)

Write (B=25)

End_Transaction

!10

Page 47: Hardware Support for ACID Transactions in …nvmw.ucsd.edu/nvmw2019-program/unzip/current/nvmw2019...B = 20 W Write-sets in commercial HTMs limited by the size of the L1 cache. Atomic

ActiveActive

DHTM: Commit ExampleL1 Cache

Cache Line R W

Persistent Memory

In-place Values

A = 15B = 25A = 10B = 20C = 30

Transaction Log

A = 10B = 20

State

Log Buffer Begin_Transaction

Write (A=15)

Read (B)

Write (B=25)

End_Transaction

!10

A = 15 1A

Page 48: Hardware Support for ACID Transactions in …nvmw.ucsd.edu/nvmw2019-program/unzip/current/nvmw2019...B = 20 W Write-sets in commercial HTMs limited by the size of the L1 cache. Atomic

ActiveActive

DHTM: Commit ExampleL1 Cache

Cache Line R W

Persistent Memory

In-place Values

A = 15B = 25A = 10B = 20C = 30

Transaction Log

A = 10B = 20

State

Log Buffer Begin_Transaction

Write (A=15)

Read (B)

Write (B=25)

End_Transaction

!10

A = 15 1A

A = 15 1AB = 20 1

Page 49: Hardware Support for ACID Transactions in …nvmw.ucsd.edu/nvmw2019-program/unzip/current/nvmw2019...B = 20 W Write-sets in commercial HTMs limited by the size of the L1 cache. Atomic

ActiveActive

DHTM: Commit ExampleL1 Cache

Cache Line R W

Persistent Memory

In-place Values

A = 15B = 25A = 10B = 20C = 30

Transaction Log

A = 10B = 20

State

Log Buffer Begin_Transaction

Write (A=15)

Read (B)

Write (B=25)

End_Transaction

!10

A = 15 1A

A = 15 1AB = 20B = 25 11 1

A = 15

B

Page 50: Hardware Support for ACID Transactions in …nvmw.ucsd.edu/nvmw2019-program/unzip/current/nvmw2019...B = 20 W Write-sets in commercial HTMs limited by the size of the L1 cache. Atomic

ActiveActiveCommit

DHTM: Commit ExampleL1 Cache

Cache Line R W

Persistent Memory

In-place Values

A = 15B = 25A = 10B = 20C = 30

Transaction Log

A = 10B = 20

State

Log Buffer Begin_Transaction

Write (A=15)

Read (B)

Write (B=25)

End_Transaction

!10

A = 15 1A

A = 15 1AB = 20B = 25 11 1

A = 15

B

B = 25

B = 25

A = 15

Commit

1

Page 51: Hardware Support for ACID Transactions in …nvmw.ucsd.edu/nvmw2019-program/unzip/current/nvmw2019...B = 20 W Write-sets in commercial HTMs limited by the size of the L1 cache. Atomic

ActiveActiveCommit

DHTM: Commit ExampleL1 Cache

Cache Line R W

Persistent Memory

In-place Values

A = 15B = 25A = 10B = 20C = 30

Transaction Log

A = 10B = 20

State

Log Buffer Begin_Transaction

Write (A=15)

Read (B)

Write (B=25)

End_Transaction

!10

A = 15 1A

A = 15 1AB = 20B = 25 11 1

A = 15

B

B = 25

B = 25

A = 15

CommitA = 15B = 25

Complete

CommitComplete

CommitB = 25

1

Page 52: Hardware Support for ACID Transactions in …nvmw.ucsd.edu/nvmw2019-program/unzip/current/nvmw2019...B = 20 W Write-sets in commercial HTMs limited by the size of the L1 cache. Atomic

DHTM: Supporting Overflow

!11

Page 53: Hardware Support for ACID Transactions in …nvmw.ucsd.edu/nvmw2019-program/unzip/current/nvmw2019...B = 20 W Write-sets in commercial HTMs limited by the size of the L1 cache. Atomic

DHTM: Supporting Overflow

• Problems with Overflow:

!11

Page 54: Hardware Support for ACID Transactions in …nvmw.ucsd.edu/nvmw2019-program/unzip/current/nvmw2019...B = 20 W Write-sets in commercial HTMs limited by the size of the L1 cache. Atomic

DHTM: Supporting Overflow

• Problems with Overflow:- Version Management:

- global operation on write-set on a commit/abort- overhead infeasible in larger caches (beyond L1)

!11

Page 55: Hardware Support for ACID Transactions in …nvmw.ucsd.edu/nvmw2019-program/unzip/current/nvmw2019...B = 20 W Write-sets in commercial HTMs limited by the size of the L1 cache. Atomic

DHTM: Supporting Overflow

• Problems with Overflow:- Version Management:

- global operation on write-set on a commit/abort- overhead infeasible in larger caches (beyond L1)

- Conflict Detection: - additional metadata to detect conflicts- increased complexity due to NACK based protocols

!11

Page 56: Hardware Support for ACID Transactions in …nvmw.ucsd.edu/nvmw2019-program/unzip/current/nvmw2019...B = 20 W Write-sets in commercial HTMs limited by the size of the L1 cache. Atomic

DHTM: Supporting Overflow

!12

Page 57: Hardware Support for ACID Transactions in …nvmw.ucsd.edu/nvmw2019-program/unzip/current/nvmw2019...B = 20 W Write-sets in commercial HTMs limited by the size of the L1 cache. Atomic

DHTM: Supporting Overflow

!12

• Solution

Page 58: Hardware Support for ACID Transactions in …nvmw.ucsd.edu/nvmw2019-program/unzip/current/nvmw2019...B = 20 W Write-sets in commercial HTMs limited by the size of the L1 cache. Atomic

DHTM: Supporting Overflow

!12

LLC

Persistent Memory

• Solution- Version Management:

- Overflow List

Page 59: Hardware Support for ACID Transactions in …nvmw.ucsd.edu/nvmw2019-program/unzip/current/nvmw2019...B = 20 W Write-sets in commercial HTMs limited by the size of the L1 cache. Atomic

DHTM: Supporting Overflow

!12

LLC

Persistent Memory

Overflow List

C

AB

• Solution- Version Management:

- Overflow List

Page 60: Hardware Support for ACID Transactions in …nvmw.ucsd.edu/nvmw2019-program/unzip/current/nvmw2019...B = 20 W Write-sets in commercial HTMs limited by the size of the L1 cache. Atomic

DHTM: Supporting Overflow

!12

LLC

Persistent Memory

Overflow List

C

AB

• Solution- Version Management:

- Overflow List

Page 61: Hardware Support for ACID Transactions in …nvmw.ucsd.edu/nvmw2019-program/unzip/current/nvmw2019...B = 20 W Write-sets in commercial HTMs limited by the size of the L1 cache. Atomic

DHTM: Supporting Overflow

!12

LLC

Persistent Memory

Overflow List

C

AB

• Solution- Version Management:

- Overflow List- Conflict Detection:

- maintain sticky state on overflow (similar to LogTM)

- avoid NACK by restricting overflow to LLC

Page 62: Hardware Support for ACID Transactions in …nvmw.ucsd.edu/nvmw2019-program/unzip/current/nvmw2019...B = 20 W Write-sets in commercial HTMs limited by the size of the L1 cache. Atomic

Evaluation

• System Configuration- We evaluate an 8-core machine with a 2-level cache hierarchy- HTM’s implement (first) writer wins conflict resolution policy

!13

Atomic Visibility Atomic Durability

ATOM Locks Hardware Undo Log

LogTM+ATOM HTM (LogTM) Hardware Undo Log

DHTM HTM Hardware Redo Log (Log Buffer)

Page 63: Hardware Support for ACID Transactions in …nvmw.ucsd.edu/nvmw2019-program/unzip/current/nvmw2019...B = 20 W Write-sets in commercial HTMs limited by the size of the L1 cache. Atomic

Evaluation

!14

Page 64: Hardware Support for ACID Transactions in …nvmw.ucsd.edu/nvmw2019-program/unzip/current/nvmw2019...B = 20 W Write-sets in commercial HTMs limited by the size of the L1 cache. Atomic

Evaluation

!14

1

1.25

1.5

1.75

2

queue hash sdg sps btree rbtree gmean

ATOM LogTM+ATOM DHTM

Page 65: Hardware Support for ACID Transactions in …nvmw.ucsd.edu/nvmw2019-program/unzip/current/nvmw2019...B = 20 W Write-sets in commercial HTMs limited by the size of the L1 cache. Atomic

Evaluation

!14

1

1.25

1.5

1.75

2

queue hash sdg sps btree rbtree gmean

ATOM LogTM+ATOM DHTM

Page 66: Hardware Support for ACID Transactions in …nvmw.ucsd.edu/nvmw2019-program/unzip/current/nvmw2019...B = 20 W Write-sets in commercial HTMs limited by the size of the L1 cache. Atomic

Evaluation

!14

1

1.25

1.5

1.75

2

queue hash sdg sps btree rbtree gmean

ATOM LogTM+ATOM DHTM

Page 67: Hardware Support for ACID Transactions in …nvmw.ucsd.edu/nvmw2019-program/unzip/current/nvmw2019...B = 20 W Write-sets in commercial HTMs limited by the size of the L1 cache. Atomic

Evaluation

!14

1

1.25

1.5

1.75

2

queue hash sdg sps btree rbtree gmean

ATOM LogTM+ATOM DHTM

26%

Page 68: Hardware Support for ACID Transactions in …nvmw.ucsd.edu/nvmw2019-program/unzip/current/nvmw2019...B = 20 W Write-sets in commercial HTMs limited by the size of the L1 cache. Atomic

Evaluation

!14

1

1.25

1.5

1.75

2

queue hash sdg sps btree rbtree gmean

ATOM LogTM+ATOM DHTM

17%

Page 69: Hardware Support for ACID Transactions in …nvmw.ucsd.edu/nvmw2019-program/unzip/current/nvmw2019...B = 20 W Write-sets in commercial HTMs limited by the size of the L1 cache. Atomic

Conclusion

• Persistent memory systems require crash consistency• ACID Transactions: widely understood crash consistency mechanism

• DHTM: ACID transactions in hardware- Atomic Visibility: commercial HTM- Atomic Durability: bandwidth optimized hardware redo log- Leverage hardware logging to extend transaction size unto LLC

!15

Page 70: Hardware Support for ACID Transactions in …nvmw.ucsd.edu/nvmw2019-program/unzip/current/nvmw2019...B = 20 W Write-sets in commercial HTMs limited by the size of the L1 cache. Atomic

Arpit Joshi, Vijay Nagarajan, Marcelo Cintra, Stratis Viglas

Hardware Support for ACID Transactions in Persistent Memory

NVMW 2019