Performance isolation across virtual machines in Xen
Diwaker Gupta, Amin Vahdat University of California, San Diego Lucy Cherkasova, Robert Gardner Hewlett-Packard Laboratories, Palo Alto & Fort Collins
Performance isolation across virtual machines in Xen Diwaker Gupta , - - PowerPoint PPT Presentation
Performance isolation across virtual machines in Xen Diwaker Gupta , Lucy Cherkasova, Amin Vahdat Robert Gardner University of California, Hewlett-Packard Laboratories, Palo Alto & Fort Collins San Diego Middleware Software that
Diwaker Gupta, Amin Vahdat University of California, San Diego Lucy Cherkasova, Robert Gardner Hewlett-Packard Laboratories, Palo Alto & Fort Collins
Diwaker Gupta Middleware ’06 12/01/2006 2
Software that connects software
All about virtualization of resources and
Goal is to efficiently utilize a shared
It is critical to protect users from one
Diwaker Gupta Middleware ’06 12/01/2006 3
Software that creates a virtualized
Abstract out hardware heterogeneity Provides isolated execution environment
Diwaker Gupta Middleware ’06 12/01/2006 4
HP SoftUDC, Amazon EC2
Diwaker Gupta Middleware ’06 12/01/2006 5
Fault isolation Performance isolation
Performance of one VM should not impact
performance of another VM
Related concept: resource isolation Resource isolation is necessary for
performance isolation, but is it sufficient?
Diwaker Gupta Middleware ’06 12/01/2006 6
Xen 1.x: Device drivers in hypervisor
Xen Dom-0 IDD VM
Disk NIC netback blkback netfront blkfront
Xen 3.x: Device drivers in driver domains
Xen
Dom-0 VM
Disk NIC
Pseudo NIC Pseudo Disk N/W Driver Disk Driver
Diwaker Gupta Middleware ’06 12/01/2006 7
Execution container vs.
Resource consumption of
a VM may span several driver domains
Accurate accounting
Resource consumption
by an IDD on behalf of a VM
Xen Hypervisor Dom-0 IDD VM
Disk NIC netback blkback netfront blkfront
Diwaker Gupta Middleware ’06 12/01/2006 8
How does one control the aggregate
How does one control the resource
Diwaker Gupta Middleware ’06 12/01/2006 9
Measure
Profiling tools
Allocate
Modifications to the CPU scheduler
Control
Mechanisms to control resource usage
Our work focuses on CPU and network I/O.
Diwaker Gupta Middleware ’06 12/01/2006 10
Events: anything “interesting” (domain
Events analyzed in user space to generate
Flexible measurement granularity: over
Included in the official Xen code tree
Diwaker Gupta Middleware ’06 12/01/2006 11
Xen VM Dom-0
Xentrace: generate events Events logged in trace buffers Xenbaked: process events xenmon
More details on XenMon available in HP Labs tech report HPL-2005-187
Diwaker Gupta Middleware ’06 12/01/2006 12
How does one control the aggregate
How does one control the resource
Diwaker Gupta Middleware ’06 12/01/2006 13
Example
Single CPU system SEDF (Simple Earliest Deadline First) in non
work-conserving mode (hard reservations)
VM-1: web server, 60% Dom-0: driver domain, 40% How to control aggregate CPU consumption?
General scenario: Two workloads with different characteristics (I/O vs. CPU intensive) are given equal shares. Do they really get equal shares?
Diwaker Gupta Middleware ’06 12/01/2006 14
Aggregate Ideal
Diwaker Gupta Middleware ’06 12/01/2006 15
Goal: allocate CPU shares accounting for
Steps:
Partition CPU consumption in IDD for different
VMs
Charge this debt back to the VM
Partitioning: timing code paths vs.
Heuristic for partitioning: CPU overhead is
Diwaker Gupta Middleware ’06 12/01/2006 16
different for send and receive paths
constant
CPU overhead is independent
CPU overhead is proportional to rate of packets
Diwaker Gupta Middleware ’06 12/01/2006 17
Count packets corresponding to each VM Compute weighted packet count (using the
Partition CPU consumed by IDD using
Charge debt of each VM to its CPU
Diwaker Gupta Middleware ’06 12/01/2006 18
VM-1 VM-2 Dom-0
t=0: Both VM-1 and VM-2 have remaining time 10ms t=10ms: Dom-0 ran for 6ms to service VM traffic SEDF-DC reduces remaining time of VM-1 by 2ms and VM-2 by 4ms respectively
r=10ms r=10ms Service time = 6ms r=8ms r=6ms
Diwaker Gupta Middleware ’06 12/01/2006 19
Aggregate
Diwaker Gupta Middleware ’06 12/01/2006 20
SEDF-DC addresses problem for SEDF in
Idea can be extended to other CPU
Spread debt across multiple execution
Diwaker Gupta Middleware ’06 12/01/2006 21
How does one control the aggregate
How does one control the resource
Diwaker Gupta Middleware ’06 12/01/2006 22
Scenario
SEDF, dual processor machine, non work-conserving
mode
Dom-1: Web server, 33% on CPU-2 (10KB files) Dom-2: Web server, 33% on CPU-2 (100KB files) Dom-3: File transfer, 33% on CPU-2 Dom-0: 60% on CPU-1
File transfer begins 20s into the
Goal: file transfer in VM-3 should not
Diwaker Gupta Middleware ’06 12/01/2006 23
Webserver throughput CPU utilization Dom-0 CPU utilization
Diwaker Gupta Middleware ’06 12/01/2006 24
Problem: No way to control how much CPU
ShareGuard
Periodically monitor CPU usage using XenMon IP tables in Dom-0 turn off traffic for offenders Added similar functionality to netback
Repeated experiment, with VM-3 restricted
Diwaker Gupta Middleware ’06 12/01/2006 25
CPU in Dom-0 for Dom-3 is 4.42%
Webserver throughput CPU utilization Dom-0 CPU utilization
Diwaker Gupta Middleware ’06 12/01/2006 26
Both SEDF-DC, ShareGuard depend on
ShareGuard only works for network I/O,
ShareGuard is independent of the CPU
ShareGuard is intrusive (actively blocks
Diwaker Gupta Middleware ’06 12/01/2006 27
Performance isolation is crucial in multi-
Current I/O model in Xen breaks
Mantra: Measure, Allocate, Control XenMon, SEDF-DC, ShareGuard are steps
Hardware support will (hopefully) enable
Diwaker Gupta Middleware ’06 12/01/2006 28
Diwaker Gupta Middleware ’06 12/01/2006 29
Common resources: CPU, Disk, Memory, Network Spatial (disk, memory) vs. Temporal resources
(CPU)
Partitioning vs. Time sharing Quality of Service
Availability Cost of access
CPU is special: now just how much, but also
when?
Diwaker Gupta Middleware ’06 12/01/2006 30
Are they happening? We need accurate accounting. But how? ShareGuard only works for network I/O.
We’ve tried
Memory page exchanges [USENIX 05] Weighted packet counts Instrumentation?
Diwaker Gupta Middleware ’06 12/01/2006 31
IDDs are critical for I/O performance Scheduling parameters have significant
Different schedulers need different tuning Example: on a uni-processor machine, for
Diwaker Gupta Middleware ’06 12/01/2006 32
Diwaker Gupta Middleware ’06 12/01/2006 33
Diwaker Gupta Middleware ’06 12/01/2006 34
Separating costs in presence of multiple
CPU partitioning for other kinds of I/O
Isolation of low level resources (PCI bus
Choosing and configuring the right
Diwaker Gupta Middleware ’06 12/01/2006 35
Three schedulers in less than two years Do end users care? Schedulers have demonstrated
Questions
Which scheduler to use? How to configure parameters? Should IDDs be treated specially?
Diwaker Gupta Middleware ’06 12/01/2006 36
Not very sensitive to Dom-0 weights
Diwaker Gupta Middleware ’06 12/01/2006 37
Higher weight actually performs worse! Lower weight is better
Diwaker Gupta Middleware ’06 12/01/2006 38
Background and Motivation Controlling aggregate CPU consumption QoS in the driver domain Configuring scheduler parameters Conclusion