/
Loose-Ordering Consistency for Persistent Memory Loose-Ordering Consistency for Persistent Memory

Loose-Ordering Consistency for Persistent Memory - PowerPoint Presentation

yoshiko-marsland
yoshiko-marsland . @yoshiko-marsland
Follow
418 views
Uploaded On 2017-08-16

Loose-Ordering Consistency for Persistent Memory - PPT Presentation

Youyou Lu 1 Jiwu Shu 1 Long Sun 1 Onur Mutlu 2 1 Tsinghua University 2 Carnegie Mellon University Problem Strict write ordering required for storage consistency dramatically degrades performance in persistent memory ID: 579259

commit ordering memory persistence ordering commit persistence memory persistent log performance storage loose cpu writestep cache order intra record

Share:

Link:

Embed:

Download Presentation from below link

Download Presentation The PPT/PDF document "Loose-Ordering Consistency for Persisten..." is the property of its rightful owner. Permission is granted to download and print the materials on this web site for personal, non-commercial use only, and to display it on your personal computer provided you do not modify the materials and that you retain all copyright notices contained in the materials. By downloading content from our website, you accept the terms of this agreement.


Presentation Transcript

Slide1

Loose-Ordering Consistency for Persistent Memory

Youyou Lu1, Jiwu Shu1, Long Sun1, Onur Mutlu2

1Tsinghua University2Carnegie Mellon UniversitySlide2

Problem:

Strict write ordering required for storage consistency dramatically degrades performance in persistent memoryOur Goal: To keep the performance overhead low while maintaining the storage consistencyKey Idea: To Loosen the persistence ordering with hardware supportEager commit: A commit protocol that eliminates the use of commit record, by reorganizing the memory log structureSpeculative persistence: Allows out-of-order persistence to persistent memory, but ensures in-order commit

in programs, leveraging the tracking of transaction dependencies and the support of multi-versioning in the CPU cacheResults: Reduces average performance overhead of persistence ordering from 67% to 35%Summary2Slide3

Outline

Introduction and BackgroundExisting ApproachesOur Approach: Loose-Ordering ConsistencyEager CommitSpeculative PersistenceEvaluationConclusion3Slide4

Outline

Introduction and BackgroundExisting ApproachesOur Approach: Loose-Ordering ConsistencyEager CommitSpeculative PersistenceEvaluationConclusion4Slide5

LLC

L2L1Persistent MemoryPersistent Memory Memory-level storage: Use non-volatile memory in main memory level to provide data persistenceStorage ConsistencyAtomicity and Durability: Recoverable from unexpected failuresBoundary of volatility and persistence moved from Storage/Memory to Memory/CacheMemory(NVM)Disk StorageLLC

L2L1Memory

(DRAM)Disk Storage

5Slide6

Storage Consistency – Write-Ahead Logging(WAL)

Step 1. Log WriteStep 2. Commit Record WriteStep 3. In-place WriteStep 4. Log TruncationCEFIJM

NO

M’

O’

P’

J’

J’

M’

O’

P’

Ordering is required for storage consistency.

Intra-

tx

Ordering

Inter-

tx

Ordering

Program

Ack

6Slide7

High Overhead for Ordering in PM

Persistence orderingForce writes from volatile CPU cache to Persistent MemoryMemory(NVM)High overhead for persistence orderingThe boundary between volatility and persistence lies between the H/W controlled cache and the persistent memory

Costly software flushes (clflush) and waits (fence)Existing systems reorder writes at multiple levels, especially in the CPU and cache hierarchy7LLC

L2

L1

Volatile

PersistentSlide8

Outline

Introduction and BackgroundExisting ApproachesOur Approach: Loose-Ordering ConsistencyEager CommitSpeculative PersistenceEvaluationConclusion8Slide9

LLC

L2L1LLCL2L1Existing ApproachesAllowing asynchronous commit of transactionsAllow the execution of a later transaction without waiting for the persistence of previous transactionsAllow execution reordering, but no persistence reordering

Memory(NVM)Memory(NVM)

Making the CPU cache non-volatile

Reduce the time gap between volatility and persistence by employing a non-volatile cache

Is complementary to our LOC approach

3

2

1

1

9

LLC

1

2

3

4

1

2

3

4

T1: A, B, C, D

T2: A, F

T3: B, C, E

T4: D, E, F, GSlide10

LLC

L2L1Our Solution: Key IdeasLoose-Ordering Consistency (LOC)Allow persistence reorderingMemory(NVM)4321

31

Eager Commit

Remove

the intra-

tx

ordering

D

elay the completeness check till recovery phase

R

eorganize the memory log structure

Speculative Persistence

Relax

the inter-

tx

ordering

S

peculatively persist transactions but make the commit order visible to programs in the program order

Use cache versioning and

Tx

dependency tracking

10

1

2

3

4Slide11

Outline

Introduction and BackgroundExisting ApproachesOur Approach: Loose-Ordering ConsistencyEager CommitSpeculative PersistenceEvaluationConclusion11Slide12

LOC Key Idea 1 – Eager Commit

Goal: Remove the intra-tx orderingEager Commit: A new commit protocol without commit recordsStep 1. Log WriteStep 2. Commit Record WriteStep 3. In-place WriteStep 4. Log TruncationIntra-

tx OrderingInter-tx OrderingProgram Ack

12Slide13

Eager Commit

Commit ProtocolCommit record: Check the completeness of log writesEager Commit Reorganize the memory log structure for delayed checkRemove the commit record and the intra-tx orderingUse count-based commit protocol: <TxID, TxCnt>13Slide14

Eager Commit

Count-based commit protocolDuring normal run,Tag each block with TxIDSet only one TxCnt to the total # of blocks in the tx, and others to ‘0’During recovery,Recorded TxCnt: Find the non-zero TxCnt for each tx TxIDCounted TxCnt: Count the tot. # of blocks in the txIf the two TxCnts match (Recorded = Counted), committed; otherwise, not-committed14No commit record. Intra-tx ordering eliminated.

Tx1, 0Tx1, 0Tx1, 0

Tx1, 4

Tx2, 0Slide15

LOC Key Idea 2 – Speculative Persistence

Goal: relax the inter-tx orderingSpeculative PersistenceOut-of-order persistence: To relax the inter-tx ordering to allow persistence reorderingIn-order commit: To make the tx commits visible to programs (program ack) in the program order

Step 1. Log WriteStep 2. Commit Record WriteStep 3. In-place WriteStep 4. Log TruncationIntra-

tx OrderingInter-

tx

Ordering

Program

Ack

15Slide16

A

BCDAFB

CED

E

F

G

Speculative Persistence

Strict Ordering

A

B

C

D

A

F

B

C

E

D

E

F

G

A

B

C

D

A

B

C

D

A

F

B

C

E

A

F

B

C

E

D

E

F

G

D

E

F

G

16

A

B

C

D

A

F

B

C

E

D

E

F

G

A

B

C

D

E

F

G

A

B

C

D

A

F

C

E

A

B

C

D

E

F

G

D

E

F

G

B

Loose Ordering

v

olatile CPU cache

p

ersistent memory

v

olatile CPU cache

p

ersistent memory

T1: (A, B, C, D) -> T2: (A, F)

-> T3:

(B

, C,

E) -> T4

:

(D

, E, F,

G)

Inter-

tx

ordering relaxed. Write coalescing enabled.Slide17

Speculative Persistence

Speculative Persistence enables write coalescing for overlapping writes between transactions.But there are two problems raised by write coalescing of overlapping writes: How to recover a committed Tx which has overlapping writes with a succeeding aborted Tx?Overlapping data blocks have been overwrittenMultiple Versions in the CPU CacheHow to determine the commit status using the count-based commit protocol of a Tx that has overlapping writes with succeeding Txs?Recorded TxCnt != Counted TxCntCommit Dependencies between TransactionsTx Dependency Pair: <Tp, Tq, n>17

See the paper for more details.Slide18

Recovery

Recovery is made by scanning the memory log.More details in the paper.18Slide19

Outline

Introduction and BackgroundExisting ApproachesOur Approach: Loose-Ordering ConsistencyEager CommitSpeculative PersistenceEvaluationConclusion19Slide20

Experimental Setup

GEM5 simulatorTiming Simple CPU: 1GHzRuby memory systemSimulator configurationL1: 32KB, 2-way, 64B block size, latency=1cycleL2: 256KB, 8-way, 64B block size, latency=8cyclesLLC: 1MB, 16-way, 64B block size, latency=21cyclesMemory: 8 banks, latency=168cyclesWorkloadsB+ Tree, Hash, RBTree, SPS, SDG, SQLite20Slide21

Overall Performance

21

LOC significantly improves performance of WAL:

Reduces average performance overhead of persistence ordering from 67% to 35%.

LOC and Kiln can be combined favorably.

LOC effectively mitigates performance degradation from persistence ordering.Slide22

Effect of Eager Commit

22Eager Commit outperforms H-WAL by 6.4% on average due to the elimination of intra-tx ordering.Slide23

Effect of Speculative Persistence

23The larger the speculation degrees, the larger the performance benefits.Speculative Persistence improves the normalized transaction throughput from 0.353 (SD=1) to 0.689 (SD=32) with a 95.5% improvement.Slide24

Outline

Introduction and BackgroundExisting ApproachesOur Approach: Loose-Ordering ConsistencyEager CommitSpeculative PersistenceEvaluationConclusion24Slide25

Problem:

Strict write ordering required for storage consistency dramatically degrades performance in persistent memoryOur Goal: To keep the performance overhead low while maintaining the storage consistencyKey Idea: To Loosen the persistence ordering with hardware supportEager commit: A commit protocol that eliminates the use of commit record, by reorganizing the memory log structureSpeculative persistence: Allows out-of-order

persistence to persistent memory, but ensures in-order commit in programs, leveraging the tracking of transaction dependencies and the support of multi-versioning in the CPU cacheResults: Reduces average performance overhead of persistence ordering from 67% to 35%Conclusion

25Slide26

Loose-Ordering Consistency for Persistent Memory

Youyou Lu1, Jiwu Shu1, Long Sun1, Onur Mutlu2

1Tsinghua University2Carnegie Mellon University