VSWAPPER: A Memory Swapper for Virtualized Environments

Slides:



Advertisements
Similar presentations
VM Memory Host Computer Balloon Disk VM Host Computer Memory Balloon Disk Inflate Swap Out Ballloon Deflate VM Host Computer Memory.
Advertisements

Virtualization Technology
Secure In-VM Monitoring Using Hardware Virtualization Monirul Sharif, Wenke Lee, Weidong Cui, and Andrea Lanzi Presented by Tyler Bletsch.
Differentiated I/O services in virtualized environments
Difference Engine: Harnessing Memory Redundancy in Virtual Machines by Diwaker Gupta et al. presented by Jonathan Berkhahn.
MACHINE-INDEPENDENT VIRTUAL MEMORY MANAGEMENT FOR PAGED UNIPROCESSOR AND MULTIPROCESSOR ARCHITECTURES R. Rashid, A. Tevanian, M. Young, D. Golub, R. Baron,
Segmentation and Paging Considerations
VSphere vs. Hyper-V Metron Performance Showdown. Objectives Architecture Available metrics Challenges in virtual environments Test environment and methods.
KMemvisor: Flexible System Wide Memory Mirroring in Virtual Environments Bin Wang Zhengwei Qi Haibing Guan Haoliang Dong Wei Sun Shanghai Key Laboratory.
Towards High-Availability for IP Telephony using Virtual Machines Devdutt Patnaik, Ashish Bijlani and Vishal K Singh.
Virtualization for Cloud Computing
LINUX Virtualization Running other code under LINUX.
SQL SERVER DAYS 2011 Optimizing SQL Server Performance in a Virtual Environment Denny Cherry twitter.com/mrdenny.
Yes No Emulated Devices No Hyper-V integration Limited manageability Limited functionality OK CPU, weak disk/net.
Free, online, technical courses Take a free online course. Microsoft Virtual Academy.
Virtualization Technology Prof D M Dhamdhere CSE Department IIT Bombay Moving towards Virtualization… Department of Computer Science and Engineering, IIT.
Tanenbaum 8.3 See references
SymCall: Symbiotic Virtualization Through VMM-to-Guest Upcalls John R. Lange and Peter Dinda University of Pittsburgh (CS) Northwestern University (EECS)
Dual Stack Virtualization: Consolidating HPC and commodity workloads in the cloud Brian Kocoloski, Jiannan Ouyang, Jack Lange University of Pittsburgh.
Virtualization. ABCs Special software: hypervisors or virtual machine managers Guest OS (virtual machine) sits on top of host OS (Win 7 in our case) We.
Benefits: Increased server utilization Reduced IT TCO Improved IT agility.
Improving Network I/O Virtualization for Cloud Computing.
1 Geiger: Monitoring the Buffer Cache in a Virtual Machine Environment Stephen T. Jones Andrea C. Arpaci-Dusseau Remzi H. Arpaci-Dusseau Department of.
© 2010 IBM Corporation Plugging the Hypervisor Abstraction Leaks Caused by Virtual Networking Alex Landau, David Hadas, Muli Ben-Yehuda IBM Research –
Kinshuk Govil, Dan Teodosiu*, Yongqiang Huang, and Mendel Rosenblum
Lecture 19: Virtual Memory
Virtual Machine Monitors: Technology and Trends Jonathan Kaldor CS614 / F07.
COMS E Cloud Computing and Data Center Networking Sambit Sahu
Embedded System Lab. 오명훈 Memory Resource Management in VMware ESX Server Carl A. Waldspurger VMware, Inc. Palo Alto, CA USA
Our work on virtualization Chen Haogang, Wang Xiaolin {hchen, Institute of Network and Information Systems School of Electrical Engineering.
High Performance Computing on Virtualized Environments Ganesh Thiagarajan Fall 2014 Instructor: Yuzhe(Richard) Tang Syracuse University.
1 Virtual Machine Memory Access Tracing With Hypervisor Exclusive Cache USENIX ‘07 Pin Lu & Kai Shen Department of Computer Science University of Rochester.
1 Memory Management. 2 Fixed Partitions Legend Free Space 0k 4k 16k 64k 128k Internal fragmentation (cannot be reallocated) Divide memory into n (possible.
Introduction to virtualization
VMWare MMU Ranjit Kolkar. Designed for efficient use of resources. ESX uses high-level resource management policies to compute a target memory allocation.
Paging (continued) & Caching CS-3013 A-term Paging (continued) & Caching CS-3013 Operating Systems A-term 2008 (Slides include materials from Modern.
Full and Para Virtualization
Operating Systems ECE344 Ashvin Goel ECE University of Toronto Virtual Memory Implementation.
THAWAN KOOBURAT MICHAEL SWIFT UNIVERSITY OF WISCONSIN - MADISON 1 The Best of Both Worlds with On-Demand Virtualization.
Protection of Processes Security and privacy of data is challenging currently. Protecting information – Not limited to hardware. – Depends on innovation.
Cloud Computing Lecture 5-6 Muhammad Ahmad Jan.
VM vs Container Xen, KVM, VMware, etc. Hardware emulation / paravirtualization Can run different OSs on the same box Dozens of instances OS sprawl problem.
Memory Resource Management in VMware ESX Server By Carl A. Waldspurger Presented by Clyde Byrd III (some slides adapted from C. Waldspurger) EECS 582 –
Memory Management memory hierarchy programs exhibit locality of reference - non-uniform reference patterns temporal locality - a program that references.
Dynamic Memory and Remote Fx Perumal Raja Dell India R & D Centre.
Memory Management & Virtual Memory. Hierarchy Cache Memory : Provide invisible speedup to main memory.
Virtual Machines (part 2) CPS210 Spring Papers  Xen and the Art of Virtualization  Paul Barham  ReVirt: Enabling Intrusion Analysis through Virtual.
NFV Group Report --Network Functions Virtualization LIU XU →
Virtualization for Cloud Computing
Virtualization.
Virtualization Technology
Presented by Yoon-Soo Lee
CS 3214 Introduction to Computer Systems
MOM + oVirt: Nurturing our Virtual Machines
CSC 322 Operating Systems Concepts Lecture - 16: by
XenFS Sharing data in a virtualised environment
Disco: Running Commodity Operating Systems on Scalable Multiprocessors
CSE 153 Design of Operating Systems Winter 2018
Optimizing SQL Server Performance in a Virtual Environment
Running other code under LINUX
Introduction to Operating Systems
OS Virtualization.
CSCI206 - Computer Organization & Programming
Overview: File system implementation (cont)
Oracle Memory Configuration on Windows Server
The Design & Implementation of Hyperupcalls
Virtual Memory: Working Sets
CSE 153 Design of Operating Systems Winter 2019
A Virtual Machine Monitor for Utilizing Non-dedicated Clusters
Efficient Migration of Large-memory VMs Using Private Virtual Memory
Presentation transcript:

VSWAPPER: A Memory Swapper for Virtualized Environments Nadav Amit, Dan Tsafrir, Assaf Schuster

virtualization Hardware virtualization enables the cloud ecosystem Higher server utilization Up to 50% less operating expenses Up to 80% less power expenses Memory is the biggest constraint for consolidation [IDC’09, Birke’12] Memory overcommitment Essential for server consolidation App. App. App. App. VM VM Hypervisor

Uncooperative Swapping RAM P1 P2 disk (1) Access guest view Guest Code B (2) Exit RAM P1 P2 (3) Swap P3 disk host view VM image Hyper-visor host swap area P2 Poor performance due to the semantic gap

Memory balloon Allows guest to make paging decisions, yet: inflate deflate guest memory guest memory guest memory balloon swap out virtual disk swap in Allows guest to make paging decisions, yet: Ballooning takes time Not a complete solution Paravirtual Virtualization vendor use host swapping as a backup

Demonstration: Sequential file read 512MB VM; 100MB cap; 200MB file; Read & re-read Swapping Files cached in guest memory; not in host Disk read Balloon

Agneda Introduction Problems Solutions Evaluation

Problem #1: Stale Swap Reads

Problem #1: Stale Swap Reads (1) VM reads P2 RAM P P2 disk guest view P2 P2 RAM (2) #PF  reading P P (3) over- write it with P2 P2 disk host view VM image P2 P2 P2 host swap area P P P Swap data is read just for disk blocks to overwrite it

Problem #2: False Swap Reads (1) VM writes to P RAM P (2) VM over- writes P P disk host view VM image host swap area P Guest reallocates page frames: Copy-on-write Zero page before use Slab pages

Problem #3: Silent Swap Writes RAM P P P (1) vm reads page (2) host swaps page disk host view VM image P P P host swap area Data read from the image is written back to the host swap

Problem #4: Decayed Swap Sequentiality

Problem #4: Decayed Swap Sequentiality RAM disk host view VM image P1 P2 P3 host swap area P2 P3 P1 VM image data gradually loses sequentiality on swap Poor prefetch

Problem #5: False Anonymity Userspace hypervisor code guest: named host: anon anon RAM P4 P1 P3 QEMU disk Swap out host view VM image P1 P2 P3 host swap area All guest memory is considered anonymous OS prefers to evict named pages; hypervisor ignores

Demonstration: Sequential file read

Agneda Introduction Problems Solutions Evaluation

Solutions Extension to existing swapping Full-virtualization No VM introspection Based on general OS concepts Can be used with ballooning Two mechanisms Swap mapper False read preventer

Associate guest memory page with disk block (P=B) Solution: Swap Mapper (1) Read command RAM P disk guest view B (2) Exit Associate guest memory page with disk block (P=B) RAM P (3) File read disk host view VM image (3) mmap to file B (4) Remove mapping on write to P or B Similar flow for writes

Solution: Swap Mapper Solves: Stale swap reads – map instead of read Silent swap writes – no WB of clean pages Decayed swap sequentiality – Data in its original place False anonymity – pages from image are named Subtleties: Consistency VM disk uses 4KB blocks Prefetch only if present in guest physical memory Remove from host cache if overwritten Limitations Overheads – CPU and memory Cannot track migrated pages

Solution: False Read Preventer mov [0x10], 5 Save VM writes to buffer If page is rewritten, allocate one from free pool and remap If not, fetch asynchronously and merge Subtleties: Selective emulation Efficient emulation Host reads Virtual Machine Exit Entry Hypervisor Record Fetch Map [0x10]=5 ….5…. Writeback

Agneda Introduction Problems Solutions Evaluation

Evaluation IBM R420 Server KVM Hypervisor Enterprise disk Configurations baseline: host-swapping, no host caching mapper: swap mapper vswapper: swap mapper and false read preventer balloon: paravirtual balloon, host swapping enabled

Pbzip2 VM: 512MB, 1VCPU 1.63x speedup OOM

Kernbench VM: 512MB, 1VCPU

Dynamic Workload: METIS MAP-REDUCE (WC) VM: 2GB; Host: 8GB MoM manages balloon VMs started 10 sec. apart 2x speedup (w/balloon)

Related Works Monitoring the buffer-cache [Jones06] Non-blocking writes [Useche12] Memory overcommit mechanisms Transcendent memory [Magenheimer’09] Cooperative memory management [Schwidefsky’06] Memory hot-plug [Schopp’06]

Conclusion Host-swapping poor performance analysis and solution Swap mapper False read preventer VSwapper integrates with balloon Vswapper code is available nadav.amit.to/vswapper

Questions