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
95
Embed
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
This document is posted to help you gain knowledge. Please leave a comment to let me know what you think about it! Share it to your friends and learn new things together.
Transcript
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
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
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
... 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
... 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
... 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
... 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
... 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
... 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
... 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
... 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
... 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
... 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
... 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
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
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
Goal: Creating a New Model
We want to build a dynamic performance model for data centers
comprehensive
live
interactive
6 / 27
Goal: Creating a New Model
We want to build a dynamic performance model for data centers
comprehensive
live
interactive
Logs
Query
Model
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
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
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
Performance Annotations
7 / 27
Example: a Web Service
Request Response
System
The response time grows quadratically
with the size of the body of the request
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)
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
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
Example: a Web Service
Request Response
System
Machine 1 Machine 7
Example: a Web Service
Request Response
System
Machine 1 Machine 7VM PostgreSQL
Example: a Web Service
Request Response
System
Machine 1 Machine 7VM PostgreSQL
Apache WS
Example: a Web Service
Request Response
System
Machine 1 Machine 7VM PostgreSQL
Apache WSOwnCloud
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
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
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
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
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
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
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
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
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
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
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
How To Create Annotations
10 / 27
Instrumentation
11 / 27
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
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