satori
play

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


  1. Satori: Grzegorz Mi ł o ś , Derek Murray, Steven Hand Michael Fetterman University of Cambridge

  2. Outline • Motivation for page sharing • Existing systems (a.k.a. state of the art) • Satori overview • Implementation • Performance results

  3. Motivation • Virtualisation becomes ubiquitous “The number of virtualized PCs is expected to grow from less than 5 million in 2007 to 660 million by 2011” Source: Gartner, 2008 • Provisioning computer systems with memory ‣ is expensive (hardware cost) ‣ consumes power (running cost) ‣ is inflexible (limited # of slots, limited chip size)

  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

  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

  6. Sharing cycle duplicates page

  7. Sharing cycle duplicates page share shared page

  8. Sharing cycle duplicates page share shared reclaimed page duplicates

  9. Sharing cycle duplicates page share shared reclaimed page duplicates credit

  10. Sharing cycle duplicates page share write shared reclaimed page duplicates credit

  11. Sharing cycle duplicates page share write shared reclaimed page duplicates credit t i b e d

  12. Sharing cycle duplicates page share write private shared reclaimed page page duplicates credit t i b e d

  13. Sharing cycle duplicates page share copy write private shared reclaimed page page duplicates credit t i b e d

  14. Sharing cycle duplicates page share copy write private shared reclaimed page page duplicates credit t i b e d

  15. Sharing cycle duplicates page share copy write private shared reclaimed page page duplicates credit t i b e d

  16. Sharing cycle duplicates page share copy write private shared reclaimed page page duplicates credit t i b e d

  17. Sharing cycle duplicates page share copy write private shared reclaimed page page duplicates credit t i b e d

  18. Sharing cycle duplicates page share copy write private shared reclaimed page page duplicates credit t i b e d

  19. Sharing cycle duplicates page share copy write private shared reclaimed page page duplicates credit t i b e d

  20. Sharing cycle duplicates page share copy write private shared reclaimed page page duplicates credit t i b e d

  21. Satori key objectives

  22. Satori key objectives 1. Detect sharing quickly and cheaply

  23. Satori key objectives 1. Detect sharing quickly and cheaply Hypervisor scans guest memory and compares fingerprints

  24. Satori key objectives 1. Detect sharing quickly and cheaply Satori monitors virtual I/O devices ➙ no periodic scanning

  25. Satori key objectives 1. Detect sharing quickly and cheaply Satori monitors virtual I/O devices ➙ no periodic scanning 2. Distribute memory savings fairly

  26. Satori key objectives 1. Detect sharing quickly and cheaply Satori monitors virtual I/O devices ➙ no periodic scanning 2. Distribute memory savings fairly Hypervisor manages common pool of surplus memory

  27. Satori key objectives 1. Detect sharing quickly and cheaply Satori monitors virtual I/O devices ➙ no periodic scanning 2. Distribute memory savings fairly VMs receive sharing entitlements in proportion to # pages shared

  28. Satori key objectives 1. Detect sharing quickly and cheaply Satori monitors virtual I/O devices ➙ no periodic scanning 2. Distribute memory savings fairly VMs receive sharing entitlements in proportion to # pages shared 3. Reclaim memory efficiently

  29. Satori key objectives 1. Detect sharing quickly and cheaply Satori monitors virtual I/O devices ➙ no periodic scanning 2. Distribute memory savings fairly VMs receive sharing entitlements in proportion to # pages shared 3. Reclaim memory efficiently Hypervisor implements secondary memory paging algorithm

  30. Satori key objectives 1. Detect sharing quickly and cheaply Satori monitors virtual I/O devices ➙ no periodic scanning 2. Distribute memory savings fairly VMs receive sharing entitlements in proportion to # pages shared 3. Reclaim memory efficiently Memory managed exclusively by the VMs sharing exposed to the VMs

  31. Sharing-aware block devs • Intuition: most (non-zero) duplicates originate from VM page caches • Sharing-aware block devices observe I/O reads to build up knowledge of page caches I/O data sharing-aware I/O buffer block dev page physical disk VM

  32. Sharing entitlements • Satori tracks the owners of shared pseudo-physical pages • Entitlement proportional to the # of pages shared & # of pages reclaimed VM1 VM2 VM memory HW memory entitlement 0 0

  33. Sharing entitlements • Satori tracks the owners of shared pseudo-physical pages • Entitlement proportional to the # of pages shared & # of pages reclaimed VM1 VM2 VM memory HW memory entitlement ½ ½

  34. Sharing entitlements • Satori tracks the owners of shared pseudo-physical pages • Entitlement proportional to the # of pages shared & # of pages reclaimed VM1 VM2 VM memory HW memory entitlement ½ ½

  35. Sharing entitlements • Satori tracks the owners of shared pseudo-physical pages • Entitlement proportional to the # of pages shared & # of pages reclaimed VM1 VM2 VM memory HW memory ⅔ entitlement

  36. Memory transfer

  37. Memory transfer credit

  38. Memory transfer credit VM balloon

  39. Memory transfer credit VM balloon

  40. Memory transfer credit VM balloon

  41. Memory transfer credit t i b e d VM balloon

  42. Memory transfer credit t i b e d VM VM balloon repayment FIFO

  43. Memory transfer credit t i b e d VM VM balloon repayment FIFO

  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)

  45. Performance results Overheads • Sharing-aware block devices interpose on data read path • Worst-case overhead for sequential reads hashing 0.2% hashing + IPC 34.8% • Negligible for non-sequential reads • Kernel compilation macro-benchmark: without Satori: 780s, with Satori 779s

  46. Performance results Detection effectiveness Kernel Compilation (512MB) � 45000 � 40000 � 35000 � 30000 � Pages � 25000 � Potential � Satori � 20000 � 15000 � 10000 � 5000 � 0 � 0 � 2 � 4 � 6 � 8 � 10 � 12 � 14 � 16 � 18 � 20 � 22 � 24 � 26 � 28 � 30 � Time (mins) �

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

  48. Performance results Performance impact − reads Read progress in VM1 Read progress in VM2 0 2 4 6 8s 0.22s

  49. Performance results Performance impact − httpd Httpd performance � 250 � Satori � VMware without Tools � Response rate (reqs/s) � 200 � VMware with Tools � 150 � 100 � 50 � 0 � 0 � 20 � 40 � 60 � 80 � 100 � 120 � 140 � 160 � 180 � 200 � 220 � 240 � Time (s) �

  50. Performance results One slide summary • 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

  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

More recommend