xen and co. : communication-aware cpu scheduling for consolidated xen-based hosting platforms

32
1 Xen and Co.: Communication-aware CPU Scheduling for Consolidated Xen-based Hosting Platforms Sriram Govindan, Arjun R Nath, Amitayu Das, Bhuvan Urgaonkar, Anand Sivasubramaniam, Computer Systems Laboratory, The Pennsylvania State University.

Upload: rowa

Post on 11-Feb-2016

24 views

Category:

Documents


0 download

DESCRIPTION

Xen and Co. : Communication-aware CPU Scheduling for Consolidated Xen-based Hosting Platforms. Sriram Govindan, Arjun R Nath, Amitayu Das, Bhuvan Urgaonkar, Anand Sivasubramaniam, Computer Systems Laboratory, The Pennsylvania State University. Data centers. Rent server resources - PowerPoint PPT Presentation

TRANSCRIPT

Page 1: Xen and Co. : Communication-aware CPU Scheduling for Consolidated Xen-based Hosting Platforms

1

Xen and Co.: Communication-aware CPU Scheduling for Consolidated Xen-based Hosting Platforms

Sriram Govindan, Arjun R Nath,Amitayu Das,Bhuvan Urgaonkar,Anand Sivasubramaniam,

Computer Systems Laboratory,The Pennsylvania State University.

Page 2: Xen and Co. : Communication-aware CPU Scheduling for Consolidated Xen-based Hosting Platforms

2

Data centers

Rent server resources Provide resource and

performance guarantees

Problem: Server sprawl

Solution: Consolidation Reduce resource wastage Reduced floor space Better power management

How?

Page 3: Xen and Co. : Communication-aware CPU Scheduling for Consolidated Xen-based Hosting Platforms

3

Linux

Hardware Hardware

Windows

Server virtualization

2-tierede-commerceapplication

Single tier streaming

server

Operatingsystem

Applications

VMM

Ability to create multiple virtual servers from a single physical server

Allows consolidation by hosting heterogeneous OS instances over the same hardware

Why now? Emergence of highly efficient

virtual machine monitors Xen, VMware etc

Hardware support Intel, AMD, IBM etc

Real world example: Amazon EC2

Page 4: Xen and Co. : Communication-aware CPU Scheduling for Consolidated Xen-based Hosting Platforms

5

Consolidation: Example Consider a representative e-commerce benchmark,

TPC-W, an online book store application Measure application resource needs and record

performance, Run TPC-W tiers on dedicated servers

Hardware HardwareVMMVMMClient

s

Jboss Mysql...

Query

Response

RequestsRecord

responsetimes

Recordresource

usage

Responses

Page 5: Xen and Co. : Communication-aware CPU Scheduling for Consolidated Xen-based Hosting Platforms

6

Consolidation: Example

Hardware HardwareVMMVMMClient

s

Jboss Mysql...CPU

utilization95th Percentile

Jboss ~10%Mysql ~20% Response time in seconds

CDF

Page 6: Xen and Co. : Communication-aware CPU Scheduling for Consolidated Xen-based Hosting Platforms

7

Consolidation: Example

Hardware Hardware

VMMVMM

Jboss mysql

Clients

...

Resource underutilizedCPU

intensiveVMs

Consolidate the TPC-W tiers on to a single server Use Hypervisor to ensure resource guarantees

Reserve for the peak requirement Pack more applications to utilize the remaining server capacity

10% 20%Almost 100%

ServerUtilization

Other resource requirements are also met

Page 7: Xen and Co. : Communication-aware CPU Scheduling for Consolidated Xen-based Hosting Platforms

8

Consolidation: Example

Clients

...

Hardware

VMM

Jbossmysql

CPUintensive

VMs

Response time in seconds

CDF

With consolidation

Withoutconsolidation

Why did this happen?

Page 8: Xen and Co. : Communication-aware CPU Scheduling for Consolidated Xen-based Hosting Platforms

9

Scheduler induced delays

Jboss

DB

query1

reply1

query2

reply2

Network latency

TPC-W tiers running on dedicated servers

Page 9: Xen and Co. : Communication-aware CPU Scheduling for Consolidated Xen-based Hosting Platforms

10

Scheduler induced delays

Jboss

DB

query1

reply1

query2

reply2

Network latency

Jboss

DB

query1

reply1

query2

reply2

Scheduler induced delays

TPC-W tiers running on dedicated servers

ConsolidatedTPC-W tiers

Page 10: Xen and Co. : Communication-aware CPU Scheduling for Consolidated Xen-based Hosting Platforms

11

Does this look familiar?

Parallel systems: Gang scheduling/Co-scheduling Feitelson et al, Ousterhout et al, Andrea et al

Schedulers: low latency dispatch eg. BVT, Duda et al

Our contribution: Fairness guarantees – Applications pay for resources Self-tuning - reduced administrator intervention

Adapt to varying application’s I/O behaviour Network I/O is virtualized – further increases the

delays

Page 11: Xen and Co. : Communication-aware CPU Scheduling for Consolidated Xen-based Hosting Platforms

12

Xen Virtual Machine Monitor

Xen Hypervisor

Domain 0/Driver domain

ModifiedGuest OS

ModifiedGuest OS

ModifiedGuest OS

…Virtual

machines

I/O virtualization

VM scheduler

Virtual hardware (vCpu, vDisk, vNic, vMemory etc.)

Physical hardware (Cpu, Disk, Nic, Memory etc.)

ApplicationsApplications Applications

Page 12: Xen and Co. : Communication-aware CPU Scheduling for Consolidated Xen-based Hosting Platforms

13

Network Virtualization in Xen - Reception

NIC

Netback driver

Netfront Driver

Hardware driversdomain0

Guest VM

Hypervisor

Application

Interrupt

Notify

VirtualInterrupt

Packetdelivery

Page 13: Xen and Co. : Communication-aware CPU Scheduling for Consolidated Xen-based Hosting Platforms

14

Network Virtualization in Xen - Transmission

NIC

Netback driver

Netfront Driver

Hardware driversdomain0

Guest VM

ApplicationPacket

send

Send overvirtual NIC

Send over NIC

Page 14: Xen and Co. : Communication-aware CPU Scheduling for Consolidated Xen-based Hosting Platforms

15

Scheduler induced Delays

Delay associated with scheduling of Domain0 When a guest domain transmits a packet When a packet is received at the physical NIC

Jboss

Issues a query to db

dom0

DBdom0

Page 15: Xen and Co. : Communication-aware CPU Scheduling for Consolidated Xen-based Hosting Platforms

16

Scheduler induced Delays

Delay associated with scheduling of Domain0

Delay at the recipient When Domain0 sends a packet to a guest domain

Jboss

Issues a query to db

dom0

DBdom0

Page 16: Xen and Co. : Communication-aware CPU Scheduling for Consolidated Xen-based Hosting Platforms

17

Scheduler induced Delays

Delay associated with scheduling of Domain0

Delay at the recipient Delay at the sender

Before a domain sends a network packet (on its virtual NIC).

Unlike reception, sending a packet can only be anticipated.

Page 17: Xen and Co. : Communication-aware CPU Scheduling for Consolidated Xen-based Hosting Platforms

18

Scheduler induced Delays

Delay associated with scheduling of Domain0 Delay at the recipient Delay at the sender

Network latency

Jboss

DB

query reply

Scheduler induced delays with virtualization overhead Consolidated TPC-W

tiers in a virtualized

environment

dom0

dom0 dom0

dom0 Jboss

Page 18: Xen and Co. : Communication-aware CPU Scheduling for Consolidated Xen-based Hosting Platforms

19

Scheduler design

Recall: Reservations must be provided Build on top of a reservation based scheduler -SEDF

(slice, period) pair – need ‘slice ms’ every ‘period ms’

Communication aware SEDF scheduler: Enhance CPU scheduler to reduce scheduler induced

delays Change scheduling order to preferentially schedule

communicating domains Introduce short term unfairness

Still preserve reservation guarantees over a coarser time scale - PERIOD

Page 19: Xen and Co. : Communication-aware CPU Scheduling for Consolidated Xen-based Hosting Platforms

20

Scheduler Implementation

Key idea: Associate impending network activity with each

virtual machine Incorporate communication activity in to decision

making Greedy Heuristic:

Prefer VM that is likely to benefit the most – the VM with most pending packets

Page 20: Xen and Co. : Communication-aware CPU Scheduling for Consolidated Xen-based Hosting Platforms

21

Communication aware scheduler

Domain0

… Guest Domains

Domain 1Domain 2 Domain n

- Reception

NIC

Packet arrive at the NIC

Interrupt

Domain0.pending++

Domain1.pending++

Now, schedule domain0.Schedule Domain 1.

Hypervisor

Domain0.pending--

domain1.pending--

Page 21: Xen and Co. : Communication-aware CPU Scheduling for Consolidated Xen-based Hosting Platforms

22

Evaluation Environment

Applications: TPC-W benchmark

jboss and mysql tiers Multi-threaded UDP Streaming server,

Simultaneously stream data at 3Mbps to specified number of clients

Every client is provided with a 8MB buffer size Clients starts consuming data only when the

buffer is full CPU intensive workloads,

Used for illustrative purposes

Page 22: Xen and Co. : Communication-aware CPU Scheduling for Consolidated Xen-based Hosting Platforms

23

Streaming media experiments - performance improvement

Streaming to 45 Clients at 3Mpbs for 20 minutes

Default scheduler suffered playback discontinuity every 1.5 minutes

Page 23: Xen and Co. : Communication-aware CPU Scheduling for Consolidated Xen-based Hosting Platforms

24

Streaming media experiments - performance improvement

Streaming to 45 Clients at 3Mpbs for 20 minutes

Default scheduler suffered playback discontinuity every 1.5 minutes

Communication-aware scheduler suffered a discontinuity only after 18th minute

Page 24: Xen and Co. : Communication-aware CPU Scheduling for Consolidated Xen-based Hosting Platforms

25

Streaming media experiments - improved consolidation

A single buffer under run at the client is fixed as Service Level Objective (SLO)

Communication aware scheduler is able to sustain 30 more clients than the default scheduler

No. of clients supported at the server

No. o

f buff

er u

nder

runs

at t

he c

lient

“SLO”

( Lower the better )

Page 25: Xen and Co. : Communication-aware CPU Scheduling for Consolidated Xen-based Hosting Platforms

26

TPC-W performance

TPC-W benchmark ran for 20 minutes Around 35 percent improvement in response time

compared to the default scheduler

Scheduler Average (secs)

95th percentile (secs)

Maximum (secs)

Default SEDF

1.3 7.1 26.1

Modified SEDF

0.8 5.7 12.8Percentage

improvement

34.11 % 19.98 % 51.15 %

Page 26: Xen and Co. : Communication-aware CPU Scheduling for Consolidated Xen-based Hosting Platforms

27

Scheduler Fairness Evaluation

CPU intensive Virtual Machine

The CPU intensive VM lost less than 1% of CPU compared to the default scheduler but was still above their reservation which was 10%

Just changing the order of scheduling resulted in huge response time improvement for the streaming server

Time in minutes

CPU

utiliz

atio

n

Reservation

Default SEDF

Modified SEDF

Page 27: Xen and Co. : Communication-aware CPU Scheduling for Consolidated Xen-based Hosting Platforms

28

Conclusion

A communication-aware CPU scheduler developed for a consolidated environment

Low overhead run-time monitoring of network events by the hypervisor scheduler

Addressed additional problems due to network I/O virtualization in Xen

Source code (~300 lines) and Xen3.0.2 Patch available in the software link in,

http://csl.cse.psu.edu/

Page 28: Xen and Co. : Communication-aware CPU Scheduling for Consolidated Xen-based Hosting Platforms

29

Questions

Page 29: Xen and Co. : Communication-aware CPU Scheduling for Consolidated Xen-based Hosting Platforms

30

Streaming media experiments - performance improvement

Streaming to 45 Clients at 3Mpbs for 20 minutes

Default scheduler suffered glitches every 1.5 minutes

Communication-aware scheduler suffered a glitch only after 18th minute

With only domain0 optimization ON, glitch occurred at the 15th minute

Page 30: Xen and Co. : Communication-aware CPU Scheduling for Consolidated Xen-based Hosting Platforms

31

Communication aware scheduler

Domain0

… Guest Domains

HypervisorDomain0’s book-keeping page

Domain 1Domain 2 Domain n

Guest domainbook-keeping

pages

Page 31: Xen and Co. : Communication-aware CPU Scheduling for Consolidated Xen-based Hosting Platforms

32

Communication aware scheduler

Domain0

… Guest Domains

HypervisorDomain0’s book-keeping page

Domain 1Domain 2 Domain n

- Reception

NIC

Packet arrive at the NIC

Interrupt

Domain0: network_reception_intensity++

Domain 1: network_reception_intensit

y++

Now, schedule domain0.

Domain 0 is de scheduled, now we are in the hypervisor.Schedule Domain 1.

Receivepackets.

Domain 1 is de scheduled, now we are in the hypervisor.

UpdatePacket reception.

Updatependingactivity.

Page 32: Xen and Co. : Communication-aware CPU Scheduling for Consolidated Xen-based Hosting Platforms

33

Communication aware scheduler

Domain0

… Guest Domains

HypervisorDomain0’s book-keeping page

Domain 1Domain 2 Domain n

- Transmission

Domain1: network_transmissio

nintensity++

Domain0:network_transmission

intensity++

Domain1:anticipated_network

transmission_intensity++Now domain 1 is de scheduled, we are in the hypervisor.