APIs for Persistent Memory Programming

Similar documents
Impact on Application Development: SNIA NVM Programming Model in the Real World. Andy Rudoff pmem SW Architect, Intel

Persistent Memory: The Value to HPC and the Challenges

The SNIA NVM Programming Model: Latest Developments and Challenges. Andy Rudoff, Intel Corporation

THE IN-PLACE WORKING STORAGE TIER OPPORTUNITIES FOR SOFTWARE INNOVATORS KEN GIBSON, INTEL, DIRECTOR MEMORY SW ARCHITECTURE

Windows Support for PM. Tom Talpey, Microsoft

Windows Support for PM. Tom Talpey, Microsoft

IN-PERSISTENT-MEMORY COMPUTING WITH JAVA ERIC KACZMAREK INTEL CORPORATION

The SNIA NVM Programming Model. #OFADevWorkshop

Update on Windows Persistent Memory Support Neal Christiansen Microsoft

Persistent Memory over Fabric (PMoF) Adding RDMA to Persistent Memory Pawel Szymanski Intel Corporation

RDMA Requirements for High Availability in the NVM Programming Model

Persistent Memory, NVM Programming Model, and NVDIMMs. Presented at Storage Field Day June 15, 2017

PM Support in Linux and Windows. Dr. Stephen Bates, CTO, Eideticom Neal Christiansen, Principal Development Lead, Microsoft

Accessing NVM Locally and over RDMA Challenges and Opportunities

Flash Memory Summit Persistent Memory - NVDIMMs

PERSISTENT MEMORY PROGRAMMING

SNIA NVM Programming Model Workgroup Update. #OFADevWorkshop

What You can Do with NVDIMMs. Rob Peglar President, Advanced Computation and Storage LLC

Using persistent memory and RDMA for Ceph client write-back caching Scott Peterson, Senior Software Engineer Intel

Application Access to Persistent Memory The State of the Nation(s)!

Using persistent memory to

Using NVDIMM under KVM. Applications of persistent memory in virtualization

Building on The NVM Programming Model A Windows Implementation

I want to build on Rick Coulson s talk earlier this morning that addressed emerging Persistent Memory technologies. I want to expand on implications

Persistent Memory and Media Errors

Persistent Memory over Fabrics

Capabilities and System Benefits Enabled by NVDIMM-N

REMOTE PERSISTENT MEMORY ACCESS WORKLOAD SCENARIOS AND RDMA SEMANTICS

Remote Persistent Memory SNIA Nonvolatile Memory Programming TWG

The Slow NVM (R)evolution in the context of Next Generation Postprocessing

Planning For Persistent Memory In The Data Center. Sarah Jelinek/Intel Corporation

NVDIMM Overview. Technology, Linux, and Xen

Paving the Way to the Non-Volatile Memory Frontier. PRESENTATION TITLE GOES HERE Doug Voigt HP

Extending RDMA for Persistent Memory over Fabrics. Live Webcast October 25, 2018

Load-Sto-Meter: Generating Workloads for Persistent Memory Damini Chopra, Doug Voigt Hewlett Packard (Enterprise)

Microsoft SMB Looking Forward. Tom Talpey Microsoft

Windows Persistent Memory Support

The Impact of the NVM Programming Model Andy Rudoff Intel Corporation

Managing Persistent Memory Tiffany Kasanicky Intel

VMware vsphere Virtualization of PMEM (PM) Richard A. Brunner, VMware

Jim Pappas Director of Technology Initiatives, Intel Vice-Chair, Storage Networking Industry Association (SNIA) December 07, 2018

PMEM Software and Applications

Applications Take Advantage of Persistent Memory

Persistent Memory Over Fabrics. Paul Grun, Cray Inc Stephen Bates, Eideticom Rob Davis, Mellanox Technologies

New types of Memory, their support in Linux and how to use them with RDMA

Upcoming advances in Non-Volatile Memory (NVM) technologies

How Next Generation NV Technology Affects Storage Stacks and Architectures

Non-Volatile Memory Through Customized Key-Value Stores

Design Considerations When Implementing NVM

SMB3 Extensions for Low Latency. Tom Talpey Microsoft May 12, 2016

NVDIMM-N Cookbook: A Soup-to-Nuts Primer on Using NVDIMM-Ns to Improve Your Storage Performance

January 28-29, 2014 San Jose

Flavors of Memory supported by Linux, their use and benefit. Christoph Lameter, Ph.D,

NVMe SSDs with Persistent Memory Regions

How Might Recently Formed System Interconnect Consortia Affect PM? Doug Voigt, SNIA TC

Persistent Memory in Linux. Tom Coughlan (with Thanks to Jeff Moyer), Red Hat

NVMFS: A New File System Designed Specifically to Take Advantage of Nonvolatile Memory

Remote Persistent Memory With Nothing But Net Tom Talpey Microsoft

File Systems: Consistency Issues

Storage and Memory Hierarchy in HPC: New Paradigm and New Solutions with Intel Dr. Jean-Laurent Philippe

Distributed Shared Persistent Memory

Disclaimer This presentation may contain product features that are currently under development. This overview of new technology represents no commitme

Architectural Principles for Networked Solid State Storage Access

Creating Storage Class Persistent Memory With NVDIMM

A New Key-Value Data Store For Heterogeneous Storage Architecture

REMOTE PERSISTENT MEMORY THINK TANK

Fujitsu SC 18. Human Centric Innovation Co-creation for Success 2018 FUJITSU

Kaladhar Voruganti Senior Technical Director NetApp, CTO Office. 2014, NetApp, All Rights Reserved

Strata: A Cross Media File System. Youngjin Kwon, Henrique Fingler, Tyler Hunt, Simon Peter, Emmett Witchel, Thomas Anderson

Disclaimer This presentation may contain product features that are currently under development. This overview of new technology represents no commitme

NEXTGenIO Performance Tools for In-Memory I/O

Processes COMPSCI 386

Accelerating Microsoft SQL Server Performance With NVDIMM-N on Dell EMC PowerEdge R740

Live block device operations in QEMU

Enabling Persistent Memory Use in Java. Steve Dohrmann Sr. Staff Software Engineer, Intel

Hewlett Packard Enterprise HPE GEN10 PERSISTENT MEMORY PERFORMANCE THROUGH PERSISTENCE

Demystifying Network Cards

JANUARY 20, 2016, SAN JOSE, CA PRESENTATION TITLE GOES HERE. NVDIMM Panel

PCIe Storage Beyond SSDs

I/O Profiling Towards the Exascale

Exploiting the benefits of native programming access to NVM devices

Overcoming System Memory Challenges with Persistent Memory and NVDIMM-P

Introduction to Operating Systems (Part III)

Panel: Persistent Memory Adoption in Operating Systems (-ish) Moderator: Jeff Chang AgigA Tech, NVDIMM SIG Co-Chair

Memory management. Single process. Multiple processes. How to: All memory assigned to the process Addresses defined at compile time

CS24: INTRODUCTION TO COMPUTING SYSTEMS. Spring 2018 Lecture 23

NVDIMM Block Window Driver Writer s Guide

SNIA s SSSI Solid State Storage Initiative. Jim Pappas Vice-Char, SNIA

Linux Memory Management

Contiguous memory allocation in Linux user-space

CS24: INTRODUCTION TO COMPUTING SYSTEMS. Spring 2015 Lecture 23

NOVA-Fortis: A Fault-Tolerant Non- Volatile Main Memory File System

Analyzing I/O Performance on a NEXTGenIO Class System

IBM PSSC Montpellier Customer Center. Blue Gene/P ASIC IBM Corporation

virtio-mem: Paravirtualized Memory

CHAPTER 16 - VIRTUAL MACHINES

ECE 650 Systems Programming & Engineering. Spring 2018

A Breakthrough in Non-Volatile Memory Technology FUJITSU LIMITED

Operating System Services

M 3 Microkernel-based System for Heterogeneous Manycores

Transcription:

APIs for Persistent Memory Programming MSST 2018 Andy Rudoff NVM Software Architect Intel Corporation Data Center Group

A Full-Stack Example Using a key-value store as an example App Unmodified App, uses KV APIs KV Store PCJ Use Java containers to create pmem-aware KV Store Caller just sees the same APIs, uses them as before Provide Java Containers libpmemobj Provide transactions, persistent memory allocator libpmem Abstract away hardware details pmem-aware File System Expose Persistent Memory as Memory-mapped files (DAX) Persistent Memory Data Center Group 2

Another Full-Stack Example The app does everything App pmem-aware application Handles its own allocations, transactions, etc pmem-aware File System Expose Persistent Memory as Memory-mapped files (DAX) Persistent Memory Data Center Group 3

Transparency Levels for pmem application Application middleware libraries User file systems File System in-kernel usages block storage Driver Kernel Increasing barrier to adoption Persistent Memory Data Center Group 4

Transparency Levels for pmem application Application middleware libraries User file systems File System in-kernel usages block storage Driver Kernel Increasing leverage Persistent Memory Data Center Group 5

Ancient History June 2012 Formed the NVM Programming TWG Immediate participation from key OSVs, ISVs, IHVs January 2013 Held the first PM Summit (actually called NVM Summit ) January 2014 TWG published rev 1.0 of the NVM Programming Model June 2017 Rev 1.2 published And now Programming model supported & shipping in multiple operating systems APIs built on top of the programming model available 6 Data Center Group 6

The SNIA NVM Programming Model Mgmt. Storage File Memory Management UI Application Application Application Management Library Standard Raw Device Access Standard File API Standard File API Load/Store User File System PM-Aware File System MMU Mappings NVDIMM Driver Kernel NVDIMMs 7 Data Center Group 7

Must Open File Before Mapping Standard Naming and Permission Model Standard File API Application Load/Store User PM-Aware File System MMU Mappings Kernel NVDIMMs 8 Data Center Group 8

Direct Access Definition: no paging, no page cache use Application Standard File API Load/Store User DAX PM-Aware File System MMU Mappings Kernel NVDIMMs 9 Data Center Group 9

Direct Access Standard File API Application Load/Store PM-Aware File System MMU Mappings User DAX Windows: DAX Support is shipping NTFS is PM-Aware Some new APIs PMDK support Kernel NVDIMMs 10 Data Center Group 10

Direct Access Standard File API Application Load/Store PM-Aware File System MMU Mappings User Kernel DAX Linux: DAX Support is shipping ext4 is PM-Aware XFS is PM-Aware PMDK support More filesystems coming NVDIMMs 11 Data Center Group 11

Direct Access Standard File API Application Load/Store PM-Aware File System MMU Mappings User DAX Virtualization of PM: VMware Hyper-V KVM Xen Kernel NVDIMMs 12 Data Center Group 12

Applications: Public Demos 2017 was an interesting year for demos SAP SAPPHIRE Oracle OpenWorld Built on the Persistent Memory programming model! 13 Data Center Group 13

Intel Persistent Memory New Type of Memory Persistent, Large Capacity & Byte Addressable 6 TB per two-socket system DDR4 Socket Compatible Can Co-exist with Conventional DDR4 DRAM DIMMs Cheaper than DRAM Availability 2018 Data Center Group 14

trivial.c fd = open(filename, O_RDWR); pmaddr = mmap(null, 4096, PROT_READ PROT_WRITE, MAP_SHARED, fd, 0); close(fd); strcpy(pmaddr, "Hello, Persistent Memory!"); msync((void *)pmaddr, 4096, MS_SYNC); 15 Data Center Group 15

trivial.c fd = open(filename, O_RDWR); pmaddr = mmap(null, 4096, PROT_READ PROT_WRITE, MAP_SHARED, fd, 0); close(fd); strcpy(pmaddr, "Hello, Persistent Memory!"); msync((void *)pmaddr, 4096, MS_SYNC); pmaddr could point to a really huge capacity terabytes! Want some allocator like malloc/free/new or language integration strcpy is not atomic msync is not atomic Basic memory-mapped files are not transactional up to the caller 16 Data Center Group 16

Also, you should know msync now just flushes CPU caches no page cache with DAX Platforms may support Optimized Flush Flush changes from using user space instructions for performance Windows supports this Linux supports this with new MAP_SYNC flag Future platforms may have persistent CPU caches ACPI property tells you this Write future-proof code by looking at this property & skipping flushes Persistent Memory errors appear as memory errors For example: SIGBUS on an uncorrectable in Linux Data Center Group 17

The Persistent Memory Development Kit PMDK http://pmem.io PMDK is a collection of libraries Developers pull only what they need Low level programming support Transaction APIs Fully validated Performance tuned. Open Source & Product neutral Data Center Group 18

PMDK Libraries C++ C PCJ* Python Support for volatile memory usage libmemkind In Development * Persistent Collections for Java Interface to create a persistent memory resident log file libpmemlog Low level support for local persistent memory libpmem Interface for persistent memory allocation, transactions and general facilities libpmemobj Low level support for remote access to persistent memory librpmem Interface to create arrays of pmemresident blocks, of same size, atomically updated libpmemblk Data Center Group 19

Also, you should know PMDK libraries are validated to product quality Many hundreds of unit tests Many hundreds of system tests We don t think we re all done now Performance work continues, with some significant results Feature development continues RAS More mature language integration (especially around C++) More mature replication Still adding libraries Example: libpmemkv Data Center Group 20

PMDK in a Nutshell Ten libraries, tools, examples void push(pool_base &pop, uint64_t value) { transaction::exec_tx(pop, [&] { auto n = make_persistent<pmem_entry>(); } 21 }); n->value = value; n->next = nullptr; if (head == nullptr) { head = tail = n; } else { tail->next = n; tail = n; } Data Center Group 21

PMDK in a Nutshell void push(pool_base &pop, uint64_t value) { transaction::exec_tx(pop, [&] { auto n = make_persistent<pmem_entry>(); } 22 }); n->value = value; n->next = nullptr; if (head == nullptr) { head = tail = n; } else { tail->next = n; tail = n; } Memory Allocations & Frees Data Center Group 22

PMDK in a Nutshell void push(pool_base &pop, uint64_t value) { transaction::exec_tx(pop, [&] { auto n = make_persistent<pmem_entry>(); } 23 }); n->value = value; n->next = nullptr; if (head == nullptr) { head = tail = n; } else { tail->next = n; tail = n; } Multiple Operations Made Atomic Data Center Group 23

PMDK in a Nutshell Complex transactions, allocation handled by libraries No flush calls to manage in most cases Each ISV doesn t have to re-invent Performance tuned (esp for future enhancements) Licensing is very liberal Steal all the code you want! PMDK is a convenience, not a requirement Build your own library if you like! 24 Data Center Group 24

Persistent Collections for Java... PersistentIntArray data = new PersistentIntArray(1024); ObjectDirectory.put("My_fancy_persistent_array", data); // no serialization data.set(0, 123);... No flush calls. Transactional. Java library handles it all. See pilot project at: https://github.com/pmem/pcj 25 Data Center Group 25

A Full-Stack Example Using a key-value store as an example App Unmodified App, uses KV APIs KV Store PCJ Use Java containers to create pmem-aware KV Store Caller just sees the same APIs, uses them as before Provide Java Containers libpmemobj Provide transactions, persistent memory allocator libpmem Abstract away hardware details pmem-aware File System Expose Persistent Memory as Memory-mapped files (DAX) Persistent Memory Data Center Group 26

SNIA TWG Ongoing Work Security PM Hardware Security Threat Model (balloting) Remote persistent memory (via RDMA) Ongoing optimizations for RDMA worked in multiple forums Remote asynchronous flush (under discussion) Higher-level Semantics As we learn more.. 27 Data Center Group 27

More Information http://snia.org/pm Specs, workgroups, webcasts, videos, presentations http://pmem.io PMDK and other persistent memory programming information http://pmem.io/documents Links to publications, standards, Windows & Linux info http://software.intel.com/pmem Intel Developer Zone for persistent memory programming 28 Data Center Group 28