consistent durable and safe memory management for byte
play

Consistent, Durable, and Safe Memory Management for Byte-Addressable - PowerPoint PPT Presentation

Consistent, Durable, and Safe Memory Management for Byte-Addressable Non-Volatile Main Memory Iulian Moraru*, David Andersen*, Michael Kaminsky, Niraj Tolia , Nathan Binkert, Partha Ranganathan *Carnegie Mellon


  1. ♢ ♢ Consistent, Durable, and Safe Memory Management for Byte-Addressable Non-Volatile Main Memory Iulian Moraru*, David Andersen*, Michael Kaminsky°, ♦ ‡ Niraj Tolia , Nathan Binkert, Partha Ranganathan ♦ ‡ *Carnegie Mellon University, °Intel Labs, Maginatics, Amiato, Google Sunday, November 3, 13

  2. New memory technologies 1 DRAM Flash x x 0 1 10 100 1000 10000 100000 Access time [ns] logscale 2 Sunday, November 3, 13

  3. New memory technologies NVRAM: phase change, spin torque, memristor • Memory that is both fast and non-volatile • Will help build fast, robust systems 1 DRAM Flash x x 0 1 10 100 1000 10000 100000 Access time [ns] logscale 2 Sunday, November 3, 13

  4. New memory technologies NVRAM: phase change, spin torque, memristor • Memory that is both fast and non-volatile • Will help build fast, robust systems NVRAM much faster than HDD and Flash 1 DRAM Flash x x 0 1 10 100 1000 10000 100000 Access time [ns] logscale 2 Sunday, November 3, 13

  5. New memory technologies NVRAM: phase change, spin torque, memristor • Memory that is both fast and non-volatile • Will help build fast, robust systems NVRAM much faster than HDD and Flash 1 DRAM Flash x x 0 1 10 100 1000 10000 100000 Access time [ns] logscale 2 Sunday, November 3, 13

  6. New memory technologies NVRAM: phase change, spin torque, memristor • Memory that is both fast and non-volatile • Will help build fast, robust systems NVRAM much faster than HDD and Flash 1 DRAM Flash x x x 0 1 10 100 1000 10000 100000 Access time PCM [ns] logscale 2 Sunday, November 3, 13

  7. New memory technologies NVRAM: phase change, spin torque, memristor • Memory that is both fast and non-volatile • Will help build fast, robust systems NVRAM much faster than HDD and Flash 1 DRAM Flash x x x 0 1 10 100 1000 10000 100000 Access time PCM [ns] logscale • Placed on the memory bus (alongside DRAM) 2 Sunday, November 3, 13

  8. New memory technologies NVRAM: phase change, spin torque, memristor • Memory that is both fast and non-volatile • Will help build fast, robust systems NVRAM much faster than HDD and Flash 1 DRAM Flash x x x 0 1 10 100 1000 10000 100000 Access time PCM [ns] logscale • Placed on the memory bus (alongside DRAM) • Needs new ways of handling persistent state 2 Sunday, November 3, 13

  9. NV main memory - assumptions Applications OS DRAM + NVRAM • Mapped into process address space • Accessed through CPU loads/stores • Persistent namespace 3 Sunday, November 3, 13

  10. NV main memory - assumptions Applications Persistence OS Library DRAM + NVRAM • Mapped into process address space • Accessed through CPU loads/stores • Persistent namespace 3 Sunday, November 3, 13

  11. NVRAM - challenge High performance and Robustness (no data loss) ➡ Give developers the right tools to develop data structures for NVRAM 4 Sunday, November 3, 13

  12. Sources of data loss 5 Sunday, November 3, 13

  13. Sources of data loss Wear-out 5 Sunday, November 3, 13

  14. Sources of data loss Wear-out Erroneous writes 5 Sunday, November 3, 13

  15. Sources of data loss Wear-out Erroneous writes CPU caches 5 Sunday, November 3, 13

  16. Sources of data loss Wear-out Erroneous writes CPU caches ... 5 Sunday, November 3, 13

  17. Sources of data loss Wear-out Memory allocator Erroneous writes CPU caches ... 5 Sunday, November 3, 13

  18. Sources of data loss Wear-out Memory allocator Virtual memory protection Erroneous writes CPU caches ... 5 Sunday, November 3, 13

  19. Sources of data loss Wear-out Memory allocator Virtual memory protection Erroneous writes CPU caches Cache line counters ... 5 Sunday, November 3, 13

  20. Malloc for NVRAM - goals 6 Sunday, November 3, 13

  21. Malloc for NVRAM - goals • Avoid frequently re-allocating the same block • HW wear leveling may slow down applications that write often to one location 6 Sunday, November 3, 13

  22. Malloc for NVRAM - goals • Avoid frequently re-allocating the same block • HW wear leveling may slow down applications that write often to one location • Minimize # of metadata updates in NVRAM • Wear-out & speed 6 Sunday, November 3, 13

  23. Malloc for NVRAM - goals • Avoid frequently re-allocating the same block • HW wear leveling may slow down applications that write often to one location • Minimize # of metadata updates in NVRAM • Wear-out & speed • Make metadata robust to accidental corruption • Avoids extensive loss of (persistent) data 6 Sunday, November 3, 13

  24. Problems with allocators for DRAM • Reuse recently freed blocks • More writes than necessary • Metadata is embedded in allocated / free blocks • Frequent writes to one location 1 1 1 7 Sunday, November 3, 13

  25. Problems with allocators for DRAM • Reuse recently freed blocks • More writes than necessary • Metadata is embedded in allocated / free blocks • Frequent writes to one location 3 1 1 1 7 Sunday, November 3, 13

  26. Problems with allocators for DRAM • Reuse recently freed blocks • More writes than necessary • Metadata is embedded in allocated / free blocks • Frequent writes to one location size 3 1 1 1 7 Sunday, November 3, 13

  27. Problems with allocators for DRAM • Reuse recently freed blocks • More writes than necessary • Metadata is embedded in allocated / free blocks • Frequent writes to one location size 3 1 2 1 1 1 7 Sunday, November 3, 13

  28. Problems with allocators for DRAM • Reuse recently freed blocks • More writes than necessary • Metadata is embedded in allocated / free blocks • Frequent writes to one location size 3 1 2 1 1 1 1 1 7 Sunday, November 3, 13

  29. Problems with allocators for DRAM • Reuse recently freed blocks • More writes than necessary • Metadata is embedded in allocated / free blocks • Frequent writes to one location size 3 1 2 1 1 1 1 1 1 7 Sunday, November 3, 13

  30. Problems with allocators for DRAM • Reuse recently freed blocks • More writes than necessary • Metadata is embedded in allocated / free blocks • Frequent writes to one location size 3 1 2 1 1 1 1 1 1 7 Sunday, November 3, 13

  31. Problems with allocators for DRAM • Reuse recently freed blocks • More writes than necessary • Metadata is embedded in allocated / free blocks • Frequent writes to one location size 1 3 1 1 2 1 1 1 7 Sunday, November 3, 13

  32. Problems with allocators for DRAM • Reuse recently freed blocks • More writes than necessary • Metadata is embedded in allocated / free blocks • Frequent writes to one location size 1 1 3 2 2 3 1 1 1 7 Sunday, November 3, 13

  33. Problems with allocators for DRAM • Reuse recently freed blocks • More writes than necessary • Metadata is embedded in allocated / free blocks • Frequent writes to one location size 1 1 1 3 2 2 2 3 3 1 1 1 7 Sunday, November 3, 13

  34. Problems with allocators for DRAM • Reuse recently freed blocks • More writes than necessary • Metadata is embedded in allocated / free blocks • Frequent writes to one location size 1 1 1 3 2 2 2 3 3 • Metadata corruption can cause data loss 1 1 1 7 Sunday, November 3, 13

  35. Problems with allocators for DRAM • Reuse recently freed blocks • More writes than necessary • Metadata is embedded in allocated / free blocks • Frequent writes to one location size 1 1 1 3 2 2 2 3 3 • Metadata corruption can cause data loss 1 1 1 7 Sunday, November 3, 13

  36. Problems with allocators for DRAM • Reuse recently freed blocks • More writes than necessary • Metadata is embedded in allocated / free blocks • Frequent writes to one location size 1 1 1 3 2 2 2 3 3 • Metadata corruption can cause data loss 1 3 1 1 7 Sunday, November 3, 13

  37. Problems with allocators for DRAM • Reuse recently freed blocks • More writes than necessary • Metadata is embedded in allocated / free blocks • Frequent writes to one location size 1 1 1 3 2 2 2 3 3 • Metadata corruption can cause data loss 1 3 7 Sunday, November 3, 13

  38. Problems with allocators for DRAM • Reuse recently freed blocks • More writes than necessary • Metadata is embedded in allocated / free blocks • Frequent writes to one location size 1 1 1 3 2 2 2 3 3 • Metadata corruption can cause data loss X X 1 3 7 Sunday, November 3, 13

  39. NVMalloc DRAM NVRAM 8 Sunday, November 3, 13

  40. NVMalloc DRAM NVRAM 8 Sunday, November 3, 13

  41. NVMalloc free / in-use bitmap 000000 ... DRAM NVRAM 8 Sunday, November 3, 13

  42. NVMalloc free / in-use bitmap 000000 ... 010001 ... DRAM NVRAM 8 Sunday, November 3, 13

  43. NVMalloc free lists ... free / in-use bitmap size 1: 000000 ... 010001 ... ... size 2: ... size 3: DRAM NVRAM 8 Sunday, November 3, 13

  44. NVMalloc free lists ... free / in-use bitmap size 1: 000000 ... 010001 ... ... size 2: ... size 3: DRAM NVRAM 8 Sunday, November 3, 13

  45. NVMalloc free lists ... free / in-use bitmap size 1: 000000 ... 010001 ... ... size 2: ... size 3: DRAM NVRAM 8 Sunday, November 3, 13

Recommend


More recommend