Top Banner
Capacidade Planejada Rodrigo Albani de Campos - [email protected] - @xinu Wednesday, August 25, 2010
33
Welcome message from author
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
Page 1: Capacidade Planejada

Capacidade PlanejadaRodrigo Albani de Campos - [email protected] - @xinu

Wednesday, August 25, 2010

Page 2: Capacidade Planejada

Agenda

• Motivações

• Capacidade + Velocidade

• Universal Scalability Model

• Extra: Dimensionamento de pools

Wednesday, August 25, 2010

Page 3: Capacidade Planejada

Impacto na imagem do produto

Wednesday, August 25, 2010

Page 4: Capacidade Planejada

Impacto na imagem do produto

Wednesday, August 25, 2010

Page 5: Capacidade Planejada

Amazon 2010Q1 Net Sales$7.13 Billion Dollars

SLA Horas / Trimestre Impacto $

98% 43,2 $142.600.000

99% 21,6 $71.300.000

99,90% 2,16 $7.130.000

99,99% 0,216 $713.000

99,9990% 0,0216 $71.300

99,9999% 0,00216 $7.130

Wednesday, August 25, 2010

Page 6: Capacidade Planejada

ReceitaImpacto de lentidão na entrega de conteúdoThe User and Business Impact of Server Delays, Additional Bytes, and HTTP Chunking in Web Search - Eric Schurman (Amazon), Jake Brutlag (Google)

Distinct Queries/User

Query Refinement

Revenue/User

Any Clicks Satisfaction Time to Click (increase in

ms)

50ms

200ms

500ms

1000ms

2000ms

0 0 0 0 0 0

0 0 0 -0,30% -0,40% 500

0 -0,60% -1,20% -1,00% -0,90% 1200

-0,70% -0,90% -2,80% -1,90% -1,60% 1900

-1,80% -2,10% -4,30% -4,40% -3,80% 3100

$85.000.000 em três meses na Amazon

Wednesday, August 25, 2010

Page 7: Capacidade Planejada

ReceitaImpacto de lentidão na entrega de conteúdoThe User and Business Impact of Server Delays, Additional Bytes, and HTTP Chunking in Web Search - Eric Schurman (Amazon), Jake Brutlag (Google)

Wednesday, August 25, 2010

Page 8: Capacidade Planejada

“Fast isn’t a feature, fast is a Requirement”

Jesse Robins - OPSCode

Wednesday, August 25, 2010

Page 9: Capacidade Planejada

Composição de páginas na Web - Top SitesWeb Metrics: Size and number of resources - Sreeram Ramachandranhttp://code.google.com/speed/articles/web-metrics.html

Average # of resources /

page

Average # of hosts / page

Average document size

Kb

42,14 8,39 477,26

Wednesday, August 25, 2010

Page 10: Capacidade Planejada

http://www.webpagetest.org/ TEST RESULTSJuly 2010

Load Time

Mercado Livre 1,972Ebay 1,999Amazon 4,777newegg 6,848Bestbuy 7,508Submarino 10,436Casas Bahia 15,09

First Byte Start Render

Complete Time (s)

Requests Bytes In

329 ms 543 ms 2,491 22 74 KB

399 ms 1493 ms 3,103 36 237 KB

504 ms 1105 ms 6,289 69 454 KB

328 ms 1211 ms 7,891 138 459 KB

447 ms 1733 ms 10,41 99 676 KB

250 ms 2474 ms 10,436 151 1,125 KB

500 ms 4401 ms 15,799 100 732 KB

Wednesday, August 25, 2010

Page 11: Capacidade Planejada

Capacity and Velocity

Wednesday, August 25, 2010

Page 12: Capacidade Planejada

Queuing Theory 101

Service time: Tempo de ocupação do recurso (s,ms,μs)

Arrival rate: Taxa de chegada de requisições para o recurso (hit/s,qps,etc...)

Little’s Law: The long term average number of customers in a stable system L is equal to the long term average arrival rate λ, multiplied by the long term average time a customer spends in the system, W

Wednesday, August 25, 2010

Page 13: Capacidade Planejada

Average Service Time against Arrival Rates

0

200

400

600

800

1000

1200

1400

1600

0

0,01

0,02

0,03

0,04

0,05

0,06

0,07

0,08

0,09

0,1

0 50 100 150 200 250 300

Freq

uency

Service  Time  (s)

Hits/s

Service  A

Service  Time Frequency

Wednesday, August 25, 2010

Page 14: Capacidade Planejada

Average Service Time against Arrival Rates

0

1000

2000

3000

4000

5000

6000

0

0,5

1

1,5

2

2,5

0 20 40 60 80 100 120 140 160 180 200

Freq

uency

Service  Time  (s)

Hits/s

Service  B

Service  Time Frequency

Wednesday, August 25, 2010

Page 15: Capacidade Planejada

APDEX - http://www.apdex.org

0

1000

2000

3000

4000

5000

6000

0

0,5

1

1,5

2

2,5

0 20 40 60 80 100 120 140 160 180 200

Freq

uency

Service  Time  (s)

Hits/s

Service  B

Service  Time FrequencySatisfied

Tolerating

Frustrated

Wednesday, August 25, 2010

Page 16: Capacidade Planejada

APDEX - http://www.apdex.org

Satisfied Tolerating Frustrated

Wednesday, August 25, 2010

Page 17: Capacidade Planejada

APDEX - http://www.apdex.org

SamplesSatisfiedTolerating

Apdex

1200010000

800

86,67%

Wednesday, August 25, 2010

Page 18: Capacidade Planejada

Forecasting (Sort of...)

Wednesday, August 25, 2010

Page 19: Capacidade Planejada

Forecasting (Sort of...)

0

5

10

15

20

25

30

35

40

0 10 20 30 40 50 60 70

Throughput

Virtual  Users

System  C

Measured  X

Measured ThroughputUsers (N) X(N)

1 2,912 5,674 10,868 18,65

16 25,9132 36,6864 37,34

Wednesday, August 25, 2010

Page 20: Capacidade Planejada

Forecasting (Sort of...)

0

5

10

15

20

25

30

35

40

45

0 10 20 30 40 50 60 70 80 90

Throughput

Virtual  Users

System  C

Measured  X Poly.  (Measured  X)

Wednesday, August 25, 2010

Page 21: Capacidade Planejada

Forecasting (Sort of...)

0

5

10

15

20

25

30

35

40

45

0 10 20 30 40 50 60 70 80 90

Throughput

Virtual  Users

System  C

Measured  X Poly.  (Measured  X)

Wednesday, August 25, 2010

Page 22: Capacidade Planejada

0

5

10

15

20

25

30

35

40

0 20 40 60 80 100 120 140

Throughput

Virtual  Users

System  C

Measured  X Modeled  X(N)

Using the Universal Scalability ModelNeil J. Gunther http://www.perfdynamics.com/Test/gcaprules.html#sec:scalability

Wednesday, August 25, 2010

Page 23: Capacidade Planejada

0

10

20

30

40

50

60

0 100 200 300 400 500 600

Throughput

Virtual  Users

System  D

Measured  X Modeled  X(N)

Using the Universal Scalability ModelNeil J. Gunther http://www.perfdynamics.com/Test/gcaprules.html#sec:scalability

Wednesday, August 25, 2010

Page 24: Capacidade Planejada

Conclusões e Considerações

• Velocidade é tão importante quanto disponibilidade

• Fast is a requirement

• O SLA deve ser definido considerando a experiência do usuário

• Não existem bolas de cristal

Wednesday, August 25, 2010

Page 25: Capacidade Planejada

In God we trust.Everyone else

please show me the data.

Wednesday, August 25, 2010

Page 26: Capacidade Planejada

http://capacitricks.wordpress.com/

Wednesday, August 25, 2010

Page 27: Capacidade Planejada

How many servers do we need ?

Wednesday, August 25, 2010

Page 28: Capacidade Planejada

Redundância

55%

55%

55%

55%

Wednesday, August 25, 2010

Page 29: Capacidade Planejada

Redundância

73,3%

73,3%

73,3%

X

Wednesday, August 25, 2010

Page 30: Capacidade Planejada

Redundância

110%

110%

XX

Wednesday, August 25, 2010

Page 31: Capacidade Planejada

How many servers do we need ?

Wednesday, August 25, 2010

Page 32: Capacidade Planejada

How many servers do we need ?

Wednesday, August 25, 2010

Page 33: Capacidade Planejada

Perguntas ?

Wednesday, August 25, 2010