Performance Annotations for Cloud Computing · 2019-12-18 · Data Centers Are Everywhere... Data...

95
Performance Annotations for Cloud Computing Daniele Rogora * Steffen Smolka % Antonio Carzaniga * Amer Diwan $ Robert Soulé *∼ presented by Daniele Rogora * Università della Svizzera italiana % Cornell University $ Google Barefoot Networks HotCloud 2017 1 / 27

Transcript of Performance Annotations for Cloud Computing · 2019-12-18 · Data Centers Are Everywhere... Data...

Page 1: Performance Annotations for Cloud Computing · 2019-12-18 · Data Centers Are Everywhere... Data centers provide Services for end users Google, Facebook, Dropbox Services for companies

Performance Annotations for Cloud Computing

Daniele Rogora∗ Steffen Smolka% Antonio Carzaniga∗ Amer Diwan$

Robert Soulé∗∼

presented by

Daniele Rogora

∗Università della Svizzera italiana %Cornell University $Google ∼Barefoot Networks

HotCloud 2017

1 / 27

Page 2: Performance Annotations for Cloud Computing · 2019-12-18 · Data Centers Are Everywhere... Data centers provide Services for end users Google, Facebook, Dropbox Services for companies

Data Centers Are Everywhere...

Data centers provide◮ Services for end users

◮ Google, Facebook, Dropbox

◮ Services for companies and universities◮ AWS for SAP, cloud mail services

◮ Raw processing power (IaaS, PaaS)◮ Amazon EC2, Microsoft Azure

2 / 27

Page 3: Performance Annotations for Cloud Computing · 2019-12-18 · Data Centers Are Everywhere... Data centers provide Services for end users Google, Facebook, Dropbox Services for companies

Data Centers Are Everywhere...

Data centers provide◮ Services for end users

◮ Google, Facebook, Dropbox

◮ Services for companies and universities◮ AWS for SAP, cloud mail services

◮ Raw processing power (IaaS, PaaS)◮ Amazon EC2, Microsoft Azure

Data centers are widespread◮ Microsoft has more than 100 data centers

◮ they account for more than 1M servers

◮ Amazon has more than 30 data centers◮ they account for more than 1.5M servers

◮ Google has 15 data centers scattered around the world◮ in 2013 they accounted for around 900k servers

2 / 27

Page 4: Performance Annotations for Cloud Computing · 2019-12-18 · Data Centers Are Everywhere... Data centers provide Services for end users Google, Facebook, Dropbox Services for companies

... But They Are Complex

Machine 1

Machine 2

Machine 3

Machine 4

Machine 5

Switch 1

Machine 6

Machine 7

Machine 8

Machine 9

Machine 10

Switch 2

Machine 11

Machine 12

Machine 13

Machine 14

Machine 15

Switch 3

3 / 27

Page 5: Performance Annotations for Cloud Computing · 2019-12-18 · Data Centers Are Everywhere... Data centers provide Services for end users Google, Facebook, Dropbox Services for companies

... But They Are Complex

Machine 1

Machine 2

Machine 3

Machine 4

Machine 5

Switch 1

Machine 6

Machine 7

Machine 8

Machine 9

Machine 10

Switch 2

Machine 11

Machine 12

Machine 13

Machine 14

Machine 15

Switch 3

CPU HDD NET

3 / 27

Page 6: Performance Annotations for Cloud Computing · 2019-12-18 · Data Centers Are Everywhere... Data centers provide Services for end users Google, Facebook, Dropbox Services for companies

... But They Are Complex

Machine 1

Machine 2

Machine 3

Machine 4

Machine 5

Switch 1

Machine 6

Machine 7

Machine 8

Machine 9

Machine 10

Switch 2

Machine 11

Machine 12

Machine 13

Machine 14

Machine 15

Switch 3

CPU HDD NET

Operating System

3 / 27

Page 7: Performance Annotations for Cloud Computing · 2019-12-18 · Data Centers Are Everywhere... Data centers provide Services for end users Google, Facebook, Dropbox Services for companies

... But They Are Complex

Machine 1

Machine 2

Machine 3

Machine 4

Machine 5

Switch 1

Machine 6

Machine 7

Machine 8

Machine 9

Machine 10

Switch 2

Machine 11

Machine 12

Machine 13

Machine 14

Machine 15

Switch 3

CPU HDD NET

Operating System

Virtual Network

3 / 27

Page 8: Performance Annotations for Cloud Computing · 2019-12-18 · Data Centers Are Everywhere... Data centers provide Services for end users Google, Facebook, Dropbox Services for companies

... But They Are Complex

Machine 1

Machine 2

Machine 3

Machine 4

Machine 5

Switch 1

Machine 6

Machine 7

Machine 8

Machine 9

Machine 10

Switch 2

Machine 11

Machine 12

Machine 13

Machine 14

Machine 15

Switch 3

CPU HDD NET

Operating System

Virtual Network

Virtual Machines

3 / 27

Page 9: Performance Annotations for Cloud Computing · 2019-12-18 · Data Centers Are Everywhere... Data centers provide Services for end users Google, Facebook, Dropbox Services for companies

... But They Are Complex

Machine 1

Machine 2

Machine 3

Machine 4

Machine 5

Switch 1

Machine 6

Machine 7

Machine 8

Machine 9

Machine 10

Switch 2

Machine 11

Machine 12

Machine 13

Machine 14

Machine 15

Switch 3

CPU HDD NET

Operating System

Virtual Network

Virtual Machines

Software

3 / 27

Page 10: Performance Annotations for Cloud Computing · 2019-12-18 · Data Centers Are Everywhere... Data centers provide Services for end users Google, Facebook, Dropbox Services for companies

... But They Are Complex

Machine 1

Machine 2

Machine 3

Machine 4

Machine 5

Switch 1

Machine 6

Machine 7

Machine 8

Machine 9

Machine 10

Switch 2

Machine 11

Machine 12

Machine 13

Machine 14

Machine 15

Switch 3

CPU HDD NET

Operating System

Virtual Network

Virtual Machines

Software

CPU HDD NET

Operating System

Virtual Network

Virtual Machines

Software

3 / 27

Page 11: Performance Annotations for Cloud Computing · 2019-12-18 · Data Centers Are Everywhere... Data centers provide Services for end users Google, Facebook, Dropbox Services for companies

... But They Are Complex

Machine 1

Machine 2

Machine 3

Machine 4

Machine 5

Switch 1

Machine 6

Machine 7

Machine 8

Machine 9

Machine 10

Switch 2

Machine 11

Machine 12

Machine 13

Machine 14

Machine 15

Switch 3

CPU HDD NET

Operating System

Virtual Network

Virtual Machines

Software

CPU HDD NET

Operating System

Virtual Network

Virtual Machines

Software

4 / 27

Page 12: Performance Annotations for Cloud Computing · 2019-12-18 · Data Centers Are Everywhere... Data centers provide Services for end users Google, Facebook, Dropbox Services for companies

... But They Are Complex

Machine 1

Machine 2

Machine 3

Machine 4

Machine 5

Switch 1

Machine 6

Machine 7

Machine 8

Machine 9

Machine 10

Switch 2

Machine 11

Machine 12

Machine 13

Machine 14

Machine 15

Switch 3

CPU HDD NET

Operating System

Virtual Network

Virtual Machines

Web Server

CPU HDD NET

Operating System

Virtual Network

Virtual Machines

DBMS

4 / 27

Page 13: Performance Annotations for Cloud Computing · 2019-12-18 · Data Centers Are Everywhere... Data centers provide Services for end users Google, Facebook, Dropbox Services for companies

... But They Are Complex

Machine 1

Machine 2

Machine 3

Machine 4

Machine 5

Switch 1

Machine 6

Machine 7

Machine 8

Machine 9

Machine 10

Switch 2

Machine 11

Machine 12

Machine 13

Machine 14

Machine 15

Switch 3

CPU HDD NET

Operating System

Virtual Network

Virtual Machines

AUTH Web Server

CPU HDD NET

Operating System

Virtual Network

Virtual Machines

DBMS

RPC

4 / 27

Page 14: Performance Annotations for Cloud Computing · 2019-12-18 · Data Centers Are Everywhere... Data centers provide Services for end users Google, Facebook, Dropbox Services for companies

... But They Are Complex

Machine 1

Machine 2

Machine 3

Machine 4

Machine 5

Switch 1

Machine 6

Machine 7

Machine 8

Machine 9

Machine 10

Switch 2

Machine 11

Machine 12

Machine 13

Machine 14

Machine 15

Switch 3

CPU HDD NET

Operating System

Virtual Network

Virtual Machines

AUTH Web Server

CPU HDD NET

Operating System

Virtual Network

Virtual Machines

DBMS

RPC

4 / 27

Page 15: Performance Annotations for Cloud Computing · 2019-12-18 · Data Centers Are Everywhere... Data centers provide Services for end users Google, Facebook, Dropbox Services for companies

Machine 1

Machine 2

Machine 3

Machine 4

Machine 5

Switch 1

Machine 1

Machine 2

Machine 3

Machine 4

Machine 5

Switch 2

Machine 11

Machine 12

Machine 13

Machine 14

Machine 15

Switch 3

Operating System

Virtual Network

Virtual MachinesAUTH

Web Server

Operating System

Virtual Network

Virtual Machines

DBMS

RPC

Understanding the performance of a data center is difficult

many layers

limited scope of tools and people’s knowledge

Page 16: Performance Annotations for Cloud Computing · 2019-12-18 · Data Centers Are Everywhere... Data centers provide Services for end users Google, Facebook, Dropbox Services for companies

Machine 1

Machine 2

Machine 3

Machine 4

Machine 5

Switch 1

Machine 1

Machine 2

Machine 3

Machine 4

Machine 5

Switch 2

Machine 11

Machine 12

Machine 13

Machine 14

Machine 15

Switch 3

Operating System

Virtual Network

Virtual MachinesAUTH

Web Server

Operating System

Virtual Network

Virtual Machines

DBMS

RPC

Understanding the performance of a data center is difficult

many layers

limited scope of tools and people’s knowledge

3 real-world questions by a data center operator

How much load increase can we support with the current

setup? Where will the bottleneck be? What would break

first?

How much would it help to move the database server to

faster hardware, or directly on the metal?

Can we understand and explain unexpected behaviors?

5 / 27

Page 17: Performance Annotations for Cloud Computing · 2019-12-18 · Data Centers Are Everywhere... Data centers provide Services for end users Google, Facebook, Dropbox Services for companies

Goal: Creating a New Model

We want to build a dynamic performance model for data centers

comprehensive

live

interactive

6 / 27

Page 18: Performance Annotations for Cloud Computing · 2019-12-18 · Data Centers Are Everywhere... Data centers provide Services for end users Google, Facebook, Dropbox Services for companies

Goal: Creating a New Model

We want to build a dynamic performance model for data centers

comprehensive

live

interactive

Logs

Query

Model

Page 19: Performance Annotations for Cloud Computing · 2019-12-18 · Data Centers Are Everywhere... Data centers provide Services for end users Google, Facebook, Dropbox Services for companies

Goal: Creating a New Model

We want to build a dynamic performance model for data centers

comprehensive

live

interactive

Logs

Query

Model

How is it performing now?

Performance

Page 20: Performance Annotations for Cloud Computing · 2019-12-18 · Data Centers Are Everywhere... Data centers provide Services for end users Google, Facebook, Dropbox Services for companies

Goal: Creating a New Model

We want to build a dynamic performance model for data centers

comprehensive

live

interactive

Logs

Query

Model

What if the we improve the hardware?

Predictive result

6 / 27

Page 21: Performance Annotations for Cloud Computing · 2019-12-18 · Data Centers Are Everywhere... Data centers provide Services for end users Google, Facebook, Dropbox Services for companies

Goal: Creating a New Model

We want to build a dynamic performance model for data centers

comprehensive

live

interactive

Logs

Query

Statistical Model

6 / 27

Page 22: Performance Annotations for Cloud Computing · 2019-12-18 · Data Centers Are Everywhere... Data centers provide Services for end users Google, Facebook, Dropbox Services for companies

Performance Annotations

7 / 27

Page 23: Performance Annotations for Cloud Computing · 2019-12-18 · Data Centers Are Everywhere... Data centers provide Services for end users Google, Facebook, Dropbox Services for companies

Example: a Web Service

Request Response

System

The response time grows quadratically

with the size of the body of the request

Page 24: Performance Annotations for Cloud Computing · 2019-12-18 · Data Centers Are Everywhere... Data centers provide Services for end users Google, Facebook, Dropbox Services for companies

Example: a Web Service

Request Response

System

The response time grows quadratically

with the size of the body of the request

0

1000

2000

3000

4000

5000

6000

7000

8000

9000

0 20 40 60 80 100

tim

e (

ms)

body size (MB)

Page 25: Performance Annotations for Cloud Computing · 2019-12-18 · Data Centers Are Everywhere... Data centers provide Services for end users Google, Facebook, Dropbox Services for companies

Example: a Web Service

Request Response

System

The response time grows quadratically

with the size of the body of the request

0

1000

2000

3000

4000

5000

6000

7000

8000

9000

0 20 40 60 80 100

tim

e (

ms)

body size (MB)@Time ∼ a∗ |in|2 +b ∗ |in|+c

Page 26: Performance Annotations for Cloud Computing · 2019-12-18 · Data Centers Are Everywhere... Data centers provide Services for end users Google, Facebook, Dropbox Services for companies

Example: a Web Service

Request Response

System

The memory used grows linearly

with the size of the body of the request

10

20

30

40

50

60

70

80

90

0 20 40 60 80 100

mem

ory

usage (

kB

)

body size (kB)@Mem ∼ a∗ |in|+b

8 / 27

Page 27: Performance Annotations for Cloud Computing · 2019-12-18 · Data Centers Are Everywhere... Data centers provide Services for end users Google, Facebook, Dropbox Services for companies

Example: a Web Service

Request Response

System

Machine 1 Machine 7

Page 28: Performance Annotations for Cloud Computing · 2019-12-18 · Data Centers Are Everywhere... Data centers provide Services for end users Google, Facebook, Dropbox Services for companies

Example: a Web Service

Request Response

System

Machine 1 Machine 7VM PostgreSQL

Page 29: Performance Annotations for Cloud Computing · 2019-12-18 · Data Centers Are Everywhere... Data centers provide Services for end users Google, Facebook, Dropbox Services for companies

Example: a Web Service

Request Response

System

Machine 1 Machine 7VM PostgreSQL

Apache WS

Page 30: Performance Annotations for Cloud Computing · 2019-12-18 · Data Centers Are Everywhere... Data centers provide Services for end users Google, Facebook, Dropbox Services for companies

Example: a Web Service

Request Response

System

Machine 1 Machine 7VM PostgreSQL

Apache WSOwnCloud

Page 31: Performance Annotations for Cloud Computing · 2019-12-18 · Data Centers Are Everywhere... Data centers provide Services for end users Google, Facebook, Dropbox Services for companies

Example: a Web Service

Request Response

System

Machine 1 Machine 7VM PostgreSQL

Apache WSOwnCloud

getFile(string f)

normalizePath(string p)

parseQuery(string q)

execute(query q)

8 / 27

Page 32: Performance Annotations for Cloud Computing · 2019-12-18 · Data Centers Are Everywhere... Data centers provide Services for end users Google, Facebook, Dropbox Services for companies

Example: a Web Service

Request Response

System

Machine 1 Machine 7VM PostgreSQL

Apache WSOwnCloud

getFile(string f)

0

1000

2000

3000

4000

5000

6000

7000

8000

9000

0 20 40 60 80 100

tim

e (

ms)

body size (MB)

normalizePath(string p)

10

20

30

40

50

60

70

80

90

0 20 40 60 80 100

me

mo

ry u

sa

ge

(kB

)

body size (kB)

parseQuery(string q)

0

1

2

3

4

5

10 20 30 40 50 60 70 80 90 100

Me

mo

ry (

kb

yte

s)

String length

execute(query q)

0

10

20

30

40

50

60

70

80

90

0 20 40 60 80 100

tim

e (

ms)

query size

8 / 27

Page 33: Performance Annotations for Cloud Computing · 2019-12-18 · Data Centers Are Everywhere... Data centers provide Services for end users Google, Facebook, Dropbox Services for companies

3

4

5

6

7

8

9

0 10 20 30 40 50 60 70 80

Me

mo

ry (

kb

yte

s)

String length

9 / 27

Page 34: Performance Annotations for Cloud Computing · 2019-12-18 · Data Centers Are Everywhere... Data centers provide Services for end users Google, Facebook, Dropbox Services for companies

3

4

5

6

7

8

9

0 10 20 30 40 50 60 70 80

Me

mo

ry (

kb

yte

s)

String length

@Mem∼Constant(8kB)

9 / 27

Page 35: Performance Annotations for Cloud Computing · 2019-12-18 · Data Centers Are Everywhere... Data centers provide Services for end users Google, Facebook, Dropbox Services for companies

3

4

5

6

7

8

9

0 10 20 30 40 50 60 70 80

Me

mo

ry (

kb

yte

s)

String length

@Mem∼Constant(8kB) 0

5

10

15

20

25

30

35

40

0 2 4 6 8 10 12 14

Me

mo

ry (

kb

yte

s)

Path length

9 / 27

Page 36: Performance Annotations for Cloud Computing · 2019-12-18 · Data Centers Are Everywhere... Data centers provide Services for end users Google, Facebook, Dropbox Services for companies

3

4

5

6

7

8

9

0 10 20 30 40 50 60 70 80

Me

mo

ry (

kb

yte

s)

String length

@Mem∼Constant(8kB) 0

5

10

15

20

25

30

35

40

0 2 4 6 8 10 12 14

Me

mo

ry (

kb

yte

s)

Path length

Line Fit

9 / 27

Page 37: Performance Annotations for Cloud Computing · 2019-12-18 · Data Centers Are Everywhere... Data centers provide Services for end users Google, Facebook, Dropbox Services for companies

3

4

5

6

7

8

9

0 10 20 30 40 50 60 70 80

Me

mo

ry (

kb

yte

s)

String length

@Mem∼Constant(8kB) 0

5

10

15

20

25

30

35

40

0 2 4 6 8 10 12 14

Me

mo

ry (

kb

yte

s)

Path length

Line Fit

@Mem∼Norm(5ms*path_len(path), 5ms)

9 / 27

Page 38: Performance Annotations for Cloud Computing · 2019-12-18 · Data Centers Are Everywhere... Data centers provide Services for end users Google, Facebook, Dropbox Services for companies

3

4

5

6

7

8

9

0 10 20 30 40 50 60 70 80

Me

mo

ry (

kb

yte

s)

String length

@Mem∼Constant(8kB) 0

5

10

15

20

25

30

35

40

0 2 4 6 8 10 12 14

Me

mo

ry (

kb

yte

s)

Path length

Line Fit

@Mem∼Norm(5ms*path_len(path), 5ms)

0

1

2

3

4

5

10 20 30 40 50 60 70 80 90 100

Me

mo

ry (

kb

yte

s)

String length 9 / 27

Page 39: Performance Annotations for Cloud Computing · 2019-12-18 · Data Centers Are Everywhere... Data centers provide Services for end users Google, Facebook, Dropbox Services for companies

3

4

5

6

7

8

9

0 10 20 30 40 50 60 70 80

Me

mo

ry (

kb

yte

s)

String length

@Mem∼Constant(8kB) 0

5

10

15

20

25

30

35

40

0 2 4 6 8 10 12 14

Me

mo

ry (

kb

yte

s)

Path length

Line Fit

@Mem∼Norm(5ms*path_len(path), 5ms)

0

1

2

3

4

5

10 20 30 40 50 60 70 80 90 100

Me

mo

ry (

kb

yte

s)

String length

@Mem∼Constant(4.2kB)

@Mem∼Constant(0.5kB)

9 / 27

Page 40: Performance Annotations for Cloud Computing · 2019-12-18 · Data Centers Are Everywhere... Data centers provide Services for end users Google, Facebook, Dropbox Services for companies

3

4

5

6

7

8

9

0 10 20 30 40 50 60 70 80

Me

mo

ry (

kb

yte

s)

String length

@Mem∼Constant(8kB) 0

5

10

15

20

25

30

35

40

0 2 4 6 8 10 12 14

Me

mo

ry (

kb

yte

s)

Path length

Line Fit

@Mem∼Norm(5ms*path_len(path), 5ms)

0

1

2

3

4

5

10 20 30 40 50 60 70 80 90 100

Me

mo

ry (

kb

yte

s)

String length

@Mem∼Constant(4.2kB)

@Mem∼Constant(0.5kB)

700

750

800

850

900

950

1000

10 20 30 40 50 60 70 80 90M

em

ory

(b

yte

s)

String length 9 / 27

Page 41: Performance Annotations for Cloud Computing · 2019-12-18 · Data Centers Are Everywhere... Data centers provide Services for end users Google, Facebook, Dropbox Services for companies

3

4

5

6

7

8

9

0 10 20 30 40 50 60 70 80

Me

mo

ry (

kb

yte

s)

String length

@Mem∼Constant(8kB) 0

5

10

15

20

25

30

35

40

0 2 4 6 8 10 12 14

Me

mo

ry (

kb

yte

s)

Path length

Line Fit

@Mem∼Norm(5ms*path_len(path), 5ms)

0

1

2

3

4

5

10 20 30 40 50 60 70 80 90 100

Me

mo

ry (

kb

yte

s)

String length

@Mem∼Constant(4.2kB)

@Mem∼Constant(0.5kB)

700

750

800

850

900

950

1000

10 20 30 40 50 60 70 80 90M

em

ory

(b

yte

s)

String length

@Mem∼?

9 / 27

Page 42: Performance Annotations for Cloud Computing · 2019-12-18 · Data Centers Are Everywhere... Data centers provide Services for end users Google, Facebook, Dropbox Services for companies

How To Create Annotations

10 / 27

Page 43: Performance Annotations for Cloud Computing · 2019-12-18 · Data Centers Are Everywhere... Data centers provide Services for end users Google, Facebook, Dropbox Services for companies

Instrumentation

11 / 27

Page 44: Performance Annotations for Cloud Computing · 2019-12-18 · Data Centers Are Everywhere... Data centers provide Services for end users Google, Facebook, Dropbox Services for companies

Instrumentation

For every call of all the functions in the system, we need:

metrics of interest◮ execution time◮ dynamic memory allocation◮ locks holding time

relevant features of the input parameters◮ string length◮ collection size

11 / 27

Page 45: Performance Annotations for Cloud Computing · 2019-12-18 · Data Centers Are Everywhere... Data centers provide Services for end users Google, Facebook, Dropbox Services for companies

Instrumentation

For every call of all the functions in the system, we need:

metrics of interest◮ execution time◮ dynamic memory allocation◮ locks holding time

relevant features of the input parameters◮ string length◮ collection size

Also, the instrumentation must be:

crosslayer

crossplatform

11 / 27

Page 46: Performance Annotations for Cloud Computing · 2019-12-18 · Data Centers Are Everywhere... Data centers provide Services for end users Google, Facebook, Dropbox Services for companies

Automatic Annotation Inference

Page 47: Performance Annotations for Cloud Computing · 2019-12-18 · Data Centers Are Everywhere... Data centers provide Services for end users Google, Facebook, Dropbox Services for companies

Automatic Annotation Inference

Logs

Function: correctFolderSize feature: collection size

pcc: 0.5610

0

5

10

15

20

25

0 1 2 3 4 5 6 7 8 9

Mem

ory

(kbyte

s)

Collection size

12 / 27

Page 48: Performance Annotations for Cloud Computing · 2019-12-18 · Data Centers Are Everywhere... Data centers provide Services for end users Google, Facebook, Dropbox Services for companies

Automatic Annotation Inference

Logs

Function: correctFolderSize feature: string length

pcc: 0.78673

0

5

10

15

20

25

0 20 40 60 80 100 120

Mem

ory

(kbyte

s)

String length

12 / 27

Page 49: Performance Annotations for Cloud Computing · 2019-12-18 · Data Centers Are Everywhere... Data centers provide Services for end users Google, Facebook, Dropbox Services for companies

Automatic Annotation Inference

Logs

Function: correctFolderSize feature: path length

pcc: 0.9473

0

5

10

15

20

25

0 1 2 3 4 5 6 7

Mem

ory

(kbyte

s)

Path length

12 / 27

Page 50: Performance Annotations for Cloud Computing · 2019-12-18 · Data Centers Are Everywhere... Data centers provide Services for end users Google, Facebook, Dropbox Services for companies

Automatic Annotation Inference

Logs

Function: correctFolderSize feature: path length

pcc: 0.9473

0

5

10

15

20

25

0 1 2 3 4 5 6 7

Mem

ory

(kbyte

s)

Path length

Line fit

regression

12 / 27

Page 51: Performance Annotations for Cloud Computing · 2019-12-18 · Data Centers Are Everywhere... Data centers provide Services for end users Google, Facebook, Dropbox Services for companies

Automatic Annotation Inference

Logs

Function: broadcastEvent feature: collection size

pcc: -0.1155

0

0.5

1

1.5

2

2.5

3

3.5

4

0 1 2 3 4 5

Tim

e (

ms)

Collection size

12 / 27

Page 52: Performance Annotations for Cloud Computing · 2019-12-18 · Data Centers Are Everywhere... Data centers provide Services for end users Google, Facebook, Dropbox Services for companies

Automatic Annotation Inference

Logs

Function: broadcastEvent feature: string length

pcc: -0.2764

0

0.5

1

1.5

2

2.5

3

3.5

4

8 10 12 14 16 18 20

Tim

e (

ms)

String length

12 / 27

Page 53: Performance Annotations for Cloud Computing · 2019-12-18 · Data Centers Are Everywhere... Data centers provide Services for end users Google, Facebook, Dropbox Services for companies

Automatic Annotation Inference

Logs

Function: broadcastEvent no feature

0

0.5

1

1.5

2

2.5

3

3.5

4

-1 -0.5 0 0.5 1

Tim

e (

ms)

Scalar value

clusters

12 / 27

Page 54: Performance Annotations for Cloud Computing · 2019-12-18 · Data Centers Are Everywhere... Data centers provide Services for end users Google, Facebook, Dropbox Services for companies

Annotations Uses

13 / 27

Page 55: Performance Annotations for Cloud Computing · 2019-12-18 · Data Centers Are Everywhere... Data centers provide Services for end users Google, Facebook, Dropbox Services for companies

Uses

14 / 27

Page 56: Performance Annotations for Cloud Computing · 2019-12-18 · Data Centers Are Everywhere... Data centers provide Services for end users Google, Facebook, Dropbox Services for companies

Uses

Documentation◮ how do functions behave?

14 / 27

Page 57: Performance Annotations for Cloud Computing · 2019-12-18 · Data Centers Are Everywhere... Data centers provide Services for end users Google, Facebook, Dropbox Services for companies

Uses

Documentation◮ how do functions behave?

Anomaly/failure detection◮ is the system behaving normally? Is there a performance regression?

14 / 27

Page 58: Performance Annotations for Cloud Computing · 2019-12-18 · Data Centers Are Everywhere... Data centers provide Services for end users Google, Facebook, Dropbox Services for companies

Uses

Documentation◮ how do functions behave?

Anomaly/failure detection◮ is the system behaving normally? Is there a performance regression?

Extrapolation◮ can we scale up?

14 / 27

Page 59: Performance Annotations for Cloud Computing · 2019-12-18 · Data Centers Are Everywhere... Data centers provide Services for end users Google, Facebook, Dropbox Services for companies

Uses

Documentation◮ how do functions behave?

Anomaly/failure detection◮ is the system behaving normally? Is there a performance regression?

Extrapolation◮ can we scale up?

Composition◮ can we infer the behavior of the caller from the annotations of the callees?

14 / 27

Page 60: Performance Annotations for Cloud Computing · 2019-12-18 · Data Centers Are Everywhere... Data centers provide Services for end users Google, Facebook, Dropbox Services for companies

Case Study

15 / 27

Page 61: Performance Annotations for Cloud Computing · 2019-12-18 · Data Centers Are Everywhere... Data centers provide Services for end users Google, Facebook, Dropbox Services for companies

Case Study

setup

15 / 27

Page 62: Performance Annotations for Cloud Computing · 2019-12-18 · Data Centers Are Everywhere... Data centers provide Services for end users Google, Facebook, Dropbox Services for companies

The System: Application Level

Client

VM

HAProxy

VMnginx

OwnCloudVM

PostgreSQL

VM

NFS

WEBDAV WEBDAV

TCP

TCP

16 / 27

Page 63: Performance Annotations for Cloud Computing · 2019-12-18 · Data Centers Are Everywhere... Data centers provide Services for end users Google, Facebook, Dropbox Services for companies

The System: Computing Resources

ETH

Host01 Host02

Host03 Host04 Host05 Host06 Host07

Host08 Host09 Host10 Host11 Host12

17 / 27

Page 64: Performance Annotations for Cloud Computing · 2019-12-18 · Data Centers Are Everywhere... Data centers provide Services for end users Google, Facebook, Dropbox Services for companies

The System: Computing Resources

ETH + VLAN

Host01

Test

Host02

Openstack

Neutron

Host03 Host04 Host05 Host06 Host07

Host08 Host09 Host10 Host11 Host12

18 / 27

Page 65: Performance Annotations for Cloud Computing · 2019-12-18 · Data Centers Are Everywhere... Data centers provide Services for end users Google, Facebook, Dropbox Services for companies

The System: Computing Resources

ETH + VLAN

STORAGE NODE

Host01

Test

Host02

Openstack

Neutron

Host03 Host04 Host05 Host06 Host07

Host08

Ceph OSD

Host09

Ceph OSD

Host10

Ceph OSD

Host11

Ceph OSD

Host12

Ceph OSD

18 / 27

Page 66: Performance Annotations for Cloud Computing · 2019-12-18 · Data Centers Are Everywhere... Data centers provide Services for end users Google, Facebook, Dropbox Services for companies

The System: Computing Resources

ETH + VLAN

COMPUTE NODE

STORAGE NODE

Host01

Test

Host02

Openstack

Neutron

Host03

Ceph master

DBMS

Host04

Ceph master

NFS server

Host05

Ceph master

Web server

Host06

Sync server

DBMS

Host07

Load balancer

LDAP

Host08

Ceph OSD

Host09

Ceph OSD

Host10

Ceph OSD

Host11

Ceph OSD

Host12

Ceph OSD

18 / 27

Page 67: Performance Annotations for Cloud Computing · 2019-12-18 · Data Centers Are Everywhere... Data centers provide Services for end users Google, Facebook, Dropbox Services for companies

PHP Instrumentation

OwnCloud (php)

function foo(){...}

19 / 27

Page 68: Performance Annotations for Cloud Computing · 2019-12-18 · Data Centers Are Everywhere... Data centers provide Services for end users Google, Facebook, Dropbox Services for companies

PHP Instrumentation

OwnCloud (php)

function foo_inner() {...}

19 / 27

Page 69: Performance Annotations for Cloud Computing · 2019-12-18 · Data Centers Are Everywhere... Data centers provide Services for end users Google, Facebook, Dropbox Services for companies

PHP Instrumentation

OwnCloud (php)

function foo_inner() {...}

foo_inner()

function foo() {

start = time()

end = time()

log(end - start)

}

19 / 27

Page 70: Performance Annotations for Cloud Computing · 2019-12-18 · Data Centers Are Everywhere... Data centers provide Services for end users Google, Facebook, Dropbox Services for companies

Cross-Platform Instrumentation

OwnCloud (php)

function write_to_db() {

...

}

19 / 27

Page 71: Performance Annotations for Cloud Computing · 2019-12-18 · Data Centers Are Everywhere... Data centers provide Services for end users Google, Facebook, Dropbox Services for companies

Cross-Platform Instrumentation

OwnCloud (php)

function write_to_db() {...

trace_id = rnd_string()...

}

19 / 27

Page 72: Performance Annotations for Cloud Computing · 2019-12-18 · Data Centers Are Everywhere... Data centers provide Services for end users Google, Facebook, Dropbox Services for companies

Cross-Platform Instrumentation

OwnCloud (php)

function write_to_db() {...

trace_id = rnd_string()...

}

PostgreSQL (C)

function execute_query() {...

get(trace_id)...

}

19 / 27

Page 73: Performance Annotations for Cloud Computing · 2019-12-18 · Data Centers Are Everywhere... Data centers provide Services for end users Google, Facebook, Dropbox Services for companies

Cross-Platform Instrumentation

OwnCloud (php)

function write_to_db() {...

trace_id = rnd_string()...

}

PostgreSQL (C)

function execute_query() {...

get(trace_id)...

}

Marshaller (C)

marshall() {...

put(trace_id)...

}

Unmarshaller (C)

unmarshall() {...

get(trace_id)...

}

19 / 27

Page 74: Performance Annotations for Cloud Computing · 2019-12-18 · Data Centers Are Everywhere... Data centers provide Services for end users Google, Facebook, Dropbox Services for companies

Case Study

20 / 27

Page 75: Performance Annotations for Cloud Computing · 2019-12-18 · Data Centers Are Everywhere... Data centers provide Services for end users Google, Facebook, Dropbox Services for companies

Case Study

annotations

20 / 27

Page 76: Performance Annotations for Cloud Computing · 2019-12-18 · Data Centers Are Everywhere... Data centers provide Services for end users Google, Facebook, Dropbox Services for companies

It Works!

0

20

40

60

80

100

120

140

160

180

200

220

0 50 100 150 200 250 300

Me

mo

ry (

kb

yte

s)

Collection size

@Mem ∼ 721.362B ∗ |in|+8851.16B

21 / 27

Page 77: Performance Annotations for Cloud Computing · 2019-12-18 · Data Centers Are Everywhere... Data centers provide Services for end users Google, Facebook, Dropbox Services for companies

It Works!

3

4

5

6

7

8

9

0 10 20 30 40 50 60 70 80

Me

mo

ry (

kb

yte

s)

String length

\OC\Files\View::getOwner()

@Mem ∼ 8.240kB

21 / 27

Page 78: Performance Annotations for Cloud Computing · 2019-12-18 · Data Centers Are Everywhere... Data centers provide Services for end users Google, Facebook, Dropbox Services for companies

It Works!

0

0.1

0.2

0.3

0.4

0.5

0.6

0 50 100 150 200 250 300

Tim

e (

ms)

Collection size

\Sabre\DAV\Server::generateMultiStatus()

@Time ∼ 3.6e−03B ∗ |in|2 +3.8e−05B ∗ |in|+6.6e−06B

21 / 27

Page 79: Performance Annotations for Cloud Computing · 2019-12-18 · Data Centers Are Everywhere... Data centers provide Services for end users Google, Facebook, Dropbox Services for companies

It Works!

0

100

200

300

400

500

600

0 20 40 60 80 100 120

Me

mo

ry (

byte

s)

String length

\OC\Files\Cache\Cache::normalize()

@Mem ∼ Norm(

411.9,15.35)

∨Norm(

435.3,24.41)

∨Norm(

448,0)

∨Norm(

459.6,19.48)

∨Norm(

477.6,23.18)

∨Norm(

502.0,18.58)

21 / 27

Page 80: Performance Annotations for Cloud Computing · 2019-12-18 · Data Centers Are Everywhere... Data centers provide Services for end users Google, Facebook, Dropbox Services for companies

Case Study

22 / 27

Page 81: Performance Annotations for Cloud Computing · 2019-12-18 · Data Centers Are Everywhere... Data centers provide Services for end users Google, Facebook, Dropbox Services for companies

Case Study

anomaly detection

22 / 27

Page 82: Performance Annotations for Cloud Computing · 2019-12-18 · Data Centers Are Everywhere... Data centers provide Services for end users Google, Facebook, Dropbox Services for companies

Anomaly Injection

Client

VM

HAProxy

VMnginx

OwnCloudVM

PostgreSQL

VM

NFS

WEBDAV WEBDAV

TCP

TCP

23 / 27

Page 83: Performance Annotations for Cloud Computing · 2019-12-18 · Data Centers Are Everywhere... Data centers provide Services for end users Google, Facebook, Dropbox Services for companies

Anomaly Injection

Client

VM

HAProxy

VMnginx

OwnCloudVM

PostgreSQL

VM

NFS

WEBDAV WEBDAV

TCP

TCP

Added Latency: 1-10ms23 / 27

Page 84: Performance Annotations for Cloud Computing · 2019-12-18 · Data Centers Are Everywhere... Data centers provide Services for end users Google, Facebook, Dropbox Services for companies

Annotations Catch The Anomaly

0

10

20

30

40

50

60

70

80

90

100

0 20 40 60 80 100

%

Annotation robustness (%)

no delay

24 / 27

Page 85: Performance Annotations for Cloud Computing · 2019-12-18 · Data Centers Are Everywhere... Data centers provide Services for end users Google, Facebook, Dropbox Services for companies

Annotations Catch The Anomaly

0

10

20

30

40

50

60

70

80

90

100

0 20 40 60 80 100

%

Annotation robustness (%)

no delay

1ms

24 / 27

Page 86: Performance Annotations for Cloud Computing · 2019-12-18 · Data Centers Are Everywhere... Data centers provide Services for end users Google, Facebook, Dropbox Services for companies

Annotations Catch The Anomaly

0

10

20

30

40

50

60

70

80

90

100

0 20 40 60 80 100

%

Annotation robustness (%)

no delay

1ms

2ms

24 / 27

Page 87: Performance Annotations for Cloud Computing · 2019-12-18 · Data Centers Are Everywhere... Data centers provide Services for end users Google, Facebook, Dropbox Services for companies

Annotations Catch The Anomaly

0

10

20

30

40

50

60

70

80

90

100

0 20 40 60 80 100

%

Annotation robustness (%)

no delay

1ms

2ms

5ms

24 / 27

Page 88: Performance Annotations for Cloud Computing · 2019-12-18 · Data Centers Are Everywhere... Data centers provide Services for end users Google, Facebook, Dropbox Services for companies

Annotations Catch The Anomaly

0

10

20

30

40

50

60

70

80

90

100

0 20 40 60 80 100

%

Annotation robustness (%)

no delay

1ms

2ms

5ms

10ms

24 / 27

Page 89: Performance Annotations for Cloud Computing · 2019-12-18 · Data Centers Are Everywhere... Data centers provide Services for end users Google, Facebook, Dropbox Services for companies

Future

25 / 27

Page 90: Performance Annotations for Cloud Computing · 2019-12-18 · Data Centers Are Everywhere... Data centers provide Services for end users Google, Facebook, Dropbox Services for companies

Ongoing Work - Discussion

Machine learning techniques fine tuning

26 / 27

Page 91: Performance Annotations for Cloud Computing · 2019-12-18 · Data Centers Are Everywhere... Data centers provide Services for end users Google, Facebook, Dropbox Services for companies

Ongoing Work - Discussion

Machine learning techniques fine tuning

Annotations composition◮ stack analysis

26 / 27

Page 92: Performance Annotations for Cloud Computing · 2019-12-18 · Data Centers Are Everywhere... Data centers provide Services for end users Google, Facebook, Dropbox Services for companies

Ongoing Work - Discussion

Machine learning techniques fine tuning

Annotations composition◮ stack analysis

Workload creation◮ can we forge workloads that expose specific behaviors?

26 / 27

Page 93: Performance Annotations for Cloud Computing · 2019-12-18 · Data Centers Are Everywhere... Data centers provide Services for end users Google, Facebook, Dropbox Services for companies

Ongoing Work - Discussion

Machine learning techniques fine tuning

Annotations composition◮ stack analysis

Workload creation◮ can we forge workloads that expose specific behaviors?

Feature Selection◮ Is a heuristically built set of basic features enough?◮ Can we exploit programmers’ knowledge of the system?

26 / 27

Page 94: Performance Annotations for Cloud Computing · 2019-12-18 · Data Centers Are Everywhere... Data centers provide Services for end users Google, Facebook, Dropbox Services for companies

Ongoing Work - Discussion

Machine learning techniques fine tuning

Annotations composition◮ stack analysis

Workload creation◮ can we forge workloads that expose specific behaviors?

Feature Selection◮ Is a heuristically built set of basic features enough?◮ Can we exploit programmers’ knowledge of the system?

Extensive testing◮ Java, DaCapo benchmarks

26 / 27

Page 95: Performance Annotations for Cloud Computing · 2019-12-18 · Data Centers Are Everywhere... Data centers provide Services for end users Google, Facebook, Dropbox Services for companies

Performance Annotations for Cloud Computing

Daniele Rogora∗ Steffen Smolka% Antonio Carzaniga∗ Amer Diwan$

Robert Soulé∗∼

presented by

Daniele Rogora

∗Università della Svizzera italiana %Cornell University $Google ∼Barefoot Networks

HotCloud 2017

27 / 27