Architectural Support for Atomic Durability in Non-Volatile Memory
Arpit Joshi, Vijay Nagarajan, Stratis Viglas, Marcelo Cintra
NVMW 2018
Architectural Support for Atomic Durability in Non-Volatile Memory - - PowerPoint PPT Presentation
Architectural Support for Atomic Durability in Non-Volatile Memory Arpit Joshi , Vijay Nagarajan, Stratis Viglas, Marcelo Cintra NVMW 2018 Summary Non-Volatile Memory (NVM) - on the memory bus enables in-memory persistent data structures
Arpit Joshi, Vijay Nagarajan, Stratis Viglas, Marcelo Cintra
NVMW 2018
durability primitive to ensure crash consistency
way of undo logging
2
3
3
Initial State A B 100 100
3
Atomic_Begin A = A - 50 B = B + 50 Atomic_End Initial State A B 100 100
3
Atomic_Begin A = A - 50 B = B + 50 Atomic_End Initial State A B 100 100 Final State A B 100 100
3
Atomic_Begin A = A - 50 B = B + 50 Atomic_End Initial State A B 100 100 Final State A B 50 150 Final State A B 100 100
A B 50 100
3
Atomic_Begin A = A - 50 B = B + 50 Atomic_End Initial State A B 100 100 Final State A B 50 150 Final State Final State Final State A B 100 100 A B 100 150
A B 50 100
3
Atomic_Begin A = A - 50 B = B + 50 Atomic_End Initial State A B 100 100 Final State A B 50 150 Final State Final State Final State A B 100 100 A B 100 150
Shadow Paging
4
Write-Ahead-Logging
➡ beneficial for coarse grained updates
Shadow Paging
4
Write-Ahead-Logging REDO UNDO
➡ beneficial for coarse grained updates
➡reads redirection ➡victim cache ➡fine grained log->data ordering
NVM 100
persistent memory (Log [A , 100])
5
A
Data Log
NVM 100
persistent memory (Log [A , 100])
5
A A 100
Data Log
NVM 100 50
persistent memory (Log [A , 100])
5
A A 100
Data Log
NVM 100 50
persistent memory (Log [A , 100])
5
A A 100
Data Log
Log writes reach NVM before data writes. (Log —> Data ordering)
NVM 100 50
persistent memory (Log [A , 100])
5
A A 100
Data Log
Logging is essentially a data movement task.
Core Cache NVM Secondary Storage Core Cache DRAM Secondary Storage
6
Disk Based Persistence NVM Based Persistence
Core Cache NVM Secondary Storage Core Cache DRAM Secondary Storage
Software Controlled
6
Disk Based Persistence NVM Based Persistence
Core Cache NVM Secondary Storage
Hardware Controlled
Core Cache DRAM Secondary Storage
Software Controlled
6
Disk Based Persistence NVM Based Persistence
7
Compute Log Modify Flush Log Flush Data
7
Compute Log Modify Flush Log Flush Data
Volatile Phase Persistence Phase
7
Compute Log Modify Flush Log Flush Data
Volatile Phase Persistence Phase Clear separation of volatile and persistence phases.
8
Compute Log Flush Log Modify Flush Data
8
Compute Log Flush Log Modify Flush Data
Volatile and persistence phases overlap.
9
Compute Log Flush Log Modify Flush Data
In Hardware
9
Compute Log Flush Log Modify Flush Data
Goal: Move logging out of critical path.
In Hardware
ATOMIC_BEGIN while ( ! Done ) { Modify Data } Flush Data ATOMIC_END
10
while ( ! Done ) { Write Undo Log Flush Log Modify Data } Flush Data
Software Logging ATOM
Cache 100
value to log
11
Core NVM A 100
Data Log
A
Cache 100
value to log
11
Core NVM
A = 50
A 100
Data Log
A
Cache 100
value to log
11
Core NVM
A = 50 L(A) = 100
A 100 A 100
Data Log
A
Cache 100 50
value to log
11
Core NVM
A = 50 L(A) = 100
A 100 A 100
Data Log
Log Done
A
Where is log —> data ordering enforced?
12
Core Cache NVM Memory Controller
Store Queue Store Buffer
Where is log —> data ordering enforced?
12
Core Cache NVM Memory Controller
Store Queue
Baseline Design
Store Buffer
Where is log —> data ordering enforced?
12
Core Cache NVM Memory Controller
Store Queue
Baseline Design
Store Buffer
ATOM Design
13
SQ Cache Mem Ctrl Memory
13
SQ Cache Mem Ctrl Memory
ST(A)
13
SQ Cache Mem Ctrl Memory
ST(A) L(A)
13
SQ Cache Mem Ctrl Memory
ST(A) L(A) L(A)
13
SQ Cache Mem Ctrl Memory
ST(A) L(A) L(A) WRITE L(A)
13
SQ Cache Mem Ctrl Memory
ST(A) L(A) L(A) WRITE L(A) L(A)
13
SQ Cache Mem Ctrl Memory
ST(A) L(A) L(A) WRITE L(A) L(A) L(A)
13
SQ Cache Mem Ctrl Memory
ST(A) L(A) L(A) WRITE L(A) L(A) L(A) ST(A)
13
SQ Cache Mem Ctrl Memory
ST(A) L(A) L(A) WRITE L(A) L(A) L(A) ST(A)
Store Completion Time
13
SQ Cache Mem Ctrl Memory
ST(A) L(A) L(A) WRITE L(A) L(A) L(A) ST(A)
Store Completion Time Log persist operation in the critical path of retiring stores.
14
SQ Cache Mem Ctrl Memory
14
SQ Cache Mem Ctrl Memory
ST(A)
14
SQ Cache Mem Ctrl Memory
ST(A) L(A)
14
SQ Cache Mem Ctrl Memory
ST(A) L(A) L(A)
14
SQ Cache Mem Ctrl Memory
ST(A) L(A) L(A) WRITE L(A)
14
SQ Cache Mem Ctrl Memory
ST(A) L(A) L(A) WRITE L(A) L(A)
14
SQ Cache Mem Ctrl Memory
ST(A) L(A) L(A) WRITE L(A) L(A) L(A)
14
SQ Cache Mem Ctrl Memory
ST(A) L(A) L(A) WRITE L(A) L(A) L(A) ST(A)
14
SQ Cache Mem Ctrl Memory
ST(A) L(A) L(A) WRITE L(A) L(A) L(A) ST(A)
Store Completion Time
14
SQ Cache Mem Ctrl Memory
ST(A) L(A) L(A) WRITE L(A) L(A) L(A) ST(A)
Store Completion Time Remove log persist operations from the critical path by enforcing ordering at memory controller.
15
SQ Cache Mem Ctrl Memory
15
SQ Cache Mem Ctrl Memory
RD (A)
15
SQ Cache Mem Ctrl Memory
RD (A) RD(A)
15
SQ Cache Mem Ctrl Memory
RD (A) RD(A) RD(A)
15
SQ Cache Mem Ctrl Memory
L(A) RD (A) RD(A) RD(A)
15
SQ Cache Mem Ctrl Memory
L(A) L(A) RD (A) RD(A) RD(A)
15
SQ Cache Mem Ctrl Memory
L(A) L(A) WRITE L(A) RD (A) RD(A) RD(A)
15
SQ Cache Mem Ctrl Memory
L(A) L(A) WRITE L(A) L(A) RD (A) RD(A) RD(A)
15
SQ Cache Mem Ctrl Memory
L(A) L(A) WRITE L(A) L(A) L(A) RD (A) RD(A) RD(A)
15
SQ Cache Mem Ctrl Memory
L(A) L(A) WRITE L(A) L(A) L(A) ST(A) RD (A) RD(A) RD(A)
15
SQ Cache Mem Ctrl Memory
L(A) L(A) WRITE L(A) L(A) L(A) ST(A)
Store Completion Time
RD (A) RD(A) RD(A)
15
SQ Cache Mem Ctrl Memory
L(A) L(A) WRITE L(A) L(A) L(A) ST(A)
Store Completion Time
RD (A) RD(A) RD(A)
Same data goes from Mem Ctrl to Cache and back.
16
SQ Cache Mem Ctrl Memory
16
SQ Cache Mem Ctrl Memory
RDx(A)
16
SQ Cache Mem Ctrl Memory
RDx(A) RDx(A)
16
SQ Cache Mem Ctrl Memory
WRITE L(A) RDx(A) RDx(A)
16
SQ Cache Mem Ctrl Memory
WRITE L(A) RDx(A) RDx(A) RDx(A)
16
SQ Cache Mem Ctrl Memory
WRITE L(A) ST(A) RDx(A) RDx(A) RDx(A)
16
SQ Cache Mem Ctrl Memory
WRITE L(A) ST(A)
Store Completion Time
RDx(A) RDx(A) RDx(A)
16
SQ Cache Mem Ctrl Memory
WRITE L(A) ST(A)
Store Completion Time
RDx(A) RDx(A) RDx(A)
Remove redundant data movement by creating log entry in the memory controller.
system simulation mode
and 4 memory controllers
BASE Baseline hardware undo log implementation ATOM Posted log writes to memory controller ATOM-OPT Posted log writes with source logging NON-ATOMIC No logging (Upper bound on performance)
Atomic Durability Designs
17
18
1 1.2 1.4 1.6 1.8 btree hash queue rbtree sdg sps gmean
ATOM ATOM-OPT NON-ATOMIC
18
Higher is Better
1 1.2 1.4 1.6 1.8 btree hash queue rbtree sdg sps gmean
ATOM ATOM-OPT NON-ATOMIC
18
23% Higher is Better
1 1.2 1.4 1.6 1.8 btree hash queue rbtree sdg sps gmean
ATOM ATOM-OPT NON-ATOMIC
18
27% Higher is Better
1 1.2 1.4 1.6 1.8 btree hash queue rbtree sdg sps gmean
ATOM ATOM-OPT NON-ATOMIC
18
11% Higher is Better ATOM-OPT performance is within 11% of optimal design.
19
Haria’17]
as the only primitive is difficult
consistency
20
Atomic_Begin Log (A) Write (A) Log (B) Write (B) Atomic_End
20
Atomic_Begin Log (A) Write (A) Log (B) Write (B) Atomic_End
Explicit Constraint
20
Atomic_Begin Log (A) Write (A) Log (B) Write (B) Atomic_End
Explicit Constraint Implicit Constraint with Ordering
20
Atomic_Begin Log (A) Write (A) Log (B) Write (B) Atomic_End
Explicit Constraint
Not present with Atomic Durability
memory persistent data structures
ensure crash consistency
writes to NVM in the critical path of store operations
enforcing ordering at the memory controller
21
Arpit Joshi, Vijay Nagarajan, Stratis Viglas, Marcelo Cintra
NVMW 2018