a generic durable object model with durable computing · • own memory management schemes • own...

31
A GENERIC DURABLE OBJECT MODEL WITH DURABLE COMPUTING Gary Wang – Intel Johnu George, Debo Dutta – Cisco

Upload: others

Post on 03-Oct-2020

5 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: A GENERIC DURABLE OBJECT MODEL WITH DURABLE COMPUTING · • Own memory management schemes • Own structure transformations ØPoor Performance of JVM based stacks • Higher memory

A GENERIC DURABLE OBJECT MODEL WITH DURABLE COMPUTING

Gary Wang – IntelJohnu George, Debo Dutta – Cisco

Page 2: A GENERIC DURABLE OBJECT MODEL WITH DURABLE COMPUTING · • Own memory management schemes • Own structure transformations ØPoor Performance of JVM based stacks • Higher memory

Objects

ObjectsObjects

CURRENTBIGDATASYSTEMSTACK

Storage

Compute

SSD3DXpointDRAM

TPU

GPU

FPGA

Questions?1.Howtorepresentobjectgraphsinsoftwareefficiently?2.Howtomapsoftwaremodelstohardwareefficiently?

CPU

Page 3: A GENERIC DURABLE OBJECT MODEL WITH DURABLE COMPUTING · • Own memory management schemes • Own structure transformations ØPoor Performance of JVM based stacks • Higher memory

PROBLEM:OBJECT TRANSFORMATIONS->HIGHSERDESCOST

Objects

ObjectsObjects

DB

Files

Files

DB

Files

Services

Query

Parse

Marshal

UnMarshal

.

Update

Writewithschema

SerDes Checkpoint

Page 4: A GENERIC DURABLE OBJECT MODEL WITH DURABLE COMPUTING · • Own memory management schemes • Own structure transformations ØPoor Performance of JVM based stacks • Higher memory

On-Heap

PROBLEM:LIMITEDHEAPSPACE

Objects

ObjectsObjects

Externalstorage

Page 5: A GENERIC DURABLE OBJECT MODEL WITH DURABLE COMPUTING · • Own memory management schemes • Own structure transformations ØPoor Performance of JVM based stacks • Higher memory

PROBLEM:HIGH MEMORYMANAGEMENTOVERHEADS

Heapmemorymanagement

Page 6: A GENERIC DURABLE OBJECT MODEL WITH DURABLE COMPUTING · • Own memory management schemes • Own structure transformations ØPoor Performance of JVM based stacks • Higher memory

PROBLEM:HIGH COMMUNICATIONOVERHEADS

Service1 Service2

Marshal/Unmarshal data

Page 7: A GENERIC DURABLE OBJECT MODEL WITH DURABLE COMPUTING · • Own memory management schemes • Own structure transformations ØPoor Performance of JVM based stacks • Higher memory

SOLUTION?:LEVERAGE SMARTHARDWARE

StorageHardwareAccelerators

Page 8: A GENERIC DURABLE OBJECT MODEL WITH DURABLE COMPUTING · • Own memory management schemes • Own structure transformations ØPoor Performance of JVM based stacks • Higher memory

TLDR:CURRENTBIGDATAWORKLOADS

ØJVMperformancecosts• Serialization/Deserialization• JNIinvocationcost

ØComplex• Owncachingschemes• Ownmemorymanagementschemes• Owntransformationschemes

ØPoorPerformanceofJVMbasedstacks• Highermemoryusage• FrequentGCpauses

Page 9: A GENERIC DURABLE OBJECT MODEL WITH DURABLE COMPUTING · • Own memory management schemes • Own structure transformations ØPoor Performance of JVM based stacks • Higher memory

MNEMONIC:INTRODUCTIONØ Evolvingnewstoragetechnologies– NVM,3DXpoint

• Relativeperformanceofsystemlayerschanged• Changesrequiredinsoftwareprogrammingmodels

Ø ThemostpopularPLamongApacheprojects- Java• Approx.60%ofTLParejavabasedprojects

q NeedforaJavabasednon-volatileprogrammingmodelthatprovidesanunifiedviewofstoragetechnologies– DRAM,PMEM,SSDetc.

=>Mnemonic

Page 10: A GENERIC DURABLE OBJECT MODEL WITH DURABLE COMPUTING · • Own memory management schemes • Own structure transformations ØPoor Performance of JVM based stacks • Higher memory

Objects

ObjectsObjects

WHATISMNEMONIC?

Storage

Compute

SSDPMEMDRAM

GPUCPU TPU

ObjectGraphGenericDurableObjectModel

GenericDurableComputingModel

Page 11: A GENERIC DURABLE OBJECT MODEL WITH DURABLE COMPUTING · • Own memory management schemes • Own structure transformations ØPoor Performance of JVM based stacks • Higher memory

GENERICDURABLEOBJECTMODEL

• Simplebutnotsimplistic• Generic• Durable• Auto-Reclaimable• LazilyRestorable• MemoryAgnostic• NoSerDes• NativeIdentifiable• OptionalHandlerStore

Page 12: A GENERIC DURABLE OBJECT MODEL WITH DURABLE COMPUTING · • Own memory management schemes • Own structure transformations ØPoor Performance of JVM based stacks • Higher memory

AVAILABLEMEMORYSERVICES

• NVML-VMEM• PMALLOC• NVML-PMEM• SYS-VMEM

MemoryService

Page 13: A GENERIC DURABLE OBJECT MODEL WITH DURABLE COMPUTING · • Own memory management schemes • Own structure transformations ØPoor Performance of JVM based stacks • Higher memory

BENEFIT:INPLACEUPDATES

B

A

CreateUpdateamembervalue

Changereference

Page 14: A GENERIC DURABLE OBJECT MODEL WITH DURABLE COMPUTING · • Own memory management schemes • Own structure transformations ØPoor Performance of JVM based stacks • Higher memory

BENEFIT:AUTORECLAIM

UnreachableDurableObject

GarbageCollection

UsedMem.Space

Iftheflagofautoreclaimistrue

ManuallyDestroy

Page 15: A GENERIC DURABLE OBJECT MODEL WITH DURABLE COMPUTING · • Own memory management schemes • Own structure transformations ØPoor Performance of JVM based stacks • Higher memory

BENEFIT:LAZILYRESTORABLE

HandlerReference

DurableObjectA

DurableObjectB

StrongReference

HandlerReference

HandlerReference

Page 16: A GENERIC DURABLE OBJECT MODEL WITH DURABLE COMPUTING · • Own memory management schemes • Own structure transformations ØPoor Performance of JVM based stacks • Higher memory

BENEFIT:MEMORYAGNOSTIC

MemoryService

MemoryService

Page 17: A GENERIC DURABLE OBJECT MODEL WITH DURABLE COMPUTING · • Own memory management schemes • Own structure transformations ØPoor Performance of JVM based stacks • Higher memory

CONSISTENCY

• None• Close• Flush• SingleObjectPersist• ObjectDeepPersist• AtomicOperation• Transaction

Page 18: A GENERIC DURABLE OBJECT MODEL WITH DURABLE COMPUTING · • Own memory management schemes • Own structure transformations ØPoor Performance of JVM based stacks • Higher memory

DURABLEOBJECTSTATES

Invisible

Restored

Dangled

Floating

Retentive

setautoreclaimCreate

Notexisted

setautoreclaim

unsetautoreclaim unsetautoreclaim

restore

collect

manuallydestroy

manuallydestroy

collect

collect

Unreachable

Page 19: A GENERIC DURABLE OBJECT MODEL WITH DURABLE COMPUTING · • Own memory management schemes • Own structure transformations ØPoor Performance of JVM based stacks • Higher memory

DURABLEOBJECTGRAPHEXAMPLE

Page 20: A GENERIC DURABLE OBJECT MODEL WITH DURABLE COMPUTING · • Own memory management schemes • Own structure transformations ØPoor Performance of JVM based stacks • Higher memory

DURABLECOLLECTIONS

• SimpleMemoryAbstractionforCommonDataStructures• DurableChunk• DurableBuffer• DurableList• DurableMap• DurableTree• DurableArray• DurableSet (WIP)

• DistributedCollections(WIP)

Page 21: A GENERIC DURABLE OBJECT MODEL WITH DURABLE COMPUTING · • Own memory management schemes • Own structure transformations ØPoor Performance of JVM based stacks • Higher memory

EXAMPLESDurableMaps

DurableHashMap<String,Integer>map=DurableHashMapFactory.create(allocator);map.put("hello",1);map.put("world",2);map.put("hello",1);

DurableArrays

DurableArray<String>array=DurableArrayFactory.create(allocator,100);array.set(1,"string0");array.get(1);

Page 22: A GENERIC DURABLE OBJECT MODEL WITH DURABLE COMPUTING · • Own memory management schemes • Own structure transformations ØPoor Performance of JVM based stacks • Higher memory

DURABLECOMPUTINGMODEL

• Simplebutnotsimplistic• AcrossVMboundary• NoMarshal/Un-marshalling• SharedViewpoint• Schema-less• EnableSmartHardware

Page 23: A GENERIC DURABLE OBJECT MODEL WITH DURABLE COMPUTING · • Own memory management schemes • Own structure transformations ØPoor Performance of JVM based stacks • Higher memory

DURABLECOMPUTINGSERVICE

Service1

Service2

Servicen

HWAccelerators

HWAccelerators

Page 24: A GENERIC DURABLE OBJECT MODEL WITH DURABLE COMPUTING · • Own memory management schemes • Own structure transformations ØPoor Performance of JVM based stacks • Higher memory

COLLECTEDOBJECTS

Id=2

Id=2

Id=2

Id=2Path=2

Id=1

Id=1

Id=1

->1 ->5

Id=5

Id=5

Id=5

Page 25: A GENERIC DURABLE OBJECT MODEL WITH DURABLE COMPUTING · • Own memory management schemes • Own structure transformations ØPoor Performance of JVM based stacks • Higher memory

MNEMONICINTEGRATION

Page 26: A GENERIC DURABLE OBJECT MODEL WITH DURABLE COMPUTING · • Own memory management schemes • Own structure transformations ØPoor Performance of JVM based stacks • Higher memory

MNEMONIC– HADOOP

MneInputFormat

MneMapreduceRecordReader

MneOutputFormat

MneMapreduceRecordWriter

Partitions1,2…. Partitions1,2….

MR-likeEngines

Page 27: A GENERIC DURABLE OBJECT MODEL WITH DURABLE COMPUTING · • Own memory management schemes • Own structure transformations ØPoor Performance of JVM based stacks • Higher memory

MNEMONIC- SPARK

DurableRDD[D]RDD[T1] RDD[T2]

Partitions1,2….

makeDurable()withtransform

MneInputFormat MneOutputFormat

Page 28: A GENERIC DURABLE OBJECT MODEL WITH DURABLE COMPUTING · • Own memory management schemes • Own structure transformations ØPoor Performance of JVM based stacks • Higher memory

REDUCEGCACTIVITIES

LesserGCforMnemonicapplications

Page 29: A GENERIC DURABLE OBJECT MODEL WITH DURABLE COMPUTING · • Own memory management schemes • Own structure transformations ØPoor Performance of JVM based stacks • Higher memory

BUBBLESORTINGEXPERIMENTS

Page 30: A GENERIC DURABLE OBJECT MODEL WITH DURABLE COMPUTING · • Own memory management schemes • Own structure transformations ØPoor Performance of JVM based stacks • Higher memory

CONCLUSIONWithoutMnemonic

Ø JVMperformancecosts• SerDes• JNIinvocation

Ø Complex• Owncachingschemes• Ownmemorymanagementschemes• Ownstructuretransformations

Ø PoorPerformanceofJVMbasedstacks• Highermemoryusage• FrequentGCpauses

WithMnemonic

Ø DurableObjectModel• Unifiedviewofstoragedevices• NoSerDes cost• Lessmemoryusage• ReducedJCpauses• Handlesmemorymanagement

Ø DurableComputingmodel• BypassJNIcalls• Betterperformance

Page 31: A GENERIC DURABLE OBJECT MODEL WITH DURABLE COMPUTING · • Own memory management schemes • Own structure transformations ØPoor Performance of JVM based stacks • Higher memory

Thanks!

Gang(Gary)[email protected]@apache.org

[email protected]

[email protected]@apache.org

Debo [email protected]@apache.org