Document 10409997

advertisement
ThyNVM: Enabling So2ware-­‐Transparent Crash Consistency in Persistent Memory Systems Jinglei Ren (Tsinghua University) Jishen Zhao (UC, Santa Cruz) Samira Khan (University of Virginia) Jongmoo Choi (Dankook University) Yongwei Wu (Tsinghua University) Onur Mutlu (CMU)
NVM provides an opportunity to manipulate persistent data directly Problem: System crash can result in permanent data corrupHon in NVM Current SoluHon: Explicit interfaces to manage consistency NV-­‐Heaps [ASPLOS’11], BPFS [SOSP’09], Mnemosyne [ASPLOS’11] void TMhashtable_update(TMARCGDECL
2. Link to prev 1. Link to next Third party code can b
e i
nconsistent Prohibited OperaHon GOAL: So2ware transparent consistency in persistent memory s
ystems Execute legacy apps, No burden on programmers, Enable easier integra/on of NVM ThyNVM Idea: Periodic c
heckpoinHng o
f d
ata m
anaged b
y h
ardware Insight: A tradeoff between checkpoin/ng latency and metadata storage overhead 1. D
UAL G
RANULARITY CheckpoinHng granularity Latency and locaHon CHECKPOINTING •  Small granularity: l
arge m
etadata • 
Writeback f
rom D
RAM: l
ong l
atency •  Large granularity: small metadata •  Remap in NVM: short latency DRAM-­‐BASED W
RITEBACK Writeback data in NVM during checkpoinEng NVM DRAM CACHE BLOCK PAGE NVM DRAM High write locality pages in DRAM, PAGE BLOCK low write locality pages in NVM Long latency of wriHng back data to NVM GRANULARITY GRANULARITY 2. O
VERLAPPING NVM-­‐BASED REMAPPING CHECKOINTING AND EXECUTION No Copy during checkpoinEng, remap in a new locaEon during a write DRAM NVM W Short latency in NVM-­‐based Hides the long latency of Page Writeback remapping Ideal DRAM: DRAM-­‐based, no cost for consistency, Journaling: Hybrid, commit dirty cache blocks, Leverages DRAM to b
uffer d
irty b
locks Lowest latency system Ideal NVM: NVM-­‐based, no cost for consistency, NVM has higher Shadow Paging: Hybrid, copy-­‐on-­‐write pages, L everages DRAM latency than DRAM to buffer dirty pages OVERLAPPING ADAPTIVITY TO ACCESS CHECKPOINTING AND PERFORMANCE O
F EXECUTION PATTERN LEGACY CODE RANDOM SEQUENTIAL RANDOM SEQUENTIAL Within -­‐4.9%/+2.7% o
f a
n ThyNVM spends only of the Can spend 35-­‐45% o2f .4%/5.5% the execuHon Journaling is beber for Random and idealized DRAM/NVM system execuHon on checkpoinHng on Hcme heckpoinHng Shadow paging is beber for SequenHal Provides c
onsistency w
ithout ThyNVM adapts to both access paberns Stalls the applicaHon f
or a
n
egligible H
me significant performance overhead void hashtable_update(hashtable_t* ht,
void *key, void *data)
{
list_t* chain = get_chain(ht, key);
pair_t* pair;
pair_t updatePair;
updatePair.first = key;
pair = (pair_t*) list_find(chain,
&updatePair);
pair->second = data;
}
hashtable_t* ht, void *key, void*data)
{
list_t* chain = get_chain(ht, key);
pair_t* pair;
Need a new implementaHon pair_t updatePair;
updatePair.first = key;
pair = (pair_t*) TMLIST_FIND(chain,
}
Working locaHon X Y &updatePair);
pair->second = data;
Page Writeback in DRAM Block Remapping in NVM GOOD FOR STREAMING WRITES GOOD FOR RANDOM WRITES Checkpoint locaHon One Entry Per Page Small Metadata X’ Y’ One Entry Per Block Huge Metadata Running
Epoch 0
Epoch 1
Running
CheckpoinHng
Running
time
CheckpoinHng
CheckpoinHng
Epoch 0
Epoch 1
0 Journal Shadow ThyNVM 2 1 40 20 0 0 Journal Shadow ThyNVM Ideal DRAM 60 Normalized IPC 1 3 60 Percentage of ExecuHon Time 2 Percentage of ExecuHon Time 3 Normalized Write Traffic To NVM Normalized Write Traffic To NVM Epoch 2
40 20 0 Journal Shadow ThyNVM Journal Shadow ThyNVM Ideal NVM ThyNVM 1 0.8 0.6 0.4 0.2 0 gcc bwaves milc leslie. soplex Gems lbm omnet 
Download