Exploiting Managed Language Semantics to Mitigate Wear-out in - - PowerPoint PPT Presentation

β–Ά
exploiting managed language semantics to mitigate wear
SMART_READER_LITE
LIVE PREVIEW

Exploiting Managed Language Semantics to Mitigate Wear-out in - - PowerPoint PPT Presentation

Exploiting Managed Language Semantics to Mitigate Wear-out in Persistent Memory Shoaib Akram Ghent University, Belgium Flash Memory Summit 2019 Santa Clara, CA 1 Main memory capacity expansion Charge storage in DRAM a scaling limitation 1


slide-1
SLIDE 1

Exploiting Managed Language Semantics to Mitigate Wear-out in Persistent Memory

Shoaib Akram Ghent University, Belgium

Flash Memory Summit 2019 Santa Clara, CA 1

slide-2
SLIDE 2

Main memory capacity expansion

Flash Memory Summit 2019 Santa Clara, CA 2

Charge storage in DRAM a scaling limitation Manufacturing complexity makes DRAM pricing volatile

0.6 0.7 0.8 0.9 1 Price/Gb ($) Jan’17 Jan’18 WSTS, IC Insights

slide-3
SLIDE 3

Phase change memory (PCM)

Flash Memory Summit 2019 Santa Clara, CA 3

πŸ™ƒ Scalable β†’ More Gb for the same price Byte addressable like DRAM Latency closer to DRAM πŸ™‚ Low write endurance

slide-4
SLIDE 4

Flash Memory Summit 2019 Santa Clara, CA 4

Store information as change in resistance Crystalline is set & Amorphous is reset

temperature time Amorphous Crystalline

Why PCM has low write endurance?

Electric pulses to program PCM cells wear them out

slide-5
SLIDE 5

Mitigating PCM wear-out

Flash Memory Summit 2019 Santa Clara, CA 5

Wear-leveling to spread writes across PCM

slide-6
SLIDE 6

Mitigating PCM wear-out

Flash Memory Summit 2019 Santa Clara, CA 5

Wear-leveling to spread writes across PCM

slide-7
SLIDE 7

Mitigating PCM wear-out

Flash Memory Summit 2019 Santa Clara, CA 5

Wear-leveling to spread writes across PCM Problem: PCM-Only with wear-leveling wears out in a few months

slide-8
SLIDE 8

Hybrid DRAM-PCM memory

Flash Memory Summit 2019 Santa Clara, CA 6

This talk β†’ Use DRAM to limit PCM writes

DRAM PCM

Endurance Capacity Persistence

slide-9
SLIDE 9

OS to limit PCM writes

Flash Memory Summit 2019 Santa Clara, CA 7

Page migrations hurt performance and PCM lifetime

DRAM PCM

slide-10
SLIDE 10

Flash Memory Summit 2019 Santa Clara, CA

Managed runtimes

Managed Runtime Operating System Hardware Application Platform independence Abstract hardware/OS β†’ Aka Virtual Machine Ease programmer’s burden Garbage collection (GC)

8

slide-11
SLIDE 11

Flash Memory Summit 2019 Santa Clara, CA

GC to limit PCM writes

GC aware of heap semantics β†’ Pro-active allocation Operating System Hardware Application GC operates with objects β†’ Fine-grained mgmt.

9

slide-12
SLIDE 12

Flash Memory Summit 2019 Santa Clara, CA 10

Write Distribution in GC heap

nursery mature

GC

70%

  • f writes
slide-13
SLIDE 13

Flash Memory Summit 2019 Santa Clara, CA 10

Write Distribution in GC heap

22%

to 2% of objects

nursery mature

GC

70%

  • f writes
slide-14
SLIDE 14

Flash Memory Summit 2019 Santa Clara, CA 11

Write-Rationing Garbage Collection

Limit PCM writes by discovering highly written

  • bjects

Kingsguard β†’ dynamic monitoring Crystal Gazer β†’ prediction

slide-15
SLIDE 15

Kingsguard-Nursery (KG-N)

Flash Memory Summit 2019 Santa Clara, CA 12

mature large

nursery

DRAM PCM

slide-16
SLIDE 16

Kingsguard-Writers (KG-W)

Flash Memory Summit 2019 Santa Clara, CA

mature large

  • bserver

PCM

mature large

DRAM

nursery

13

slide-17
SLIDE 17

Metadata optimization

Flash Memory Summit 2019 Santa Clara, CA 14

payload meta

Full-heap GC: Mark a bit in meta of all live objects Meta Opt: Place object meta-data in DRAM

slide-18
SLIDE 18

KG-W drawbacks

Flash Memory Summit 2019 Santa Clara, CA 15

Monitoring overhead Limited opportunity to predict writes Fixed DRAM consumption

slide-19
SLIDE 19

Flash Memory Summit 2019 Santa Clara, CA 16

Write-Rationing Garbage Collection

Limit PCM writes by discovering highly written

  • bjects

Crystal Gazer β†’ prediction Kingsguard β†’ monitoring

slide-20
SLIDE 20

Allocation site as a write predictor

Flash Memory Summit 2019 Santa Clara, CA 17

a = new Object() b = new Object() c = new Object() d = new Object()

Uniform distribution πŸ™‚ Skewed distribution πŸ™ƒ Produces highly written

  • bjects
slide-21
SLIDE 21

Write distribution by allocation site

Flash Memory Summit 2019 Santa Clara, CA 18

Few sites capture majority of writes

25 50 75 100 50 100 150 % mature objects Sites sorted by writes Writes Volume

slide-22
SLIDE 22

Crystal Gazer operation

Flash Memory Summit 2019 Santa Clara, CA 19

Application Profiling Advice Generation Bytecode Compilation

a = new Object() … b = new_dram Object() a = new Object() … b = new Object()

slide-23
SLIDE 23

Flash Memory Summit 2019 Santa Clara, CA 20

Advice generation

Generate <alloc-site, advice> pairs advice β†’ DRAM or PCM input is a write-intensity trace Two heuristics to classify allocation sites as DRAM

slide-24
SLIDE 24

DRAM allocation sites

Flash Memory Summit 2019 Santa Clara, CA 21

Frequency: More than a threshold writes βœ”Aggressively limits writes βœ— 1 Byte and 1024 Byte object treated similarly Density: More than a threshold write-density βœ”Optimizes for writes and DRAM capacity

slide-25
SLIDE 25

Classification examples

Flash Memory Summit 2019 Santa Clara, CA 22

Object Identifier # Writes # Bytes Allocation site O1 4 A() + 10 O2 4 A() + 10 O3 128 4 A() + 10 O4 128 4096 B() + 4

Frequency threshold = 1 PCM writes = ?, DRAM bytes = ?

slide-26
SLIDE 26

Classification examples

Flash Memory Summit 2019 Santa Clara, CA

Object Identifier # Writes # Bytes Allocation site O1 4 A() + 10 O2 4 A() + 10 O3 128 4 A() + 10 O4 128 4096 B() + 4

Frequency threshold = 1 PCM writes = ?, DRAM bytes = ?

β†’ β†’

22

slide-27
SLIDE 27

Classification examples

Flash Memory Summit 2019 Santa Clara, CA

Object Identifier # Writes # Bytes Allocation site O1 4 A() + 10 O2 4 A() + 10 O3 128 4 A() + 10 O4 128 4096 B() + 4

Frequency threshold = 1 PCM writes = 0/256, DRAM bytes = 5008

β†’ β†’

22

slide-28
SLIDE 28

Classification examples

Flash Memory Summit 2019 Santa Clara, CA

Object Identifier # Writes # Bytes Allocation site O1 4 A() + 10 O2 4 A() + 10 O3 128 4 A() + 10 O4 128 4096 B() + 4

Density threshold = 1 PCM writes = ?, DRAM bytes = ?

22

slide-29
SLIDE 29

Classification examples

Flash Memory Summit 2019 Santa Clara, CA

Object Identifier # Writes # Bytes Allocation site O1 4 A() + 10 O2 4 A() + 10 O3 128 4 A() + 10 O4 128 4096 B() + 4

Density threshold = 1 PCM writes = ?, DRAM bytes = ?

β†’

32

22

slide-30
SLIDE 30

Classification examples

Flash Memory Summit 2019 Santa Clara, CA

Object Identifier # Writes # Bytes Allocation site O1 4 A() + 10 O2 4 A() + 10 O3 128 4 A() + 10 O4 128 4096 B() + 4

Density threshold = 1 PCM writes = ?, DRAM bytes = ?

β†’

<1

22

slide-31
SLIDE 31

Classification examples

Flash Memory Summit 2019 Santa Clara, CA

Object Identifier # Writes # Bytes Allocation site O1 4 A() + 10 O2 4 A() + 10 O3 128 4 A() + 10 O4 128 4096 B() + 4

Density threshold = 1 PCM writes = 128/256, DRAM bytes = 12

22

slide-32
SLIDE 32

Flash Memory Summit 2019 Santa Clara, CA 23

Object placement in Crystal Gazer

new_dram() β†’ Set a bit in the object header GC β†’ Inspect the bit on nursery collection to copy object in DRAM or PCM

slide-33
SLIDE 33

Flash Memory Summit 2019 Santa Clara, CA 24

Object placement in Crystal Gazer

mature large

PCM

mature large

DRAM

nursery

πŸ§‘

Is marked highly written? βœ“

slide-34
SLIDE 34

Flash Memory Summit 2019 Santa Clara, CA 25

Persistence

Persistent parent β†’ copy child objects to PCM VM startup β†’ Move highly-written to DRAM Write barrier tracks writes & persistent candidates

slide-35
SLIDE 35

Flash Memory Summit 2019 Santa Clara, CA 26

Evaluation methodology

15 Applications β†’ DaCapo, GraphChi, SpecJBB Medium-end server platform Different inputs for production and advice Jikes RVM

slide-36
SLIDE 36

Flash Memory Summit 2019 Santa Clara, CA 27

Emulation platform CPU CPU

βœ—

Jikes RVM

App OS

slide-37
SLIDE 37

Flash Memory Summit 2019 Santa Clara, CA 28

PCM write rates β†’ lifetime

PCM-Only write rate is up to 1.8 GB/s Safe operation is 200 MB/s for 5-10 year lifetime

slide-38
SLIDE 38

Flash Memory Summit 2019 Santa Clara, CA 29

PCM write rates

200 400 600 800

Write rate in MB/s KG-N KG-W Dens Freq

slide-39
SLIDE 39

Flash Memory Summit 2019 Santa Clara, CA 30

Performance

0.0 0.5 1.0 1.5

KG-N norm execution time KG-W Dens Freq

30%

8%

slide-40
SLIDE 40

Flash Memory Summit 2019 Santa Clara, CA 31

DRAM capacity

25 50 75

% of heap in DRAM KG-W Dens Freq

25%

slide-41
SLIDE 41

Flash Memory Summit 2019 Santa Clara, CA 32

0.3 0.4 0.5 0.6 0.7 0.8 100 150 200 250

KG-N norm. PCM writes DRAM MB

KG-W

KG-W versus Crystal Gazer

slide-42
SLIDE 42

Flash Memory Summit 2019 Santa Clara, CA 32

0.3 0.4 0.5 0.6 0.7 0.8 100 150 200 250

KG-N norm. PCM writes DRAM MB

KG-W Crystal Gazer

KG-W versus Crystal Gazer

Crystal Gazer

  • pens up

Pareto-optimal trade-offs

slide-43
SLIDE 43

Flash Memory Summit 2019 Santa Clara, CA 33

Write-rationing garbage collection

Hybrid memory is inevitable Each layer can play a role in wider adoption Write-rationing GC is pro-active and fine-grained DRAM PCM

slide-44
SLIDE 44

Flash Memory Summit 2019 Santa Clara, CA 34

More information

PLDI 2018 β†’ Write-rationing garbage collection for hybrid memories SIGMETRICS 2019 β†’ Crystal Gazer: Profile-driven write- rationing garbage collection for hybrid memories ISPASS 2019 β†’ Emulating and evaluating hybrid memory for managed languages on NUMA platform