profiling and modeling resource usage of virtualized applications timothy wood 1, ludmila cherkasova...

29
Profiling and Modeling Resource Usage of Virtualized Applications Timothy Wood 1, Ludmila Cherkasova 2, Kivanc Ozonat 2, and Prashant Shenoy 1 1 University of Massachusetts, Amherst, {twood,shenoy}@cs.umass.edu 2 HP Labs, Palo Alto, {lucy.cherkasova,kivanc.ozonat}@hp.com 1 Middleware '08 Proceedings of the 9th ACM/IFIP/USENIX International Conference on Middleware

Upload: ethel-long

Post on 30-Dec-2015

217 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: Profiling and Modeling Resource Usage of Virtualized Applications Timothy Wood 1, Ludmila Cherkasova 2, Kivanc Ozonat 2, and Prashant Shenoy 1 1 University

1

Profiling and Modeling Resource Usage of Virtualized Applications

Timothy Wood 1, Ludmila Cherkasova 2, Kivanc Ozonat 2, and Prashant Shenoy 11 University of Massachusetts, Amherst, {twood,shenoy}@cs.umass.edu

2 HP Labs, Palo Alto, {lucy.cherkasova,kivanc.ozonat}@hp.com

Middleware '08 Proceedings of the 9th ACM/IFIP/USENIX International Conference on Middleware

Page 2: Profiling and Modeling Resource Usage of Virtualized Applications Timothy Wood 1, Ludmila Cherkasova 2, Kivanc Ozonat 2, and Prashant Shenoy 1 1 University

2

Outline

• Introduction• Problem Definition• Platform Profiling• Model Generation• Experimental Evaluation• Discussion• Conclusions

Page 3: Profiling and Modeling Resource Usage of Virtualized Applications Timothy Wood 1, Ludmila Cherkasova 2, Kivanc Ozonat 2, and Prashant Shenoy 1 1 University

3

Introduction• Virtualization can optimize resource sharing among applications

hosted in different VMs– the ability to quickly repurpose server capacity on demand– respond more effectively to changing business conditions

• Accurate performance models become instrumental for enabling applications to be consolidated, optimally placed and provided with the necessary resources

• A trace-based approach for the design of workload placement services – that assesses permutations and combinations of workload patterns in order to

determine the optimal stacking functions

Page 4: Profiling and Modeling Resource Usage of Virtualized Applications Timothy Wood 1, Ludmila Cherkasova 2, Kivanc Ozonat 2, and Prashant Shenoy 1 1 University

4

Introduction

• Capacity Planning in Virtual Environment• Challenges

– Apps are characterized by a collection of resource usage traces in native environment

– Virtualization overheads

• In this work, design a general approach for estimating the CPU requirements of applications when they are transferred to a virtual environment

Page 5: Profiling and Modeling Resource Usage of Virtualized Applications Timothy Wood 1, Ludmila Cherkasova 2, Kivanc Ozonat 2, and Prashant Shenoy 1 1 University

5

Introduction

• Our approach has the following Key Components– A selected set of microbenchmarks to profile the different types of

virtualization overhead on a given platform(to create two resource usage profiles: 1. native 2. virtualized )– Using a regression-based approach we create a model that maps the

native system usage profile into the virtualized one

• Perform an additional analysis to filter out microbenchmark data with high error against the obtained regression-based model

Page 6: Profiling and Modeling Resource Usage of Virtualized Applications Timothy Wood 1, Ludmila Cherkasova 2, Kivanc Ozonat 2, and Prashant Shenoy 1 1 University

6

Problem Definition

• Server consolidation is an approach to reduce the total number of servers – in response to the problem of server sprawl (a situation in which

multiple, underutilized servers take up more space and consume more resources than can be justified by their workloads)

• Virtual Machine Monitors (VMMs) enable diverse applications – to run in isolated environments on a shared hardware platform– provide a degree of fault and performance isolation between the

applications

Page 7: Profiling and Modeling Resource Usage of Virtualized Applications Timothy Wood 1, Ludmila Cherkasova 2, Kivanc Ozonat 2, and Prashant Shenoy 1 1 University

7

Problem Definition

• A typical approach for evaluating which workloads can be efficiently consolidated together – based on multi-dimensional “binpacking” of resource usage traces– application is characterized by its CPU, I/0 and memory usage– finds a combination of workloads with resource requirements (not exceed the available server resources)

• Resource requirements can increase due to virtualization overheads

• It is important to know what an application’s resource needs are going to be prior to transitioning it to the virtual environment

Page 8: Profiling and Modeling Resource Usage of Virtualized Applications Timothy Wood 1, Ludmila Cherkasova 2, Kivanc Ozonat 2, and Prashant Shenoy 1 1 University

8

Xen and VMware ESX server

• Two popular I/O models for VMs

Page 9: Profiling and Modeling Resource Usage of Virtualized Applications Timothy Wood 1, Ludmila Cherkasova 2, Kivanc Ozonat 2, and Prashant Shenoy 1 1 University

9

Problem Definition

• We focus on estimating only CPU utilization since other metrics (such as disk and network request rates) are not directly impacted by the virtualization

?

Page 10: Profiling and Modeling Resource Usage of Virtualized Applications Timothy Wood 1, Ludmila Cherkasova 2, Kivanc Ozonat 2, and Prashant Shenoy 1 1 University

10

Our Approach

• Automated robust model generation• Run benchmark set on native and virtual platforms– Performs a range of I/O and CPU intensive tasks– Gather resource traces

• Build model of Native --> Virtual relationship– Use linear regression techniques– Model is specific to platform, but not applications

Page 11: Profiling and Modeling Resource Usage of Virtualized Applications Timothy Wood 1, Ludmila Cherkasova 2, Kivanc Ozonat 2, and Prashant Shenoy 1 1 University

11

Platform Profiling

• Microbenchmark Requirements:• must be able to apply a range of workload intensities

– creating a suite of microbenchmarks that can be configured to generate workloads of different intensities

i.e., capable of generating different networking/disk access rates and consume different CPU amounts

• should run nearly-identical in both native and virtual environments – avoid benchmarks with a strong feedback loop since virtualization

overheads may increase latency and distort the resource usage over time

– our models are primarily designed for open loop applications

Page 12: Profiling and Modeling Resource Usage of Virtualized Applications Timothy Wood 1, Ludmila Cherkasova 2, Kivanc Ozonat 2, and Prashant Shenoy 1 1 University

12

Platform Profiling

• Microbenchmark Workloads:• Using a client-server style setup in our benchmarks• Benchmark types:

– CPU-intensive: calculates Fibonacci series– Network-intensive: download and upload files– Disk-intensive: read and write files

• Split each of the basic benchmark types into five different intensities ranging from 10% load to 90% load– maximum load that a server can handle is determined by increasing

the benchmark requests until either the virtual machine or Dom-0 CPU becomes saturated

• Simplicity of implementation based on httperf, Apache Jmeter, Apache Web Server and PHP

Page 13: Profiling and Modeling Resource Usage of Virtualized Applications Timothy Wood 1, Ludmila Cherkasova 2, Kivanc Ozonat 2, and Prashant Shenoy 1 1 University

13

Platform Resource Usage Profiles• Gather resource utilization traces to define the platform

profile used as the training data for the model– Within the native system, gather information about eleven different

resource metrics (they can easily be gathered with low overhead)

– Prior to Xen version 3.0.3, incoming network packets were passed between Dom-0 and Dom-U by flipping ownership of memory pages– Newer versions of Xen directly copy packets from Dom-0 to Dom-U

Page 14: Profiling and Modeling Resource Usage of Virtualized Applications Timothy Wood 1, Ludmila Cherkasova 2, Kivanc Ozonat 2, and Prashant Shenoy 1 1 University

14

Model Generation

• Two models are created: – Predicts the CPU requirement of the virtual machine running the

application– Predicts the Dom0 CPU requirements when it performs I/O processing

on behalf of the guest domain

• The model creation employs the following three key components– A robust linear regression algorithm that is used to lessen the impact

of outliers– A stepwise regression approach that is employed to include only the

most statistically significant metrics – A model refinement algorithm that is used for post-processing the

training data to eliminate or rerun erroneous benchmarks

Page 15: Profiling and Modeling Resource Usage of Virtualized Applications Timothy Wood 1, Ludmila Cherkasova 2, Kivanc Ozonat 2, and Prashant Shenoy 1 1 University

15

Model Creation

Model VM:

Set of equations to solve:

Model Dom-0:

Set of equations to solve:

Page 16: Profiling and Modeling Resource Usage of Virtualized Applications Timothy Wood 1, Ludmila Cherkasova 2, Kivanc Ozonat 2, and Prashant Shenoy 1 1 University

16

Stepwise Linear Regression

• To decrease the impact of occasional bad measurements and outliers (reweighted least squares)[12]– uses a bisquare weighting function which lessens the weight and the

impact of data points with high error

• To create a model which utilizes only the statistically significant metrics and avoids overfitting the data– use stepwise linear regression to determine which set of input

metrics are the best predictors for the output variable– starts with an empty model, and iteratively selects a new metric to

add based on a significance test– (ex. VM: User Space CPU, Kernel CPU, RX Packets)

12. P. W. Holland and R. E. Welsch. Robust regression using iteratively reweightedleast-squares. In Communications in Statistics - Theory and Methods 6.9. Oct. 07.

Page 17: Profiling and Modeling Resource Usage of Virtualized Applications Timothy Wood 1, Ludmila Cherkasova 2, Kivanc Ozonat 2, and Prashant Shenoy 1 1 University

17

Model Refinement

• All measurements within a microbenchmark are corrupt– due to unexpected background processes on the server, timing errors

at the client, or network issues

• At runtime, it can be very difficult to determine whether a benchmark is executed correctly– until all benchmarks have been run and determine if some

benchmarks have anomalous behavior– Compute the mean squared error for all microbenchmarks – the standard deviation of the squared errors – the model created from the full benchmark set is applied back to each

microbenchmark individually to calculate the mean squared error for that benchmark

Page 18: Profiling and Modeling Resource Usage of Virtualized Applications Timothy Wood 1, Ludmila Cherkasova 2, Kivanc Ozonat 2, and Prashant Shenoy 1 1 University

18

Model Application

• Once a model has been created, it can be applied to resource utilization traces of other applications in order to predict what their CPU requirements would be if transferred to the virtual environment

• Resource usage traces of the application are obtained by monitoring the application in its native environment over time

(eleven resource metrics )

Page 19: Profiling and Modeling Resource Usage of Virtualized Applications Timothy Wood 1, Ludmila Cherkasova 2, Kivanc Ozonat 2, and Prashant Shenoy 1 1 University

19

Evaluation: Implementation Details

• Two hardware platforms– HP ProLiant DL385, 2-way AMD Opteron, 2.6GHz, 64-bit– HP ProLiant DL580, 4-way Intel Xeon, 1.6GHz, 32-bit

• Two applications:– RUBiS (auction site, modeled after e-Bay)– TPC-W (e-commerce site, modeled after Amazon.com)

• Monitoring – Native: sysstat– Virtual: xenmon and xentop– Measurements: 30 sec intervals

Page 20: Profiling and Modeling Resource Usage of Virtualized Applications Timothy Wood 1, Ludmila Cherkasova 2, Kivanc Ozonat 2, and Prashant Shenoy 1 1 University

20

Evaluation: Importance of Modeling I/O

• Is it necessary to look at resources other than just total CPU?• How accurate such a simplified model for predicting the CPU

requirement of VM ?

5% 65%

Page 21: Profiling and Modeling Resource Usage of Virtualized Applications Timothy Wood 1, Ludmila Cherkasova 2, Kivanc Ozonat 2, and Prashant Shenoy 1 1 University

21

Evaluation: Importance of Modeling I/O

• The CPU intensive application exhibits only a small virtualization overhead occurring for the VM CPU requirements and Dom-0 also has relatively low CPU needs

• The network intensive application has a significantly higher requirement in Dom-0 as well as a much larger increase in VM CPU requirements relative to the native CPU utilization

Page 22: Profiling and Modeling Resource Usage of Virtualized Applications Timothy Wood 1, Ludmila Cherkasova 2, Kivanc Ozonat 2, and Prashant Shenoy 1 1 University

22

Evaluation: Benchmark Coverage

• Using a subset of benchmarks leads to a poor accuracy model

Page 23: Profiling and Modeling Resource Usage of Virtualized Applications Timothy Wood 1, Ludmila Cherkasova 2, Kivanc Ozonat 2, and Prashant Shenoy 1 1 University

23

Evaluation: Benchmark Error Detection

• Automatic benchmark elimination can increase model accuracy

Page 24: Profiling and Modeling Resource Usage of Virtualized Applications Timothy Wood 1, Ludmila Cherkasova 2, Kivanc Ozonat 2, and Prashant Shenoy 1 1 University

24

Evaluation: Model Accuracy

• Create a variable rate workload for RUBiS by incrementally spawning clients over a 30 minute period repeat twice

• The system is loaded by between 150 and 700 simultaneous clients

on the Intel system

Page 25: Profiling and Modeling Resource Usage of Virtualized Applications Timothy Wood 1, Ludmila Cherkasova 2, Kivanc Ozonat 2, and Prashant Shenoy 1 1 University

25

Evaluation: Cross Platform Modeling

• Using a single model for different architectures is ineffective (apply the model for the Intel system to the AMD system)

Page 26: Profiling and Modeling Resource Usage of Virtualized Applications Timothy Wood 1, Ludmila Cherkasova 2, Kivanc Ozonat 2, and Prashant Shenoy 1 1 University

26

Evaluation: Cross Platform Modeling

• the Intel system requires approximately 1.7 times as much CPU in the virtual case as it does natively (AMD 1.4 times)

Page 27: Profiling and Modeling Resource Usage of Virtualized Applications Timothy Wood 1, Ludmila Cherkasova 2, Kivanc Ozonat 2, and Prashant Shenoy 1 1 University

27

Discussion: Application Behavior• Impact of application behavior on resource use

• processing time indicated by the width of the rectangles• a is the time from the start of one request until the start of the next• b is the time from the end of one request to the start of the next

• the estimated resource utilization produced by our model for the application with a feedback loop might be higher than in reality– Such an application might consume CPU resources in virtualized

environment slower than in native

Page 28: Profiling and Modeling Resource Usage of Virtualized Applications Timothy Wood 1, Ludmila Cherkasova 2, Kivanc Ozonat 2, and Prashant Shenoy 1 1 University

28

Understanding Application Performance

• The models– can accurately predict the changes in resource requirements for a virtualized

application– cannot directly model how application performance will change (response time)

• To accurately predict this performance change would necessitate carefully tailored, application specific models

• Our approach helps in estimating the resource requirements that are necessary for the initial application placement in VM– After, specialized workload management tools may be used [15, 13] to

dynamically adjust system resources to support the required application performance

15. IBM Enterprise Workload Manager http://www.ibm.com/developerworks/autonomic/ewlm13. HP-UX Workload Manager http://hp.com/products1/unix/operating/wlm/

Page 29: Profiling and Modeling Resource Usage of Virtualized Applications Timothy Wood 1, Ludmila Cherkasova 2, Kivanc Ozonat 2, and Prashant Shenoy 1 1 University

29

Conclusion

• This work designed – an automated approach for profiling different types of virtualization

overhead on a given platform– A regression-based model that maps the native system profile into a

virtualized one

• The evaluation shows – our automated model generation procedure effectively characterizes

the different virtualization overheads of two diverse hardware platforms

– have a median prediction error of less than 5% for both the RUBiS [3] and TPC-W [31] benchmarks