soft updates made simple and fast on non volatile memory
play

Soft Updates Made Simple and Fast on Non-volatile Memory Mingkai - PowerPoint PPT Presentation

Soft Updates Made Simple and Fast on Non-volatile Memory Mingkai Dong , Haibo Chen Institute of Parallel and Distributed Systems, Shanghai Jiao Tong University @ NVMW 18 Non-volatile Memory (NVM) Non-volatile Byte-addressable High


  1. Soft Updates Made Simple and Fast on Non-volatile Memory Mingkai Dong , Haibo Chen Institute of Parallel and Distributed Systems, Shanghai Jiao Tong University @ NVMW ‘ 18

  2. Non-volatile Memory (NVM) ü Non-volatile ü Byte-addressable ü High throughput and low latency 2

  3. NVM File Systems (NVMFS) Existing NVMFS use journaling or copy-on-write for crash consistency Synchronous cache flushes are necessary Cache flushes are expensive! Other options for crash consistency? A A’ inode inode Journal C’ B C Area File System Metadata D E E’ 3

  4. NVM File Systems (NVMFS) Existing NVMFS use journaling or copy-on-write for crash consistency Synchronous cache flushes are necessary Cache flushes are expensive! Other options for crash consistency? A A’ inode inode Journal C’ B C Area File System Metadata D E E’ 4

  5. Soft Updates DRAM (Page cache) Latest metadata in DRAM Updated in DRAM with dependency tracked § ü DRAM performance ü No synchronous disk writes DISK Consistent metadata in disks Persisted to disks with dependency enforced § ü Always consistent ü Immediately usable after crash Traditional Soft Updates 5

  6. Soft Updates Update dependencies block bitmap E.g., allocating a new data block § 1. Allocate in bitmap 2. Fill data in the block inode 3. Update pointer to the block new data block 6

  7. Soft Updates Is Complicated Delayed disk writes block bitmap Auxiliary structures for each update § More complex dependencies § inode new data block Figures from Soft Updates: A Technique for Eliminating Most Synchronous Writes in the Fast Filesystem, ATC ’99 7

  8. Soft Updates Is Complicated Delayed disk writes Auxiliary structures for each operation § inode Block Directory Block More complex dependencies § inode #4 <A, #4> Cyclic dependencies inode #5 <--, #0> Inode #6 Rolling back/forward § <E, #7> Inode #7 inode block inode block inode block inode block (in page cache) Rollback Rollforward inode #4 inode #4 inode #4 inode #4 Flush block to disks inode #6 inode #6 inode #5 inode #5 inode #5 inode #5 inode #6 inode #6 inode #6 inode #6 inode #7 inode #7 inode #7 inode #7 8

  9. Soft Updates Is Complicated Delayed disk writes Auxiliary structures for each operation § More complex dependencies § Cyclic dependencies Rolling back/forward § The mismatch between per-pointer-based dependency tracking and block-based interface of traditional disks 9

  10. Soft Updates Meets NVM Soft Updates ü No synchronous cache flushes ü Immediately usable after crash NVM: byte-addressable and fast ü Direct write to NVM without delays ü No false sharing => no rolling back/forward ü Simple dependency tracking/enforcement 10

  11. SoupFS A simple and fast NVMFS derived from soft updates Hashtable-based directories § § No false sharing Pointer-based dual views § § No synchronous cache flushes Semantic-aware dependency tracking/enforcement § § Simple dependency tracking/enforcement Get the best of both Soft Updates and NVM 11

  12. Overview Background Design & Implementation § Hashtable-based directories § Pointer-based dual views § Semantic-aware dependency tracking/enforcement Evaluation Conclusion 12

  13. Overview Background Design & Implementation § Hashtable-based directories § Pointer-based dual views § Semantic-aware dependency tracking/enforcement Evaluation Conclusion 13

  14. Block-based Directories Block-based file systems usually use block-based directories False sharing § 1.TxT|32 2 ✘ Cyclic dependency .TxT|38 ✘ Rolling back/forward fs-long-lon Slow access § g.exe|512 indirect Directory ✘ Linear scan block inode l+f.dir|12 14

  15. Hashtable-based Directories Optimized for cache lines Directory Buckets inode ü No false sharing 0 1 2 3 4 … ü No cyclic dependency Efficient access Filename inode Latest Consistent ü No linear scan Pointer Pointer Next Next Hash Len Filename inode 15

  16. Overview Background Design & Implementation ü Hashtable-based directories § Pointer-based dual views § Semantic-aware dependency tracking/enforcement Evaluation Conclusion 16

  17. DualViews DRAM (Page cache) Latest view in page cache Consistent view in disks Dual views DISK Eliminate synchronous writes § Provide usability after crash § Traditional Soft Updates 17

  18. DualViews DRAM (Page cache) Latest view in page cache Consistent view in disks NVM Latest view? DISK NVM Another copy of metadata in DRAM ✗ Double writes Challenge: How to present latest view efficiently? ✗ Double storage overhead ✗ Unnecessary synchronizations Soft Updates on NVM 18

  19. Pointer-based Dual Views DRAM Reuse data structures in both views Distinguish views by different pointers/structures NVM Soft Updates on NVM 19

  20. Pointer-based Dual Views Reuse data structures in both views Distinguish views by different pointers/structures Data Structures In Consistent View In Latest View inode SoupFS inode VFS inode dentry consistent next pointer latest next pointer hash table bucket latest bucket if exists B-tree root/height in SoupFS inode root/height in VFS inode 20

  21. Pointer-based Dual Views Directory Volatile in DRAM Buckets inode Updates to NVM w/o persistence guarantee 0 1 2 3 4 … Persisted in NVM D C B A Directory VFS Filename inode Latest Consistent inode Next Next Latest View Dir File A File B File C File D Consistent View Dir File A File B File C File D 21

  22. Pointer-based Dual Views Directory Volatile in DRAM Buckets inode Updates to NVM w/o persistence guarantee 0 1 2 3 4 … Persisted in NVM D C B A Directory VFS Filename inode Latest Consistent inode Next Next Latest View Dir Ø create E File A File B File C File D File E Consistent View Dir File A File B File C File D 22

  23. Pointer-based Dual Views Directory Volatile in DRAM Buckets inode Updates to NVM w/o persistence guarantee 0 1 2 3 4 … Persisted in NVM D C B A Directory VFS Filename inode Latest Consistent inode Next Next Latest View Dir Latest Buckets Ø create E File A File B File C File D File E Consistent View Dir File A File B File C File D 23

  24. Pointer-based Dual Views Directory Volatile in DRAM Buckets inode Updates to NVM w/o persistence guarantee 0 1 2 3 4 … Persisted in NVM D C B A Directory VFS Filename inode Latest Consistent inode Next Next Latest View E Dir Latest Buckets Ø create E File A File B File C File D File E Consistent View Dir File A File B File C File D 24

  25. Pointer-based Dual Views Directory Volatile in DRAM Buckets inode Updates to NVM w/o persistence guarantee 0 1 2 3 4 … Persisted in NVM D C B A Directory VFS Filename inode Latest Consistent inode Next Next Latest View E Dir Latest Buckets Ø create E File A File B File C File D File E 3 Consistent View Dir File A File B File C File D 25

  26. Pointer-based Dual Views Directory Volatile in DRAM Buckets inode Updates to NVM w/o persistence guarantee 0 1 2 3 4 … Persisted in NVM D C B A Directory VFS Filename inode Latest Consistent inode Next Next Latest View E Dir Latest Buckets § create E File A File B File C File D File E 3 Consistent View Dir File A File B File C File D 26

  27. Pointer-based Dual Views Directory Volatile in DRAM Buckets inode Updates to NVM w/o persistence guarantee 0 1 2 3 4 … Persisted in NVM D C B A Directory VFS Filename inode Latest Consistent inode Next Next Latest View E Dir Latest Buckets § create E File A File B File C File D File E 3 Ø unlink B Consistent View Dir File A File B File C File D 27

  28. Pointer-based Dual Views Directory Volatile in DRAM Buckets inode Updates to NVM w/o persistence guarantee 0 1 2 3 4 … Persisted in NVM D C B A Directory VFS Filename inode Latest Consistent inode Next Next Latest View E Dir Latest Buckets § create E File A File B File C File D File E 3 Ø unlink B Consistent View Dir File A File B File C File D 28

  29. Pointer-based Dual Views Directory Volatile in DRAM Buckets inode Updates to NVM w/o persistence guarantee 0 1 2 3 4 … Persisted in NVM D C B A Directory VFS Filename inode Latest Consistent inode Next Next Latest View E Dir Latest Buckets § create E File A File B File C File D File E 3 § unlink B Consistent View Dir File A File B File C File D 29

  30. Pointer-based Dual Views Directory Directory Volatile in DRAM Buckets inode inode Updates to NVM w/o persistence guarantee 0 1 2 3 4 … 0 1 2 3 4 … Persisted in NVM D C B A Directory VFS Filename inode Latest Consistent inode Next Next Latest View E Dir Latest Buckets § create E File A File B File C File D File E 3 § unlink B Consistent View Dir File A File B File C File D 30

  31. Pointer-based Dual Views Directory Directory Volatile in DRAM Buckets inode inode Updates to NVM w/o persistence guarantee 0 1 2 3 0 1 2 3 4 … Persisted in NVM D C B A Directory Directory VFS VFS Filename inode Latest Consistent inode inode Next Next Latest View E Dir Latest Buckets § create E File A File B File C File D File E 3 3 § unlink B Consistent View Dir File A File B File C File D 31

Recommend


More recommend