I N C LOUD C OMPUTING Christina Delimitrou Stanford University - - PowerPoint PPT Presentation

i n c loud c omputing
SMART_READER_LITE
LIVE PREVIEW

I N C LOUD C OMPUTING Christina Delimitrou Stanford University - - PowerPoint PPT Presentation

I MPROVING R ESOURCE E FFICIENCY I N C LOUD C OMPUTING Christina Delimitrou Stanford University Defense May 26 th 2015 Resource efficiency is a first-order system constraint How efficiently do we utilize resources?


slide-1
SLIDE 1

Christina Delimitrou

Stanford University

Defense ¡– ¡May ¡26th ¡2015 ¡ ¡

IMPROVING RESOURCE EFFICIENCY IN CLOUD COMPUTING

slide-2
SLIDE 2

2

Resource efficiency is a first-order system constraint

How efficiently do we utilize resources? How efficiently do we design systems? How efficiently do we utilize resources?

slide-3
SLIDE 3

3

Why Care about Resource Efficiency?

Performance/Cost Performance/Cost Time Time

slide-4
SLIDE 4

4

~10K commodity servers Sophisticated cluster managers ~10s MWatts $100,000,000s Private clouds:

  • Google, Microsoft, Twitter, eBay

Public clouds:

  • Amazon EC2, Windows Azure, GCE
slide-5
SLIDE 5

5

¨ Flexibility

¤ Provision and launch new services in seconds

¨ High performance

¤ High throughput & low tail latency

¨ Cost effectiveness

¤ Low capital & operational expenses

Cloud computing scalability: high performance AND low cost

The Promise of Cloud Computing

slide-6
SLIDE 6

6

The Reality of Cloud Computing

slide-7
SLIDE 7

7

¨ Switch to commodity servers ¨ Improve cooling/power distribution ¨ Build more datacenters ¨ Add more servers ¨ Rely on processor technology

Scaling Datacenters

< 10% >$300M per datacenter End of voltage scaling One time trick Power limit

Use existing systems more efficiently

slide-8
SLIDE 8

8

Datacenter Underutilization

1 C. Delimitrou and C. Kozyrakis. Quasar: Resource-Efficient and QoS-Aware Cluster Management,

ASPLOS 2014.

2 L. A. Barroso, U. Holzle. The Datacenter as a Computer, 2013.

Twitter (Mesos)1 4-5x Google (Borg)2 3-5x

0 10 20 30 40 50 60 70 80 90 100 CPU Utilization (%)

slide-9
SLIDE 9

9

Datacenter Underutilization…

Is the cluster manager’s fault Is the user’s fault!

slide-10
SLIDE 10

10

Reserved vs. Used Resources

¨ Twitter: up to 5x CPU & up to 2x memory overprovisioning

3-5x 1.5-2x

slide-11
SLIDE 11

11

Reserved vs. Used Resources

¨ 20% of job under-sized, ~70% of jobs over-sized

~25,000 jobs 936 distinct users

[ASPLOS’14]

Reservation=Usage

slide-12
SLIDE 12

12

Datacenter Underutilization…

Is the user’s fault! (not really…)

slide-13
SLIDE 13

13

Resource Management is Hard

slide-14
SLIDE 14

14

Performance Depends on

Cores Performance Scale-up

slide-15
SLIDE 15

15

Performance Depends on

Cores Performance Heterogeneity

slide-16
SLIDE 16

16

Performance Depends on

Cores Performance Heterogeneity Servers Performance Scale-out

slide-17
SLIDE 17

17

Performance Depends on

Cores Performance Heterogeneity Servers Performance Scale-out Input size Performance Input load

slide-18
SLIDE 18

18

Performance Depends on

Cores Performance Heterogeneity Interference Performance Interference Input size Performance Input load Servers Performance Scale-out

When sw changes, when platforms change, etc.

Overprovision Reservations!

slide-19
SLIDE 19

19

Can we improve resource efficiency while preserving application QoS guarantees?

Potential: 3-5x efficiency; $10Ms in cost savings

slide-20
SLIDE 20

20

¨ Automate resource management

¤ Large, multi-dimensional space à Leverage big data

¨ General solution

¤ Different application types (batch, latency-critical) ¤ Different types of hardware

¨ Cross-layer design

¤ Architecture à OS à Scheduler à Application design

Requirements

slide-21
SLIDE 21

21

Contributions

slide-22
SLIDE 22

22

Scheduler Cluster Users

  • 1. Practical

data mining

Contributions

Paragon [ASPLOS’13, TopPicks’14]

[IISWC’13]

Resource reservations

slide-23
SLIDE 23

23

Scheduler Cluster

  • 2. High level

interface

  • 1. Practical

data mining

Contributions

Quasar [ASPLOS’14]

Resource reservations

Users

slide-24
SLIDE 24

24

Application assignment: Paragon [ASPLOS’13, TopPicks’14, CAL’13, IISWC’13] Cluster management: Quasar [ASPLOS’14]

Contributions

Systems:

slide-25
SLIDE 25

25

Application assignment: Paragon [ASPLOS’13, TopPicks’14], iBench [IISWC’13] Cluster management: Quasar [ASPLOS’14] Scalable scheduling: Tarcil [SOCC’15]

Contributions

Systems:

slide-26
SLIDE 26

26

Application assignment: Paragon [ASPLOS’13, TopPicks’14], iBench [IISWC’13] Cluster management: Quasar [ASPLOS’14] Scalable scheduling: Tarcil [SOCC’15] Cloud provisioning: Hybrid Cloud [in submission]

Contributions

Systems:

slide-27
SLIDE 27

27

Application assignment: Paragon [ASPLOS’13, TopPicks’14], iBench [IISWC’13] Cluster management: Quasar [ASPLOS’14] Scalable scheduling: Tarcil [SOCC’15] Cloud provisioning: Hybrid Cloud [in submission] Admission control: ARQ [ICAC’13]

Contributions

Systems:

slide-28
SLIDE 28

28

Application assignment: Paragon [ASPLOS’13, TopPicks’14], iBench [IISWC’13] Cluster management: Quasar [ASPLOS’14] Scalable scheduling: Tarcil [SOCC’15] Cloud provisioning: Hybrid Cloud [in submission] Admission control: ARQ [ICAC’13] Datacenter application modeling: ECHO [IISWC’12], Storage application modeling [CAL’12, IISWC’11,

ISPASS’11]

Contributions

Systems:

slide-29
SLIDE 29

29

Paragon

[ASPLOS’13, TopPicks’14]

Scheduler Cluster Practical data mining techniques Users Resource reservations

slide-30
SLIDE 30

30

Heterogeneity & Interference Matter

¨ Heterogeneity

¤ DCs provisioned over 15 years ¤ Multiple server generations &

configurations

¨ Interference

¤ Apps contend on shared resources n CPU & cache hierarchy n Memory system n Storage & network I/O

Ignore Heterogeneity Ignore Both

slide-31
SLIDE 31

31

¨ Naïve: exhaustive characterization ¤ ~10-20 platforms x 1,000 apps ¨ Looks like a recommendation problem

Extracting Resource Preferences

Users Scheduler Cluster Resource reservations

App App

Data

App App

Mine big data

App

slide-32
SLIDE 32

32

Recommendation Systems

¨ Content-based systems:

¤ Description of items (keywords, feature vector, etc. ) ¤ Profile of user preferences (history, model, user-system

interaction, etc. )

¨ Collaborative filtering:

¤ Uncover similarities between users and items ¤ No need to know item features or explicit user preferences in

advance

slide-33
SLIDE 33

33

Recommendation Systems

¨ Content-based systems:

¤ Description of items (keywords, feature vector, etc. ) ¤ Profile of user preferences (history, model, user-system

interaction, etc. )

¨ Collaborative filtering:

¤ Uncover similarities between users and items ¤ No need to know item features or explicit user preferences in

advance

slide-34
SLIDE 34

34

Something familiar…

¨ Collaborative filtering – similar to Netflix Challenge system

¤ Singular Value Decomposition (SVD) + PQ reconstruction (SGD)

Sparse utility matrix SVD PQ reconstruction Dense utility matrix movies users

5 4 1 3 2 4 1 5 2 3 3 5 2 3 1 3 5 4 5 4 3 3 4 1 5 3 3 3 4 3 5 2 4 1 2 2 1 3 5 5 3 1 1 4 2 3 4 3 2 3 2 4 3 5 5 5 2 1 3 4 5 3 4

Recommendations SVD movies

slide-35
SLIDE 35

35

SVD

a11 a12 ... a1n a21 a22 ... a2n     am1 am2 ... amn ! " # # # # # $ % & & & & &

u11 ... u1r    um1 ... umr ! " # # # # $ % & & & & σ1 ...    ... σ r ! " # # # # $ % & & & & v11 ... v1r    vn1 ... vnr ! " # # # # $ % & & & &

u1

um

x x

= movie user m1 m2 … mn m1 … mn

u1 u2 um

… rating (e.g., )

slide-36
SLIDE 36

36

SVD

a11 a12 ... a1n a21 a22 ... a2n     am1 am2 ... amn ! " # # # # # $ % & & & & &

u11 ... u1r    um1 ... umr ! " # # # # $ % & & & & σ1 ...    ... σ r ! " # # # # $ % & & & & v11 ... v1r    vn1 ... vnr ! " # # # # $ % & & & &

u1

um

x x

= m1 m2 … mn m1 … mn movie user similarity concept correlation of user to similarity concept correlation of movie to similarity concept

u1 u2 um

… rating (e.g., )

slide-37
SLIDE 37

37

Heterogeneity Classification

Movie 1 Movie 2 Movie 3 Movie 4 Movie 5 Movie M

User A User B User N

slide-38
SLIDE 38

38

Heterogeneity Classification

Platform 1 Platform 2 Platform 3 Platform 4 Platform 5 Platform M User A User B User N

slide-39
SLIDE 39

39

Heterogeneity Classification

Platform 1 Platform 2 Platform 3 Platform 4 Platform 5 Platform M App A App B App N

slide-40
SLIDE 40

40

Heterogeneity Classification

Platform 1 Platform 2 Platform 3 Platform 4 Platform 5 Platform M App A 1,500QPS 843QPS App B 458QPS 946QPS App N 1,016QPS 186QPS

App performance

slide-41
SLIDE 41

41

Heterogeneity Classification

Platform 1 Platform 2 Platform 3 Platform 4 Platform 5 Platform M App A 1,500QPS 843QPS App B App N

Profiled Performance Inferred Performance

slide-42
SLIDE 42

42

Heterogeneity Classification

Platform 1 Platform 2 Platform 3 Platform 4 Platform 5 Platform M App A 1,500QPS 843QPS App B App N

843QPS 675QPS 1,786QPS 8,675QPS

Profiled Performance Inferred Performance

slide-43
SLIDE 43

43

Heterogeneity Classification

Platform 1 Platform 2 Platform 3 Platform 4 Platform 5 Platform M App A 1,500QPS 843QPS App B 987QPS 1,836QPS App N

843QPS 675QPS 1,786QPS 8,675QPS 458QPS 773QPS 986QPS 1,073QPS

… …

Profiled Performance Inferred Performance

slide-44
SLIDE 44

44

Heterogeneity Classification

Platform 1 Platform 2 Platform 3 Platform 4 Platform 5 Platform M App A 1,500QPS 843QPS App B 987QPS 1,836QPS App N 9,893QPS 7,686QPS

843QPS 675QPS 1,786QPS 8,675QPS 458QPS 773QPS 986QPS 1,073QPS 1,354QPS 786QPS 1,118QPS 997QPS

… … … … … … … … …

Profiled Performance Inferred Performance

Performance depends on app type: QPS, completion time, IPC, …

slide-45
SLIDE 45

45

Interference Classification

L1-i $ LLC Mem bw CPU Int I/O bw Net bw

App A 95 56 App B 92 78 App N 45 49

81 7 43 100 4 14 81 18 54 56 11 99

… … … … … … … … …

Profiled Sensitivity Inferred Sensitivity

slide-46
SLIDE 46

46

Measuring Interference Sensitivity

¨ Cross-application profiling: ¨ Measuring in hardware:

¨ iBench1: set of microbenchmarks of tunable intensity

  • 1C. Delimitrou and C. Kozyrakis. “iBench: Quantifying Interference for Datacenter

Applications” [IISWC’13] QoS

28%

Increase intensity until the application violates QoS (tolerated interference) Generated interference?

infeasible platform-dependent & inaccurate

slide-47
SLIDE 47

47

Why SVD?

SVD+SGD: Low reconstruction error Simple, fast, scalable (O(min(m2n, n2m))) Offer insight on similarities

Low CPU High LLC Similar to streaming apps

Recommend accounts to follow

Apps that benefit from high CPU frequency Apps similar in I-cache are also similar in branch behavior

Refactor parts of app for efficiency

slide-48
SLIDE 48

48

¨ Select servers that:

¤ Can tolerate the interference of new application ¤ Generate interference the new application can tolerate ¤ Have appropriate platform configuration

Greedy Resource Selection

Scheduler Cluster Users Resource reservations

slide-49
SLIDE 49

49

¨ 1,000 EC2 servers

¤ 14 different server configurations ¤ 2 vCPU to 16 vCPU instances

¨ 5,000 applications ¤ SPEC, PARSEC, SPLASH-2, BioParallel, Minebench, SpecWeb, Hadoop

benchmarks

¨ Objectives:

¤ High application performance ¤ High resource utilization

Evaluation

slide-50
SLIDE 50

50

¨ 1,000 servers ¨ 5,000 applications ¨ Start with zero knowledge

Validation

Classification Engine Metric Applications (%)

CPU-bound Memory-bound I/O-bound

Heterogeneity Avg estimation error

3.1% 3.6% 4.1%

Interference Avg estimation error

3.7% 3.5% 5.1% 3.5% 3.8%

slide-51
SLIDE 51

51

¨ Least loaded scheduler (common practice today)

¤ Violates QoS for 97% of workloads

Evaluation: Performance

slide-52
SLIDE 52

52

¨ Paragon preserves QoS for 71% of workloads ¨ Bounds degradation to less than 10% for 90% of workloads

Evaluation: Performance

slide-53
SLIDE 53

53

¨ Paragon preserves QoS for 71% of workloads ¨ Bounds degradation to less than 10% for 90% of workloads

Evaluation: Performance

Gain

slide-54
SLIDE 54

54

Evaluation: System Utilization

¨ Utilization increases from 19% to 58%

Paragon Least-Loaded (LL)

slide-55
SLIDE 55

55

Are We Done?

slide-56
SLIDE 56

56

A Larger Problem

Cluster

The user specifies resource reservations à overprovisioning

Scheduler

Resource reservations

Users

  • 1. Practical data

mining techniques

slide-57
SLIDE 57

57

Quasar

[ASPLOS’14]

Scheduler Cluster

  • 1. Practical data

mining techniques

  • 2. High level

interface

Resource reservations

Users

slide-58
SLIDE 58

58

High-Level Interfaces

¨ Declarative interfaces:

¤ SQL à describe the queries, not how they should be executed ¤ DSLs à user describes program, language/compiler optimize

¨ Performance targets:

¤ Batch: completion time, deadline ¤ Interactive: throughput, tail latency

Focus on what performance is needed, not on how to achieve it

slide-59
SLIDE 59

59

Extracting Resource Preferences

¨ Need to translate performance to resources

¨ Exhaustive characterization is infeasible

Heterogeneity Interference Resources per server Resource ratio

10 servers 40 apps 100 servers 300 apps 1000 servers 1200 apps

Combinations

1,000 1,000,000 1,000,000,000

Systems Number of servers Application params

slide-60
SLIDE 60

60

Applying Data Mining

¨ Exhaustive classification is impractical

Platform 1 & LLC & 2 CPU/64GB RAM & 1 server Platform M & Net bw & 10 CPU/48GB RAM & 1 server

843QPS 10,456QPS 458QPS 1,836QPS 7,686QPS 1,354QPS

> 100,000,000

… … … … … …

Platform 1

& L-i $

& 2 CPU/64GB RAM & 2 servers

App A App B App N 1,500QPS 987QPS 10,893QPS

slide-61
SLIDE 61

61

Practical Resource Recommendations

Heterogeneity Interference

Classification Engine Goal Determine suitable server platform Determine sensitivity to resource interference

slide-62
SLIDE 62

62

Practical Resource Recommendations

Heterogeneity Interference

Classification Engine Goal Determine suitable server platform Determine sensitivity to resource interference

Scale-up

Determine amount/ratio

  • f resources per server
slide-63
SLIDE 63

63

Practical Resource Recommendations

Heterogeneity Interference Scale-up

Classification Engine Goal Determine suitable server platform Determine sensitivity to resource interference Determine amount/ratio

  • f resources per server

Scale-out

Determine appropriate number of servers

slide-64
SLIDE 64

64

Practical Resource Recommendations

Heterogeneity Interference Scale-up

Classification Engine Goal Determine suitable server platform Determine sensitivity to resource interference Determine amount/ratio

  • f resources per server

Scale-out

Determine appropriate number of servers

Application params

Determine appropriate settings for Hadoop, Spark, …

slide-65
SLIDE 65

65

Quasar Overview

Profiling Cluster

QoS

Scheduler

User

App App

App

App App

Resource preferences

App

Data mining

slide-66
SLIDE 66

66

Quasar Overview

Cluster

Scheduler

Greedy algorithm

Profiling User

Resource preferences

Data mining Resource selection

App

slide-67
SLIDE 67

67

Quasar Overview

Cluster

Scheduler

Greedy algorithm

Profiling User

Resource preferences

Data mining Resource selection

App

slide-68
SLIDE 68

68

Quasar Overview

Cluster

Scheduler

Greedy algorithm

Profiling User

Resource preferences

Data mining Resource selection

App

App App

slide-69
SLIDE 69

69

Quasar Overview

Profiling [10-60sec] Data mining [20msec] Resource selection [50msec-2sec] One-time for repetitive apps Cluster

Scheduler

Greedy algorithm

User

App App App App

Resource preferences

App

slide-70
SLIDE 70

70

Quasar Implementation

¨ 10,000 loc of C++ and Python ¨ Runs on Linux and OS X ¨ Supports frameworks in C/C++, Java, Scala and Python

¤ ~100-600 loc for framework-specific code

¨ Side-effect free profiling runs with sealed containers

slide-71
SLIDE 71

71

Evaluation: Cloud Scenario

¨ Cluster

¤ 200 EC2 servers, 14 different server types

¨ Workloads: 1,200 apps with 1sec inter-arrival rate ¤ Analytics: Hadoop, Spark, Storm ¤ Latency-critical: Memcached, HotCrp, Cassandra ¤ Single-threaded: SPEC CPU2006 ¤ Multi-threaded: PARSEC, SPLASH-2, BioParallel, Specjbb ¤ Multiprogrammed: 4-app mixes of SPEC CPU2006

¨ Objectives: high cluster utilization and good app QoS

slide-72
SLIDE 72

72

Demo

Instance Size

memcached Cassandra Storm Hadoop Single-node Spark

Core Allocation Map Quasar

Instance Core

Core Allocation Map Reservation & LL

Performance histogram Quasar Performance histogram Reservation & LL

Cluster Utilization

Progress bar Progress bar

100% 0% 100% 0%

Quasar Reservation + LL

slide-73
SLIDE 73

73

slide-74
SLIDE 74

74

Quasar achieves:

¨ 91% of applications meet QoS ¨ ~10% overprovisioning as opposed to up to 5x ¨ Up to 70% cluster utilization at steady-state ¨ 23% shorter scenario completion time

Cloud Scenario Summary

slide-75
SLIDE 75

75

Early Adoption

https://github.com/att-innovate/charmander

slide-76
SLIDE 76

76

Scheduler Cluster

  • 2. High level

interface

  • 1. Practical

data mining

Contributions

Quasar [ASPLOS’14]

Users

slide-77
SLIDE 77

77

Cluster Users

Contributions

Tarcil [SOCC’15]

  • 2. High level

interface S S S …

  • 3. Distributed,

sampling-based scheduling

  • 1. Practical

data mining

slide-78
SLIDE 78

78

Users

Contributions

Hybrid Cloud [in submission]

  • 2. High level

interface S S S …

Cluster Cluster

  • 4. Private vs.

public resources

  • 3. Distributed,

sampling-based scheduling

  • 1. Practical

data mining

slide-79
SLIDE 79

79

Users

Contributions

ARQ [ICAC’13]

  • 2. High level

interface S S S …

Cluster Cluster

  • 4. Private vs.

public resources

  • 3. Distributed,

sampling-based scheduling

  • 1. Practical

data mining

  • 5. Admission

control

slide-80
SLIDE 80

80

Conclusions

¨ Resource efficiency: significant challenge in systems of all scales

¤ Focus on scalability of large-scale datacenters

¨ Cluster management: high utilization & high app performance

¤ High-level declarative interface ¤ Practical data mining techniques ¤ Cross-layer design

slide-81
SLIDE 81

81

¨ Resource efficiency: significant challenge in systems of all scales

¤ Focus on scalability of large-scale datacenters

¨ Cluster management: high utilization & high app performance

¤ High-level declarative interface ¤ Practical data mining techniques ¤ Cross-layer design

Questions??

Thank you!