Unified Address Translation for Memory Mapped SSDs with FlashMap Jian Huang Anirudh Badam † Moinuddin K. Qureshi Karsten Schwan †
Bridging the DRAM-Disk Gap DRAM Disk Low Performance High Performance Large Capacity Small Capacity Application Application Storage Memory Component Component 2
Bridging the DRAM-Disk Gap SSD DRAM Disk Low Performance High Performance Good Performance Large Capacity Small Capacity Good Capacity Application Application Memory Storage Component Component 2
Flash: Slow Memory or Fast Disk? Flash behaves more like memory than disk 3
Flash: Slow Memory or Fast Disk? Flash behaves more like memory than disk 3
Flash: Slow Memory or Fast Disk? Flash behaves more like memory than disk No Seek Latency 3
Flash: Slow Memory or Fast Disk? Flash behaves more like memory than disk Latency + Internal No Seek Parallelism 3
Flash: Slow Memory or Fast Disk? Flash behaves more like memory than disk Parallelism + Latency + Internal High No Seek IOPS 3
Flash: Slow Memory or Fast Disk? Flash behaves more like memory than disk Parallelism + Latency + Internal High No Seek IOPS Use Flash as Memory [Badam et al., NSDI’11] DRAM SSD Disk Low Performance Good Performance High Performance Large Capacity Small Capacity Good Capacity Application Storage Application Memory Component Component 3
Flash: Slow Memory or Fast Disk? Flash behaves more like memory than disk Parallelism + Latency + Internal High No Seek IOPS Use Flash as Memory [Badam et al., NSDI’11] DRAM SSD Disk Low Performance Good Performance High Performance Large Capacity Small Capacity Good Capacity Application Storage Application Memory Component Component 3
Memory Mapped SSDs Application SSD 4
Memory Mapped SSDs Application Virtual Memory Filesystem SSD File 4
Memory Mapped SSDs Application Virtual Memory Filesystem SSD mmap() File munmap() msync() 4
Memory Mapped SSDs Application Virtual Memory Filesystem SSD mmap() File munmap() msync() YAY! MORE MEM!!! Extended Memory 4
Memory Mapped SSDs Application Virtual Memory Filesystem SSD mmap() File munmap() msync() YAY! MORE MEM!!! + Minimal Code Extended Memory Modifications 4
Memory Mapped SSDs Application Virtual Memory Filesystem SSD mmap() File munmap() msync() YAY! MORE MEM!!! + + Data Minimal Code Extended Durability Memory Modifications 4
No Free Lunch: Software Overhead Application Virtual Memory System File System Flash Translation Layer Flash 5
No Free Lunch: Software Overhead Virtual Address Application Page Table & page fault Memory Manager Virtual Memory System Physical Address/File Offset File System Flash Translation Layer Flash 5
No Free Lunch: Software Overhead Virtual Address Application Page Table & page fault Memory Manager Virtual Memory System Physical Address/File Offset File Offset File Index File System Logical Block Address Flash Translation Layer Flash 5
No Free Lunch: Software Overhead Virtual Address Application Page Table & page fault Memory Manager Virtual Memory System Physical Address/File Offset File Offset File Index File System Logical Block Address Logical Block Address Flash Translation Layer FTL Flash Physical Block Address 5
Software Overhead Quantified Application 3 address translations Virtual Memory System + 2 boundary checks + 2 permission checks ------------------------------------------- File System = Latency: 15 – 20 microseconds + Increased Metadata Overhead Flash Translation Layer Flash 6
FlashMap: Unified Address Translation Application Virtual Memory System File System Flash Translation Layer Flash 1 Reduced Storage, only 1 mapping table Reduced Latency, only 1 address translation 2 + 1 permission check +1 boundary check 7
FlashMap: Unified Address Translation Application Unified Address Translation Flash 1 Reduced Storage, only 1 mapping table Reduced Latency, only 1 address translation 2 + 1 permission check +1 boundary check 7
Combining Page Table and File System Process A File File System Flash Translation Layer Flash 8
Combining Page Table and File System Process A VM Region File File System Flash Translation Layer Flash 8
Combining Page Table and File System Process A PGD PUD PMD Offset PTE Page Table … VM Region File File System Flash Translation Layer Flash 8
Combining Page Table and File System Process A PGD PUD PMD Offset PTE Page Table … VM Region Process-specific, private File File System Flash Translation Layer Flash 8
Combining Page Table and File System Process A Page Table Only for mapped file VM Region PGD PUD PMD Offset PTE … File File System Flash Translation Layer Flash 8
Preserving File System Permissions Process A Process B VM Region VM Region PGD PUD PMD PTE Offset … Shared Page Table Mapped File File System Flash Translation Layer Flash 9
Preserving File System Permissions Process A Process B VM Region VM Region READ_ONLY READ_WRITE PGD PUD PMD PTE Offset … Shared Page Table Mapped File File System Flash Translation Layer Flash 9
Preserving File System Permissions Process A Process B Permission VM Region VM Region Conflict !!! READ_ONLY READ_WRITE PGD PUD PMD PTE Offset … Shared Page Table Mapped File File System Flash Translation Layer Flash 9
Preserving File System Permissions Only share the leaf-level page table pages ! Process A Process B VM Region VM Region READ_ONLY READ_WRITE PGD PUD PMD PTE Offset … Shared Page Table Mapped File File System Flash Translation Layer Flash 9
Preserving File System Permissions Only share the leaf-level page table pages ! Process A Process B VM Region VM Region READ_ONLY READ_WRITE PGD PUD PMD PTE Offset … Shared Page Table Mapped File File System Flash Translation Layer Flash 9
Preserving File System Permissions Process A Process B PGD PUD PMD PTE Offset PGD PUD PMD PTE Offset … Shared Leaf-level Page Table Pages Mapped File File System Flash Translation Layer Flash 9
Preserving File System Permissions Process A Process B PGD PUD PMD PTE Offset PGD PUD PMD PTE Offset Private Private … Shared Shared Leaf-level Page Table Pages Mapped File File System Flash Translation Layer Flash 9
Page Table in FlashMap Process Page File Directory Private Leaf-Level Shared Leaf-Level Page Table Pages Page Table Pages Private Virtual Virtual Memory Regions Memory Regions Backed by File Process’s Private Virtual Memory + File Backed Memo Before Mapping a File 10
Page Table in FlashMap Process Only for mapped file Page File Directory Private Leaf-Level Shared Leaf-Level Page Table Pages Page Table Pages Private Virtual Virtual Memory Regions Memory Regions Backed by File Process’s Private Virtual Memory + File Backed Memory After Mapping a File 10
Preserving Memory Protection Process A Process B PGD PUD PMD PTE Offset PGD PUD PMD PTE Offset … Shared Leaf-level Page Table Pages Mapped File File System Flash Translation Layer Flash 11
Preserving Memory Protection Process A Process B PGD PUD PMD PTE Offset PGD PUD PMD PTE Offset What if I require custom memory … protection for a single page ??? Shared Leaf-level Page Table Pages Mapped File File System Flash Translation Layer Flash 11
Preserving Memory Protection Process A Process B PGD PUD PMD PTE Offset PGD PUD PMD PTE Offset … Private Leaf-level Page Table Shared Leaf-level Page Table Pages Mapped File File System Flash Translation Layer Flash 11
Combining FTL and Shared Page Table Process A Process B PGD PUD PMD PTE Offset PGD PUD PMD PTE Offset … Shared Leaf-level Page Table Pages Mapped File Mapping Table GC ECC Wear Leveling Flash Translation Layer Flash 12
Combining FTL and Shared Page Table Process A Process B PGD PUD PMD PTE Offset PGD PUD PMD PTE Offset … Overloaded PTE Shared Leaf-level Page Table Pages Mapped File GC ECC Wear Leveling Flash Translation Layer Flash 12
Combining FTL and Shared Page Table Process A Process B PGD PUD PMD PTE Offset PGD PUD PMD PTE Offset … Overloaded PTE Shared Leaf-level Page Table Pages Mapped File GC ECC Wear Leveling Flash Translation Layer Flash 12
Putting It All Together Process A Read PGD PUD PMD PTE Offset DRAM … Shared Leaf-level Page Table Pages FlashMap Mapped File Flash 13
Putting It All Together Process A Read PGD PUD PMD PTE Offset DRAM … Shared Leaf-level Page Table Pages FlashMap Mapped File Flash 13
Putting It All Together Process A Read PGD PUD PMD PTE Offset DRAM … page fault Shared Leaf-level Page Table Pages FlashMap Mapped File Flash 13
Putting It All Together Process A Read PGD PUD PMD PTE Offset DRAM update PTE … Shared Leaf-level Page Table Pages FlashMap Mapped File Flash 13
Recommend
More recommend