Satori: Grzegorz Mi o , Derek Murray, Steven Hand Michael - - PowerPoint PPT Presentation

satori
SMART_READER_LITE
LIVE PREVIEW

Satori: Grzegorz Mi o , Derek Murray, Steven Hand Michael - - PowerPoint PPT Presentation

Satori: Grzegorz Mi o , Derek Murray, Steven Hand Michael Fetterman University of Cambridge Outline Motivation for page sharing Existing systems (a.k.a. state of the art) Satori overview Implementation Performance


slide-1
SLIDE 1

Satori:

Grzegorz Miłoś, Derek Murray, Steven Hand Michael Fetterman University of Cambridge

slide-2
SLIDE 2

Outline

  • Motivation for page sharing
  • Existing systems (a.k.a. state of the art)
  • Satori overview
  • Implementation
  • Performance results
slide-3
SLIDE 3

Motivation

  • Virtualisation becomes ubiquitous
  • Provisioning computer systems with memory
  • is expensive (hardware cost)
  • consumes power (running cost)
  • is inflexible (limited # of slots, limited chip size)

“The number of virtualized PCs is expected to grow from less than 5 million in 2007 to 660 million by 2011”

Source: Gartner, 2008

slide-4
SLIDE 4

Motivation

  • Homogeneous VMs common
  • Identical OSes use identical data:
  • binaries (kernel + programs)
  • libraries
  • configuration files
  • some data files
  • Amount of sharable memory
  • up to 70-80% for synthetic workloads
  • ~21% for Linux kernel compilation
slide-5
SLIDE 5

Motivation

  • Memory sharing reduces VM footprint
  • Memory overhead of subsequent

homogenous VMs is smaller

  • Extra memory can be used to
  • increase page cache size, and thus reduce

paging I/O rate

  • increase # of VMs on the host
slide-6
SLIDE 6

Sharing cycle

page duplicates

slide-7
SLIDE 7

Sharing cycle

page duplicates shared page share

slide-8
SLIDE 8

Sharing cycle

page duplicates shared page reclaimed duplicates share

slide-9
SLIDE 9

Sharing cycle

page duplicates shared page reclaimed duplicates credit share

slide-10
SLIDE 10

Sharing cycle

page duplicates shared page reclaimed duplicates credit share write

slide-11
SLIDE 11

Sharing cycle

page duplicates shared page reclaimed duplicates credit d e b i t share write

slide-12
SLIDE 12

Sharing cycle

page duplicates shared page reclaimed duplicates private page credit d e b i t share write

slide-13
SLIDE 13

Sharing cycle

page duplicates shared page reclaimed duplicates private page credit d e b i t share write copy

slide-14
SLIDE 14

Sharing cycle

page duplicates shared page reclaimed duplicates private page credit d e b i t share write copy

slide-15
SLIDE 15

Sharing cycle

page duplicates shared page reclaimed duplicates private page credit d e b i t share write copy

slide-16
SLIDE 16

Sharing cycle

page duplicates shared page reclaimed duplicates private page credit d e b i t share write copy

slide-17
SLIDE 17

Sharing cycle

page duplicates shared page reclaimed duplicates private page credit d e b i t share write copy

slide-18
SLIDE 18

Sharing cycle

page duplicates shared page reclaimed duplicates private page credit d e b i t share write copy

slide-19
SLIDE 19

Sharing cycle

page duplicates shared page reclaimed duplicates private page credit d e b i t share write copy

slide-20
SLIDE 20

Sharing cycle

page duplicates shared page reclaimed duplicates private page credit d e b i t share write copy

slide-21
SLIDE 21

Satori key objectives

slide-22
SLIDE 22

Satori key objectives

  • 1. Detect sharing quickly and cheaply
slide-23
SLIDE 23

Satori key objectives

  • 1. Detect sharing quickly and cheaply

Hypervisor scans guest memory and compares fingerprints

slide-24
SLIDE 24

Satori key objectives

  • 1. Detect sharing quickly and cheaply

Satori monitors virtual I/O devices ➙ no periodic scanning

slide-25
SLIDE 25

Satori key objectives

  • 1. Detect sharing quickly and cheaply
  • 2. Distribute memory savings fairly

Satori monitors virtual I/O devices ➙ no periodic scanning

slide-26
SLIDE 26

Satori key objectives

  • 1. Detect sharing quickly and cheaply
  • 2. Distribute memory savings fairly

Hypervisor manages common pool of surplus memory Satori monitors virtual I/O devices ➙ no periodic scanning

slide-27
SLIDE 27

Satori key objectives

  • 1. Detect sharing quickly and cheaply
  • 2. Distribute memory savings fairly

Satori monitors virtual I/O devices ➙ no periodic scanning VMs receive sharing entitlements in proportion to # pages shared

slide-28
SLIDE 28

Satori key objectives

  • 3. Reclaim memory efficiently
  • 1. Detect sharing quickly and cheaply
  • 2. Distribute memory savings fairly

Satori monitors virtual I/O devices ➙ no periodic scanning VMs receive sharing entitlements in proportion to # pages shared

slide-29
SLIDE 29

Satori key objectives

  • 3. Reclaim memory efficiently
  • 1. Detect sharing quickly and cheaply
  • 2. Distribute memory savings fairly

Hypervisor implements secondary memory paging algorithm Satori monitors virtual I/O devices ➙ no periodic scanning VMs receive sharing entitlements in proportion to # pages shared

slide-30
SLIDE 30

Satori key objectives

  • 3. Reclaim memory efficiently
  • 1. Detect sharing quickly and cheaply
  • 2. Distribute memory savings fairly

Satori monitors virtual I/O devices ➙ no periodic scanning VMs receive sharing entitlements in proportion to # pages shared Memory managed exclusively by the VMs sharing exposed to the VMs

slide-31
SLIDE 31
  • Intuition: most (non-zero) duplicates
  • riginate from VM page caches
  • Sharing-aware block devices observe I/O

reads to build up knowledge of page caches

Sharing-aware block devs

VM physical disk sharing-aware block dev I/O buffer page I/O data

slide-32
SLIDE 32

Sharing entitlements

  • Satori tracks the owners of shared

pseudo-physical pages

  • Entitlement proportional to the

# of pages shared & # of pages reclaimed VM memory HW memory VM1 VM2 entitlement

slide-33
SLIDE 33

Sharing entitlements

  • Satori tracks the owners of shared

pseudo-physical pages

  • Entitlement proportional to the

# of pages shared & # of pages reclaimed VM memory HW memory VM1 VM2 entitlement ½ ½

slide-34
SLIDE 34

Sharing entitlements

  • Satori tracks the owners of shared

pseudo-physical pages

  • Entitlement proportional to the

# of pages shared & # of pages reclaimed VM memory HW memory VM1 VM2 entitlement ½ ½

slide-35
SLIDE 35

Sharing entitlements

  • Satori tracks the owners of shared

pseudo-physical pages

  • Entitlement proportional to the

# of pages shared & # of pages reclaimed VM memory HW memory VM1 entitlement ⅔ VM2

slide-36
SLIDE 36

Memory transfer

slide-37
SLIDE 37

Memory transfer

credit

slide-38
SLIDE 38

Memory transfer

credit VM balloon

slide-39
SLIDE 39

Memory transfer

credit VM balloon

slide-40
SLIDE 40

Memory transfer

credit VM balloon

slide-41
SLIDE 41

Memory transfer

credit d e b i t VM balloon

slide-42
SLIDE 42

Memory transfer

credit d e b i t VM balloon VM repayment FIFO

slide-43
SLIDE 43

Memory transfer

credit d e b i t VM balloon VM repayment FIFO

slide-44
SLIDE 44

Implementation in Xen

  • Changes in the Xen hypervisor (5351 LoC)
  • low-level sharing support
  • sharing entitlement computation
  • fault handling
  • Changes in Domain 0 (3894 LoC)
  • sharing-aware block devices
  • management tools
  • Changes in Domain U (2306 LoC)
  • repayment FIFO (volatile pgs from IBM CMM)
slide-45
SLIDE 45

Performance results

  • Sharing-aware block devices interpose on

data read path

  • Worst-case overhead for sequential reads
  • Negligible for non-sequential reads
  • Kernel compilation macro-benchmark:

without Satori: 780s, with Satori 779s

Overheads

hashing 0.2% hashing + IPC 34.8%

slide-46
SLIDE 46

Performance results

Detection effectiveness

5000 10000 15000 20000 25000 30000 35000 40000 45000 2 4 6 8 10 12 14 16 18 20 22 24 26 28 30 Pages Time (mins) Kernel Compilation (512MB)

Potential Satori

slide-47
SLIDE 47

Performance results

Detection effectiveness

2000 4000 6000 8000 10000 12000 14000 16000 18000 5 10 15 20 25 30 35 40 45 50 55 60 Pages Time (mins) Kernel Compilation (512MB) Satori VMware

slide-48
SLIDE 48

Performance results

Performance impact − reads

Read progress in VM1 Read progress in VM2

0.22s 2 4 6 8s

slide-49
SLIDE 49

Performance results

Performance impact − httpd

50 100 150 200 250 20 40 60 80 100 120 140 160 180 200 220 240 Response rate (reqs/s) Time (s) Httpd performance Satori VMware without Tools VMware with Tools

slide-50
SLIDE 50

Performance results

  • Detection cheap and effective
  • less than 1% overhead (except IPC)
  • duplicates detected immediately
  • more effective than scanning
  • No physical I/O if data already present in any

virtual machine memory

  • Surplus memory improves overall system

performance

One slide summary

slide-51
SLIDE 51

Conclusions

  • Satori implements enlightened page sharing
  • Satori is efficient (low overheads)
  • Satori is effective (high coverage)
  • Satori is fair (proportional entitlements)
  • Satori maintains isolation (security and perf)

Thanks!

gm281@cam.ac.uk http://www.cl.cam.ac.uk/~gm281