♢ ♢ 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
New memory technologies 1 DRAM Flash x x 0 1 10 100 1000 10000 100000 Access time [ns] logscale 2 Sunday, November 3, 13
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
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
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
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
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
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
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
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
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
Sources of data loss 5 Sunday, November 3, 13
Sources of data loss Wear-out 5 Sunday, November 3, 13
Sources of data loss Wear-out Erroneous writes 5 Sunday, November 3, 13
Sources of data loss Wear-out Erroneous writes CPU caches 5 Sunday, November 3, 13
Sources of data loss Wear-out Erroneous writes CPU caches ... 5 Sunday, November 3, 13
Sources of data loss Wear-out Memory allocator Erroneous writes CPU caches ... 5 Sunday, November 3, 13
Sources of data loss Wear-out Memory allocator Virtual memory protection Erroneous writes CPU caches ... 5 Sunday, November 3, 13
Sources of data loss Wear-out Memory allocator Virtual memory protection Erroneous writes CPU caches Cache line counters ... 5 Sunday, November 3, 13
Malloc for NVRAM - goals 6 Sunday, November 3, 13
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
NVMalloc DRAM NVRAM 8 Sunday, November 3, 13
NVMalloc DRAM NVRAM 8 Sunday, November 3, 13
NVMalloc free / in-use bitmap 000000 ... DRAM NVRAM 8 Sunday, November 3, 13
NVMalloc free / in-use bitmap 000000 ... 010001 ... DRAM NVRAM 8 Sunday, November 3, 13
NVMalloc free lists ... free / in-use bitmap size 1: 000000 ... 010001 ... ... size 2: ... size 3: DRAM NVRAM 8 Sunday, November 3, 13
NVMalloc free lists ... free / in-use bitmap size 1: 000000 ... 010001 ... ... size 2: ... size 3: DRAM NVRAM 8 Sunday, November 3, 13
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