310 likes | 476 Views
Satori: Enlightened page sharing. Grzegorz Milos et al., USENIX 09. presenter : Dongwoo Kang rediori@dankook.ac.kr. Contents. Motivation Satori Implementation Evaluation Conclusion. Motivation. Difficult to Increase the Memory Size. Increase memory capacity
E N D
Satori: Enlightened page sharing Grzegorz Milos et al., USENIX 09 presenter : Dongwoo Kang rediori@dankook.ac.kr
Contents • Motivation • Satori • Implementation • Evaluation • Conclusion
Difficult to Increase the Memory Size • Increase memory capacity • Need Extra slots on the mother board • Need higher-capacity modules • Consume significant power • High density memory is expensive source : http://www.legitreviews.com/article/1882/4/
Page Sharing Cycle Duplicates Page Copy Shared Page Private Page Write Attempt Reclaimed Duplicates
Motivation -1 • Previous work • Detect sharing page by periodically scanning the memory of all guest VMs • Scanning at a higher rate • More sharing opportunities, • Use more CPU • Scan, Compare fingerprints • Overcommit • VMM must be able to page guest memory to and from disk
Motivation -2 • Life time of many shareable pages is short • KBUILD-256 • Vanilla Linux 2.6.24 kernel build with 256MB of physical memory • KBUILD-512 • Vanilla Linux 2.6.24 kernel build with 512MB of physical memory
Satori The state of sudden indescribable intuitive enlightenment from Wiki VMs
What is the goal of Satori? • Two Goals • Detect short-lived sharing • Detect sharing cheaply • Two Technique • Sharing-aware block devices • Repayment FIFO
How are duplicates detected? • Many sharing opportunities are short-lived • 63.8% ~ 93.0% of shareable pages between VMs are part of the page cache • J.F.Kloster et al., “Determining the use of Interdomain Shareable Pages using Kernel Introspection”, 2007 • Use Sharing-aware block devices • low-overhead mechanism for detecting duplicates pages
Sharing-aware block devices • It was implemented in tapdisk • Content-based sharing • Copy-on-write disk sharing • Identical OSes use identical data • binaries( kernel + programs ) • libraries • configuration files • some data files source : presentation of satori
How are memory savings distributed? • Difference Engine • Satori New VM Page Shared Page Reclaimed Duplicates VM VM VM Page Reclaimed Duplicates Shared Page
Sharing entitlement • n is duplicates of the same page • it will reclaim n – 1 redundant copies • Contributing VM • (n-1)/n • Sharing entitlement p : each page n(p) : sharing rank of page M(i) : For VM i, which uses the set of pages s(i) : Sharing entitlement
Example of Sharing entitlements sharing entitlements pseudo-physical pages machine pages VM 1 VM 2
Example of Sharing entitlements sharing entitlements 1/2 1/2 pseudo-physical pages machine pages VM 1 VM 2
Example of Sharing entitlements sharing entitlements 1/2 1/2 pseudo-physical pages New Page machine pages VM 1 VM 2
Example of Sharing entitlements sharing entitlements 1/2 1/2 pseudo-physical pages Shareable machine pages VM 1 VM 2
Example of Sharing entitlements sharing entitlements 2/3 4/3 2/3 2/3 pseudo-physical pages 2/3 machine pages VM 1 VM 2
What if sharing is broken? • Need some more memory • Typically use Host Paging • Modify the OS to nominate “Volatile Pages” • Clean buffer cache pages Duplicates Page Copy Shared Page Private Page Write Attempt Reclaimed Duplicates repay use Repayment FIFO
Satori • Detect sharing quickly and cheaply • HVM scans guest memory and compares fingerprints • Monitors virtual I/O devices • Distribute memory saving fairly • HVM manages common pool of surplus memory • VMs receive sharing entitlements in proportion to # pages shared • Reclaim memory efficiently • HVM implements secondary memory paging algorithm • Memory managed exclusively by the VMs sharing exposed to the VMs
Implementation • Xen Hypervisor • 5351 LOC • Low-level sharing support • sharing entitlement computation • fault handling • Dom 0 • 3894 LOC • sharing-aware block devices • management tools • Dom U • 2306 LOC • Repayment FIFO • based IBM CMM
Environments • Dell PowerEdge 1425 server • 2 x 2.8GHz Xeon CPUs • 2.5GB memory • 80GB Seagate SATA disk • VMs ran Ubuntu Linux 8.04 • Benchmark • KBUILD-256,512 • HTTPERF(512MB) • RUBiS(512MB)
Shareable Opportunities • Achieves 94% Opp HTTPERF • Achives 91% OppRUBiS • Achives 50% Opp KBUILD-512
Conclusion • Satori no need memory scan • Detection cheap and effective • Satori is effective • High Coverage( HTTPERF, RUBiS)