generating adaptation policies for multi-tier applications in consolidated server environments

24
Generating Adaptation Policies for Multi-Tier Applications in Consolidated Server Environments College of Computing Georgia Institute of Technology Gueyoung Jung , Calton Pu AT&T Labs Research Kaustubh Joshi, Matti Hiltunen, Richard Schlichting

Upload: ethan

Post on 19-Mar-2016

48 views

Category:

Documents


0 download

DESCRIPTION

Generating Adaptation Policies for Multi-Tier Applications in Consolidated Server Environments. Gueyoung Jung , Calton Pu. College of Computing Georgia Institute of Technology. Kaustubh Joshi, Matti Hiltunen, Richard Schlichting. AT&T Labs Research. Challenges. - PowerPoint PPT Presentation

TRANSCRIPT

Page 1: Generating Adaptation Policies for Multi-Tier Applications in Consolidated Server Environments

Generating Adaptation Policiesfor Multi-Tier Applications

in Consolidated Server Environments

College of ComputingGeorgia Institute of Technology

Gueyoung Jung, Calton Pu

AT&T Labs Research

Kaustubh Joshi, Matti Hiltunen, Richard Schlichting

Page 2: Generating Adaptation Policies for Multi-Tier Applications in Consolidated Server Environments

Page 2April 24, 2009

Challenges

Prior Approaches• On-line controller (with stochastic models,

reinforcement learning, control theory)

• Rule-based expert systems

Problem: Dynamically re-configuring systems to rapidly changing conditions

☞ lack transparency and predictability

☞ hard to maintain linkage to underlying systems

Hybrid approach to bridge both worlds

Page 3: Generating Adaptation Policies for Multi-Tier Applications in Consolidated Server Environments

Page 3April 24, 2009

Challenges (contd.)

Promising cost-effectiveness and high resource utilization

Focus: Dynamic resource provisioning in virtualized consolidated data centers hosting multiple multi-tier applications

However, with unpredictable workloads More complex models required Larger optimization space of possible system

configurations More sophisticated adaptation policies

required

Page 4: Generating Adaptation Policies for Multi-Tier Applications in Consolidated Server Environments

Page 4April 24, 2009

Runtime Resource Management

Monitoring- Request Rates- Resource utilization- Response times etc.

Making decisions- Evaluating monitoring results- Adaptive systems

Acting/Adapting - Start/stop processes (e.g., adjust replication degree of a component)- Migrate processes- Adjust CPU allocation (e.g., virtual machine technology)

Shared Resource Poolwith applications

Page 5: Generating Adaptation Policies for Multi-Tier Applications in Consolidated Server Environments

Page 5April 24, 2009

How to Use Models for Decision MakingMaking decisions

Model Inline (MIL) Model(s) evaluated at runtime given current

system workload as input The rewards for alternative configurations can

be calculated to determine a better configurationModel Offline (MOL)

Model(s) evaluated before system deployment using various workloads as inputs

Optimal configuration determined for each different workload mix

Adaptation rules generated based on model outputs

Page 6: Generating Adaptation Policies for Multi-Tier Applications in Consolidated Server Environments

Page 6April 24, 2009

MOL vs. MILMOL Rules can be inspected by system administrators

and domain experts Resulting rules can be used by existing rule-

based management systems The time and compute intensive model

evaluation is out of critical path (offline), while rules can be evaluated very quickly at runtime

MIL Potentially more accurate (evaluate exactly with

the current load and configuration) Model parameters can be updated at runtime

Page 7: Generating Adaptation Policies for Multi-Tier Applications in Consolidated Server Environments

Page 7April 24, 2009

Proposing a hybrid approach

Automatically generating adaptation rules offline

Efficiently supporting an adaptive system for dynamic resource provisioning

MOL in Action: Our Contributions

☞ Layered queueing models for Xen-based virtualization☞ Novel optimization technique

☞ Accurate even with a subset of possible scenarios

☞ Compact, human-readable

☞ Best of both worlds

☞ Fine-grained resource (re)allocation

Page 8: Generating Adaptation Policies for Multi-Tier Applications in Consolidated Server Environments

Page 8April 24, 2009

Approach Overview

Formal problem statement, then discuss steps bottom up.

Application 2Application 1

modeling

Model solver(LQNS)

Optimizer

Rule constructor

workloadoptimal feasibleconfiguration

response time,utilization

workload,configuration

rules

request rate actions

Page 9: Generating Adaptation Policies for Multi-Tier Applications in Consolidated Server Environments

Page 9April 24, 2009

Formal Problem Statement (1/2)Given A set of computing resources R A set of applications A:

• each application consists of a set of components (tiers)• each component has a set of possible replication

degrees• each application supports multiple transaction types

For each transaction type:• transaction graph describing interactions between

components and service time in each component For each transaction of each application:

• Utility function defined using the desired (mean) response time and the reward/penalty for meeting/missing this time

Page 10: Generating Adaptation Policies for Multi-Tier Applications in Consolidated Server Environments

Page 10April 24, 2009

Example: RUBiSRUBiS: a Java-based 3 tier auction site benchmark,

CPU-intensive

Clients ApacheTomcat

TomcatMySQL

1 1 1241

AboutMe Transaction

1

Home Transaction

26 different transaction types with different behaviors

Clients

Clients

Apache Tomcat MySQL

Apache

Page 11: Generating Adaptation Policies for Multi-Tier Applications in Consolidated Server Environments

Page 11April 24, 2009

Formal Problem Statement (2/2)Measured at runtime: Workload (request rate) of each transaction type

Goal: Configure the set of applications A on the

resources R Maximize utility U = ∑i∈A ∑j∈Ti Uij

Uij = wij Rij [or Pij] (TRTij − MRTij ) Configuration:

• Degree of replication for each component• Virtual machine parameters (e.g., CPU reservation)• Placement of VMs on the physical machines R( a VM contains a replica of a component of an

application)

Page 12: Generating Adaptation Policies for Multi-Tier Applications in Consolidated Server Environments

Page 12April 24, 2009

Example: RUBiS

Apache Tomcat MySQLApplication components:

Logical configuration:Apache

Tomcat

ApacheTomcat MySQL

Tomcat.15

.32

Physical configuration:

HardwareHypervisor

HardwareHypervisor

HardwareHypervisor

.16.29

.70

.39

Page 13: Generating Adaptation Policies for Multi-Tier Applications in Consolidated Server Environments

Page 13April 24, 2009

Application Modeling

Modeling layered, multi-tier software systems

Modeling virtualization overhead• Xen-based virtual machine monitor

Modeling simultaneous resource possession between components

Application 2Application 1

modeling

Page 14: Generating Adaptation Policies for Multi-Tier Applications in Consolidated Server Environments

Page 14April 24, 2009

Layered Queueing ModelLegendFunction Call

InstrumentationResource Use

Apache Server 0.5Tomcat Server

MySQL ServerTomcat Server

Net

CPU

VMM

Apache

DiskDisksdisk

sapache

sint

1 10.5

1

ndisk

ntomcat

Net

CPU

VMM

Tomcat

DiskDisksdisk

stomcat

sint

1

1

ndisk

ntomcat

Net

CPU

VMM

MySQL

DiskDisksdisk

stomcat

sint

1

1

ndisk

1Client

LD_PRELOAD Instrumentation

Servlet.jar InstrumentationNetwork Ping Measurement

Modeling CPU, network I/O, Disk I/O, and the per-message delay of virtual

machine monitorParameterizing models at training phase without intrusive instrumentation

Page 15: Generating Adaptation Policies for Multi-Tier Applications in Consolidated Server Environments

Page 15April 24, 2009

Model Validation (1/3)

0

0.1

0.2

0.3

0.4

0.5

0.6

0.7

0.8

0.9

1

100 200 300 400 500

Resp

onse

Tim

e (s

)

Number of Concurrent UsersViewUserInfo (Experiment) ViewUserInfo (Model)Overall (Experiment) Overall (Model)BrowseCategories (Experiment) BrowseCategories (Model)

Model predicts response time at different request rates (fixed configuration)

Page 16: Generating Adaptation Policies for Multi-Tier Applications in Consolidated Server Environments

Page 16April 24, 2009

Model Validation (2/3)

0

0.05

0.1

0.15

0.2

0.25

0.3

0.35

0.4

0.45

0.5

30 40 50 60 70 80

Res

pons

e Ti

me

(s)

CPU Allocation (% )

ViewUserInfo (Experiment) ViewUserInfo (Model) Overall (Experiment )Overall (Model) BrowseCat (Experiment) BrowseCat (Model)

Model predicts response time at different CPU allocations

Page 17: Generating Adaptation Policies for Multi-Tier Applications in Consolidated Server Environments

Page 17April 24, 2009

Model Validation (3/3)

00.050.1

0.150.2

0.250.3

0.350.4

0.450.5

100 200 300 400 500

CPU

Uti

lizat

ion

Number of Concurrent UsersApp. Server (Experiment) App. Server (Model) DB Server (Experiment)DB Server (Model) Web Server (Experiment) Web Server (Model)

Model predicts CPU utilization at different tiers at different request rates (fixed configuration)

Page 18: Generating Adaptation Policies for Multi-Tier Applications in Consolidated Server Environments

Page 18April 24, 2009

Optimization For a given workload, find the configuration with the maximum utilityHuge parameter space to explore, NP-Complete problem

Key Techniques: Decouple logical configuration from physical

component placement Start from maximum configuration, search an

optimal path that fits logical configuration into physical resources

Observations: Response time is monotonic function of number

of replicas and CPU fraction

Model solver

Optimizerresponse time,utilization

workload,configuration

Page 19: Generating Adaptation Policies for Multi-Tier Applications in Consolidated Server Environments

Page 19April 24, 2009

Optimization Algorithm Maximum configuration:

– Each component of each application has the maximum number of replicas, each with 100% of a CPU of their own.

– Use model solver to get actual resource utilizations and the response times (for calculating utility U).

Algorithm:1. Use bin-packing algorithm to find out if the

utilizations can be fitted in the actual resources R.2. If not, evaluate possible alternatives for reducing

utilization:• Reduce number of replicas for some component• Reduce CPU fraction for some virtual machine

by 5%3. Determine the actual utilizations and utility for the

different options.4. Choose the one that maximizes:

5. Repeat until configuration found

UU oldnew

kji kjioldnew

,, ,,

Page 20: Generating Adaptation Policies for Multi-Tier Applications in Consolidated Server Environments

Page 20April 24, 2009

Optimality of Generated Policies

P(Utility > x)

0

0.2

0.4

0.6

0.8

1

-120000 -100000 -80000 -60000 -40000 -20000 0Utility

Prob

abili

ty

0

0.0002

0.0004

2255 2260 2265 2270 2275

2272.94

Compare selected configuration against 20,000 random configurations

Page 21: Generating Adaptation Policies for Multi-Tier Applications in Consolidated Server Environments

Page 21April 24, 2009

Rule-Set Construction

Rule Constructor: Randomly generates a set of workloads

WS based on SLA for each application Invokes optimizer to find optimal

configuration c for each w WS Gives (w, c) pairs (raw rule-set) still need

interpolation for workloads WS Use decision tree learner to generate decision tree Linearize into nested “if-then-else” rule-

set

Optimizer

Rule constructor

workload optimal feasibleconfiguration

rules

if (app0-Home <= 0.113882) if (app1-Home <= 0.086134) if (app1-Browse > 0.051189) if (app0-Home > 0.023855) if (app1-Browse <= 0.175308) if (app0-BrowseRegions <= 0.05698) config = "h0a0c2h1a1c2a0c0h2a0c1a1c1a1c0"; if (app0-BrowseRegions > 0.05698) if (app1-Browse <= 0.119041) if (app1-Browse <= 0.086619) config = "h0a0c2h1a1c2a0c0a1c0h2a0c1a1c1"; …….

Page 22: Generating Adaptation Policies for Multi-Tier Applications in Consolidated Server Environments

Page 22April 24, 2009

Size of Rule-Set

The size of the rule set increases when the number of training set data points increases

0

500

1000

1500

2000

2500

200 800 1400 2000 2600

Rule

Set

Siz

e

Training Set Data Points2 Applications 3 Applications 4 Applications

Page 23: Generating Adaptation Policies for Multi-Tier Applications in Consolidated Server Environments

Page 23April 24, 2009

Utility Error

The utility error decreases, and then stabilizes, with number of training set data points

0

2

4

6

8

10

200 1000 2000 3000

Utili

ty e

rror

(%)

Training Set Data Points2 Applications 3 Applications 4 Applications

Page 24: Generating Adaptation Policies for Multi-Tier Applications in Consolidated Server Environments

Thank you! Questions?