13
12 th ANNUAL WORKSHOP 2016 SNIA NVM PROGRAMMING MODEL UPDATE Doug Voigt, SNIA NVM PM Chair April 6 th , 2016 Hewlett Packard Enterprise

SNIA NVM PROGRAMMING MODEL UPDATE - OpenFabrics · 12th ANNUAL WORKSHOP 2016 SNIA NVM PROGRAMMING MODEL UPDATE Doug Voigt, SNIA NVM PM Chair April 6 th, 2016. Hewlett Packard Enterprise

  • Upload
    donhu

  • View
    215

  • Download
    0

Embed Size (px)

Citation preview

Page 1: SNIA NVM PROGRAMMING MODEL UPDATE - OpenFabrics · 12th ANNUAL WORKSHOP 2016 SNIA NVM PROGRAMMING MODEL UPDATE Doug Voigt, SNIA NVM PM Chair April 6 th, 2016. Hewlett Packard Enterprise

12th ANNUAL WORKSHOP 2016

SNIA NVM PROGRAMMING MODEL UPDATEDoug Voigt, SNIA NVM PM Chair

April 6th , 2016Hewlett Packard Enterprise

Page 2: SNIA NVM PROGRAMMING MODEL UPDATE - OpenFabrics · 12th ANNUAL WORKSHOP 2016 SNIA NVM PROGRAMMING MODEL UPDATE Doug Voigt, SNIA NVM PM Chair April 6 th, 2016. Hewlett Packard Enterprise

OpenFabrics Alliance Workshop 2016

NVM PROGRAMMING MODEL MOTIVATIONLatency Reduction Causes Inflection Point

2

Late

ncy

(Log

)

200 nS

2 uS

HDD SATA SSD

NVMe Flash

Persistent Memory

Context Switch

NUMA

Min, Max Latencies For Example Technologies

Page 3: SNIA NVM PROGRAMMING MODEL UPDATE - OpenFabrics · 12th ANNUAL WORKSHOP 2016 SNIA NVM PROGRAMMING MODEL UPDATE Doug Voigt, SNIA NVM PM Chair April 6 th, 2016. Hewlett Packard Enterprise

OpenFabrics Alliance Workshop 2016

NVM PROGRAMMING MODEL SPECIFICATION

3

Current version is 1.1 http://www.snia.org/tech_activities/standards/curr_standards/npm Expose new block and file features to applications

• Atomicity capability and granularity• Thin provisioning management Use of memory mapped files for persistent memory

• Existing abstraction that can act as a bridge• Limits the scope of application re-invention• Open source implementations available Programming Model, not API

• Described in terms of attributes, actions and use cases• Implementations map actions and attributes to API’s

Includes Block, File, Volume and Persistent Memory (PM) File

Page 4: SNIA NVM PROGRAMMING MODEL UPDATE - OpenFabrics · 12th ANNUAL WORKSHOP 2016 SNIA NVM PROGRAMMING MODEL UPDATE Doug Voigt, SNIA NVM PM Chair April 6 th, 2016. Hewlett Packard Enterprise

OpenFabrics Alliance Workshop 2016

PERSISTENT MEMORY VOLUME AND FILE

4

Includes Block, File, Volume and Persistent Memory (PM) File

Application

PM device PM device. . .

User space

Kernel space

MMU Mappings

PM-aware file system

NVM PM capable driver

Load/store

Native file API

PM-aware kernel module

PM device

NVM.PM.VOLUME mode

NVM.PM.FILE mode

Use with memory-like NVM

NVM.PM.VOLUME Mode• Software abstraction to OS components for

Persistent Memory (PM) hardware• List of physical address ranges for each PM

volume• Thin provisioning management

NVM.PM.FILE Mode• Describes the behavior for applications

accessing persistent memory Discovery and use of atomic write features

• Mapping PM files (or subsets of files) to virtual memory addresses

• Syncing portions of PM files to the persistence domain

Memory Mapping in NVM.PM.FILE mode enables direct access to persistent

memory using CPU instructions

Page 5: SNIA NVM PROGRAMMING MODEL UPDATE - OpenFabrics · 12th ANNUAL WORKSHOP 2016 SNIA NVM PROGRAMMING MODEL UPDATE Doug Voigt, SNIA NVM PM Chair April 6 th, 2016. Hewlett Packard Enterprise

OpenFabrics Alliance Workshop 2016

NVM PROGRAMMING MODEL

5

Remote Access for HA white paper released:http://www.snia.org/sites/default/files/technical_work/final/NVM_PM_Remote_Access_for_High_Availability_v1.0.pdf

• Requirements for consistent data recovery• Requirements for efficient remote optimized flush• Work continuing on remote optimized flush behavior Error handling

• Additions to V1.2 of the programming model specification• Refinements to error handling annex Atomicity

• New white paper nearing completion• Introduces PM data structure libraries with atomicity built in• Enables PM transactions

Recent Work

Page 6: SNIA NVM PROGRAMMING MODEL UPDATE - OpenFabrics · 12th ANNUAL WORKSHOP 2016 SNIA NVM PROGRAMMING MODEL UPDATE Doug Voigt, SNIA NVM PM Chair April 6 th, 2016. Hewlett Packard Enterprise

OpenFabrics Alliance Workshop 2016

REMOTE ACCESSFOR HIGH AVAILABILITY

6

Page 7: SNIA NVM PROGRAMMING MODEL UPDATE - OpenFabrics · 12th ANNUAL WORKSHOP 2016 SNIA NVM PROGRAMMING MODEL UPDATE Doug Voigt, SNIA NVM PM Chair April 6 th, 2016. Hewlett Packard Enterprise

OpenFabrics Alliance Workshop 2016

MORE ON MAP AND SYNCSync does not guarantee order

Map• Associates memory addresses with open file• Caller may request specific address Sync

• Flush CPU cache for indicated range• Additional Sync types• Optimized Flush – multiple ranges from user space• Optimized Flush and Verify – Optimized flush with read back from media Warning! Sync does not guarantee order

• Parts of CPU cache may be flushed out of order• This may occur before the sync action is taken by the application• Sync only guarantees that all data in the indicated range has been flushed

some time before the sync completes

7

Page 8: SNIA NVM PROGRAMMING MODEL UPDATE - OpenFabrics · 12th ANNUAL WORKSHOP 2016 SNIA NVM PROGRAMMING MODEL UPDATE Doug Voigt, SNIA NVM PM Chair April 6 th, 2016. Hewlett Packard Enterprise

OpenFabrics Alliance Workshop 2016

REMOTE ACCESS FOR HA SOFTWARE MODEL

8

RDMA for HA During msync or opt_flush

Application

Opt_flushNative file API

libc libpmem

Load/storeNVM.PM.FILE mode

User space

Kernel space

MMU MappingsPM-aware file system

PM device

Network file system client

opt_flushmsync

RNIC

RDMA Operation Requests

Peer A Peer B

RDMA Data

RDMA Operation Requests

Load/StoreOpt FlushNative FileAPI

Page 9: SNIA NVM PROGRAMMING MODEL UPDATE - OpenFabrics · 12th ANNUAL WORKSHOP 2016 SNIA NVM PROGRAMMING MODEL UPDATE Doug Voigt, SNIA NVM PM Chair April 6 th, 2016. Hewlett Packard Enterprise

OpenFabrics Alliance Workshop 2016

REMOTE ACCESS FOR HA LADDER DIAGRAM

9

Remote Optimized Flush

App: SW PeerA:Host SW

PeerANIC:RNic

PeerBNIC:RNic

PeerBPM: PM

PeerB:Host SW

OptimizedFlush RDMAWrite

RDMAWrite

Write

RDMAWrite

Write

RDMAWrite

Flush

Flush

Flush

1

2

3

RDMAWrite

FlushRDMAWrite

Write

Page 10: SNIA NVM PROGRAMMING MODEL UPDATE - OpenFabrics · 12th ANNUAL WORKSHOP 2016 SNIA NVM PROGRAMMING MODEL UPDATE Doug Voigt, SNIA NVM PM Chair April 6 th, 2016. Hewlett Packard Enterprise

OpenFabrics Alliance Workshop 2016

CONSISTENCY FOR RECOVERABILITYApplication Involvement Required for High Availability

Application level goal is recovery from failure• Requires robust local and remote error handling• High Availability (as opposed to High Durability) requires application

involvement. Consistency is an application specific constraint

• Uncertainty of data state after failure• Crash consistency• Higher order consistency points Atomicity of Aligned Fundamental Data Types

• Required for consistency if additional data hashes are to be avoided• Failure atomicity as opposed to inter-process atomicity

10

Page 11: SNIA NVM PROGRAMMING MODEL UPDATE - OpenFabrics · 12th ANNUAL WORKSHOP 2016 SNIA NVM PROGRAMMING MODEL UPDATE Doug Voigt, SNIA NVM PM Chair April 6 th, 2016. Hewlett Packard Enterprise

OpenFabrics Alliance Workshop 2016

CONSIST RECOVERY MODESHigh Availability Requires Backtracking in Remote Memory Use Cases

Scen

ario

Redu

ndan

cy fr

eshn

ess

Exce

ptio

n

Appl

icat

ion

back

trac

k w

ithou

t res

tart

Serv

er R

esta

rt

Serv

er F

ailu

re

In Line Recovery Better than sync

Precise and contained

NA No No

Backtracking Recovery Consistency point

Imprecise and contained

Yes No No

Local application restart Consistency point

Not contained No NA NoNA NA Yes No

Application Failover Consistency point

NA NA NA Yes

11

Page 12: SNIA NVM PROGRAMMING MODEL UPDATE - OpenFabrics · 12th ANNUAL WORKSHOP 2016 SNIA NVM PROGRAMMING MODEL UPDATE Doug Voigt, SNIA NVM PM Chair April 6 th, 2016. Hewlett Packard Enterprise

OpenFabrics Alliance Workshop 2016

REMOTE FAILURE ATOMICITY TRADEOFFSMust Involve Sink (Peer B above) RNIC

Option Over-head

Selective-ness

RDMA Compat-ibility

NVMP Compat-ibility

A - Apply to atomic actions surfaced by existing protocols

1 1 1 3

B - Apply to all RDMA writes 2 3 1 1

C - Apply to all RDMA writes in a given session based on a registration option

2 2 2 1

D - Apply to individual RDMA writes based on a flag in each RDMA write

1 1 2 3

E - Use checksum when atomicity is required 3 2 1 2

Cells contain desirability rating, 1 being most desirable

12

Page 13: SNIA NVM PROGRAMMING MODEL UPDATE - OpenFabrics · 12th ANNUAL WORKSHOP 2016 SNIA NVM PROGRAMMING MODEL UPDATE Doug Voigt, SNIA NVM PM Chair April 6 th, 2016. Hewlett Packard Enterprise

12th ANNUAL WORKSHOP 2016

THANK YOUDoug Voigt, SNIA NVM PM Chair

April 6th , 2016Hewlett Packard Enterprise