
Virtualizing Persistent Memory: Trends and Solutions
Explore the case for virtualizing persistent memory and the tension between performance and persistence. Discover the need for virtualization, design approaches, and the challenges faced in emulating persistency. Dive into the world of Virtualized PM and learn about full virtualization strategies. Witness the evolution and adoption of Persistent Memory in modern computing environments.
Download Presentation

Please find below an Image/Link to download the presentation.
The content on the website is provided AS IS for your information and personal use only. It may not be sold, licensed, or shared on other websites without obtaining consent from the author. If you encounter any issues during the download, it is possible that the publisher has removed the file from their server.
You are allowed to download the files provided on this website for personal or commercial use, subject to the condition that they are used lawfully. All files are the property of their respective owners.
The content on the website is provided AS IS for your information and personal use only. It may not be sold, licensed, or shared on other websites without obtaining consent from the author.
E N D
Presentation Transcript
A Case for Virtualizing Persistent Memory Liang Liang, Rong Chen, Haibo Chen, Yubin Xia, KwanJong Park, Binyu Zang, Haibing Guan Institute of Parallel and Distributed Systems Samsung Electronics Co., Ltd. Shanghai Jiao Tong University, China
Performance and Persistence Tension between Performance and Persistence Volatile storage Performance vs. Persistence Non-volatile storage Performance vs. Persistence Persistent memory Performance vs. Persistence Features Low latency Non- Volatile 2
Proliferation of PM Hardware vendor Prediction PM will soon be adopted Software developer Data Centers Cloud Providers 3
Need of PM Virtualization Cost Effectiveness . Performance Load/Store slow fast 4
Outline Outline The Need of PM Virtualization Design of VPM. Implementation Evaluation Conclusion 5
VPM: Overview Virtualized PM PM Hardware VM apps PM DRAM SSD
VPM: Overview Emulate Persistent Memory(PM) with mix of PM, DRAM and hard disk(SSD) Challenge VPM Virtualized PM Hardware VM apps How to emulate persistency of PM with other storage medium? PM Guest VM DRAM SSD Hypervisor
Design: Two Approaches Full Virtualization Retain Transparency to guest VMs. Para-Virtualization Enable guest VMs to provide hints to hypervisor to improve performance. 8
Full Virtualization: VPM-HV Read request is issued over PM. Read request is handled. EPT Mapping for virtualized PM PM SSD RAM 9
Full Virtualization: VPM-HV Read request is issued over DRAM. Read request is handled. EPT Mapping for virtualized PM PM SSD RAM 10
Full Virtualization: VPM-HV Write request is issued over PM. Write request is handled. EPT Mapping for virtualized PM PM SSD RAM 11
Full Virtualization: VPM-HV Write request is issued over DRAM. Trap and remap DRAM with PM. Write request is handled. EPT Mapping for virtualized PM PM SSD RAM 12
Full Virtualization: VPM-HV Write over non-PM mapped memory will always trap to hypervisor. EPT Mapping for virtualized PM PM SSD RAM 13
VPM-HV: Architecture VM0 Write Protected (DRAM) PMEM Not mapped VPM Mapped to EPT Writable (NVRAM) On Disk VM1 VPM DS VM0 VPM DS VM0 PMEM- PT VM0 Disk NVRAM VM0 VP-meta Backing Block n DRAM backed Backing Block m NVRAM DRAM Reserved for metadata Shared across all VM NVM Pool 14
Design: Two Approaches Full Virtualization Retain Transparency to guest VMs. Para-Virtualization Enable guest VMs to provide hints to hypervisor to improve performance. 15
VPM-PV: Four Interfaces vpm_protect(page) Claim that a page is being modified by guest. vpm_unprotect(page) Claim that some pages should be persisted. vpm_persist(range) Wait until all persist requests have been done. vpm_pcommit(void) 16
Para-Virtualization: VPM-PV Write request is wanted. Lock page Write request is issued over DRAM. Write request is handled. Unlock page EPT RAM PM SSD 17
Para-Virtualization: VPM-PV Issue a persist request Return immediately vpm_persist Persist Q EPT RAM PM SSD 18
Para-Virtualization: VPM-PV Persist thread will consume these requests in the background Do nothing to a PM mapped page Persist Q EPT Persist Thread RAM PM SSD 19
Para-Virtualization: VPM-PV Persist thread will consume these requests in the background Do nothing to a PM mapped page Apply HOT DRAM mapped page to PM Persist Q EPT Persist Thread RAM PM SSD 20
Para-Virtualization: VPM-PV Persist thread will consume these requests in the background Do nothing to a PM mapped page Apply HOT DRAM mapped page to PM Persist COLD DRAM mapped page to SSD Persist Q EPT Persist Thread RAM PM SSD 21
Para-Virtualization: VPM-PV Persist thread will consume these requests in the background Do nothing to a PM mapped page Apply HOT DRAM mapped page to PM Persist COLD DRAM mapped page to SSD Persist Q EPT Persist Thread RAM PM SSD 22
Para-Virtualization: VPM-PV Issue pcommit Block until all requests are handled Pcommit is handled Persist Q VPM Persist Thread 23
VPM-PV: Architecture VM0 Shared M Hypercall Writable (DRAM) PMEM Not mapped VPM Writable (NVRAM) On Disk VM1 VPM DS VM0 VPM DS Shared M VM0 PMEM-PT NVRAM VM0 VP-meta Backing Block n DRAM Backing Block m NVRAM DRAM Reserved for metadata Shared across all VM NVM Pool 24
Outline Outline The Need of PM Virtualization Design of VPM. Implementation Evaluation Conclusion 25
VPM Implementation Guest OS Kernel module for managing and allocating PM Uses reserved consecutive physical memory region, backed by VPM VPM Hypervisor Tracking of PM VM exit event for VPM-HV Use vpm_persist interface for VPM-PV Managing of PM Remaps the guest PM page to a DRAM page if the updating frequency is not high enough. 26
Optimization Decomposition Batching of flushing to disk Swap Out Disk Flush Flush is not emergent if swapped page is not taken promptly Dirtied data reaches a certain threshold or on applications request Reducing writing cost with lazy reallocation Does not immediately clear if swapped page is not taken promptly Its content and mapping info still retain until it is reused by others 27
Outline Outline The Need of PM Virtualization Design of VPM. Implementation Evaluation Conclusion 28
Evaluation PM Types NV-DIMM PCM Virtualization Types VPM-HV VPM-PV Emu Nvdimm Emu PCM 1200 dd Throughput (MB/s) 1000 800 600 400 200 0 0 128 256 384 512 640 768 8961024 bs(kb) PMBD throughput slowdown 29
Fileserver over NVDIMM/PCM a. Achieve over 80% of the performance with only 20% of the PM b. PV Outperforms than base line in PCM. HV PV HV PV 500 300 Throughput (MB/s) Throughput (MB/s) 250 400 200 300 150 200 100 100 50 0 0 0 20 40 60 80 100 120 0 20 40 60 80 100 120 PM Size(%) PM Size(%) 30
Crash Recovery (Emulate) Inject Crash Drop EPT entries crash start 600 Throughput (MB/s) 500 crash 400 300 200 100 0 0 20 40 60 Time(s) 80 100 120 140 32
Conclusion A study on interfaces and hypervisor to virtualize PM A prototype: VPM Full-virtualization of PM Para-virtualization of PM Efficiently manage and multiplex PM, leading to small performance degradation Thanks http://ipads.se.sjtu.edu.cn/ 33