WebProphet: Automa0ng Performance Predic0on for Web Services Zhichun - - PowerPoint PPT Presentation

webprophet automa0ng performance predic0on for web
SMART_READER_LITE
LIVE PREVIEW

WebProphet: Automa0ng Performance Predic0on for Web Services Zhichun - - PowerPoint PPT Presentation

WebProphet: Automa0ng Performance Predic0on for Web Services Zhichun Li , Ming Zhang, Zhaosheng Zhu, Yan Chen, Albert Greenberg and Yimin Wang Lab of Internet and Security Technology (LIST) Northwestern University MicrosoG Research 1 1 Web


slide-1
SLIDE 1

1 1

WebProphet: Automa0ng Performance Predic0on for Web Services

Zhichun Li, Ming Zhang, Zhaosheng Zhu, Yan Chen, Albert Greenberg and Yi‐min Wang Lab of Internet and Security Technology (LIST) Northwestern University MicrosoG Research

slide-2
SLIDE 2

2

Web Services Are Prevalent

  • Almost everything is related to Web

– Web search – Web mail – Online shopping – Online Social network – Calendar

slide-3
SLIDE 3

3

  • Amazon: 100ms extra delay  1% sale loss
  • Google search results: 500 ms extra delay  reduce

display ads revenues by up to 20%

Performance Is Important

Web Service A Revenue Revenue SLOW! Web Service B

slide-4
SLIDE 4

4

Web Services Are Complicated

  • Example of Yahoo

Maps

– 110 embedded

  • bjects

– Complex object dependencies – 670KB JavaScript – Hosted by mul]ple data‐centers around the world

slide-5
SLIDE 5

5

Performance Op]miza]on is Hard

Page Load Time Object Dependency Client Delay Net Delay Server Delay DNS Delay Data Transfer RTT Packet loss Load time of Object i TCP 3-WAY

User perceived PLT: whole page or the portion with most visual effects

A large number of possible

  • p]miza]on strategies
slide-6
SLIDE 6

6

Limita]ons with Exis]ng Techniques

  • A/B test (controlled experiments)

– Idea: set up an experiment se`ng and try on a group of users – Problems with A/B test

  • Hard to fully automated
  • Expensive to set up
  • Quite slow!
slide-7
SLIDE 7

7

Limita]ons with Exis]ng Techniques

  • Service provider based techniques (WISE

SIGCOMM2008)

– Problems

  • mul]ple data sources
  • Object dependencies
  • Client side delays, e.g. JavaScript execu]on ]me
  • Regression based techniques (LinkGradient

INFOCOM2009)

– Usually require the independence assump]on on delay factors of each object. Problema0c!

slide-8
SLIDE 8

8

Our Contribu]ons

  • A tool for automated performance predic]on

– Fast predic]on on the user perceived performance – Timing perturba]on based dependency discovery – Dependency driven page load simula]on

Webpage Optimization Performance Gain???

slide-9
SLIDE 9

9

Outline

  • Mo]va]on & Design
  • Dependency Extrac]on
  • Performance Predic]on
  • Implementa]on
  • Evalua]on
  • Conclusion
slide-10
SLIDE 10

Why Are Dependency Discovery Difficult?

  • Simple HTML parsing/DOM traversal is not

enough

– Object requests generated by JavaScript depend

  • n the corresponding .JS files

– Event triggers, such as when image B trigger “onload” event, then image A will be load by JavaScript

  • Extensive browser instrumenta]on is heavy‐

weight and browser dependent

slide-11
SLIDE 11

Our Approach

  • Goal:

– Light‐weight black box based approach – Browser independent

  • Timing perturba]on based technique

– Inject delay – See how delay propagate.

X Objects depend

  • n X
slide-12
SLIDE 12

Take Care HTML Objects

  • Regular Objects

– Regular objects have to be fully loaded before their descendants

  • HTML Objects are special

– HTML is stream objects, allowing incremental rendering

X Y X Y

slide-13
SLIDE 13

Measure the Offset

X Y Z Offset(Z) Offset(Y)

slide-14
SLIDE 14

14

Outline

  • Mo]va]on
  • Design
  • Dependency Extrac]on
  • Performance Predic]on
  • Implementa]on
  • Evalua]on
  • Conclusion
slide-15
SLIDE 15
  • Evaluate different new scenarios

Performance Predic]on Problem

BaseLine New Scenario 1 New Scenario Spec 1 New Scenario n New Scenario Spec n

slide-16
SLIDE 16

Performance Predic]on Procedure

Extract Object timing information Annotate client delay Adjust each of

  • bject according

to new scenario Simulate the page load process Packet Trace Dep. Graph New Scenario Dep. Graph

slide-17
SLIDE 17
  • Extract Timing from packet traces
  • Basic object ]ming info

Reply transfer time Request transfer time Response time

Extract Object Timing informa]on

DNS TCP HTTP

DNS lookup time TCP handshaking time

slide-18
SLIDE 18

Annotate client delay

  • Browser processing ]me aGer dependency

solved

X Client delay

slide-19
SLIDE 19

Adjust Object Timing Info

  • Consider four delay factors: client delay, server

delay, RTT and DNS lookup ]me

  • Adjust ]ming

– Adjust Client delay, DNS lookup ]me, and server response ]me directly – RTT: adjust ΔRTT * number of round trips

slide-20
SLIDE 20

Factors Affected Object Loading

  • Add DNS lookup ]me based on DNS cache
  • Add TCP handshaking ]me for new

connec]ons

  • Add TCP wai]ng ]me when all connec]ons

are not available

slide-21
SLIDE 21

Simulate Page Load Process

A B C D E F

Object Queue A

slide-22
SLIDE 22

Simulate Page Load Process

A B C D E F

Object Queue A C B

slide-23
SLIDE 23

Simulate Page Load Process

A B C D E F

Object Queue A C B D

slide-24
SLIDE 24

Simulate Page Load Process

A B C D E F

Object Queue A B D C E

slide-25
SLIDE 25

Simulate Page Load Process

A B C D E F

Object Queue A B D C E

slide-26
SLIDE 26

Simulate Page Load Process

A B C D E F

Object Queue A B D C E F

slide-27
SLIDE 27

Simulate Page Load Process

A B C D E F

Object Queue A B D C E F New page load time

slide-28
SLIDE 28

28

Outline

  • Mo]va]on
  • Design
  • Dependency Extrac]on
  • Performance Predic]on
  • Implementa]on
  • Evalua]on
  • Conclusion
slide-29
SLIDE 29

29

WebProphet Framework

Browser Control plug‐in Web robot Scrip]ng API Applica]on transac]on script snippet Pcap trace logger Agent network Results New scenario input Dep graphs Web Agent Web Proxy Dependency Extractor Annotate object ]ming info Page simulator Trace Analyzer Performance Predictor Traces

slide-30
SLIDE 30

30

Outline

  • Mo]va]on
  • Design
  • Dependency Extrac]on
  • Performance Predic]on
  • Implementa]on
  • Evalua]on
  • Conclusion
slide-31
SLIDE 31

Dependency Extrac]on Results

  • Google and Yahoo Search
  • Valida]on: manual code analysis

Google Yahoo

slide-32
SLIDE 32

Dependency Extrac]on Results

  • Google and Yahoo Maps
  • Valida]on: create pages with the same dep.

graph and validate the craGed pages

Google Yahoo

slide-33
SLIDE 33

Predic]on Experiment Setup

  • Reduce latency see the improvement on PLT
  • Controlled experiments

– Baseline: high latency – New Scenario: low latency – Use control gateway to inject and remove delays

  • Planetlab experiments

– Baseline: Interna]onal nodes – New scenario: US nodes – Improve all delay factors to be the same as the US node.

slide-34
SLIDE 34

Controlled Experiment

  • Setup: visit Yahoo Maps from Northwestern
  • Baseline: inject 100ms RTT to one DC
  • New Scenario: removing the 100ms RTT

injected

DC Err (median) Err (P95) Akamai 16.0% 11.8% YDC1 6.5% 9.7% YDC2 14.8% 6.0%

slide-35
SLIDE 35

Planetlab Experiment

  • Baseline: A Interna]onal node with rela]ve

poor performance

  • New Scenario: a US node

Service Baseline New Err(median) Err(P95) Gsearch Singapore US 2.0% 10.7% Ysearch Japan US 6.1% 0.3% Gmap Sweden US 1.2% 1.8% Ymap Poland US 0.7% 1.3%

slide-36
SLIDE 36

Usage Scenarios

  • Analyze how to improve Yahoo Maps

– Only want to op]mize a small number of objects – Use a greedy based search – Evaluate 2,176 hypothe]cal scenarios in 20 secs, find that

  • Move 5 objects to CDN: 14.8%
  • Reduce client delays of 14 objects to half: 26.6%
  • Combine both: 40.1% (4secs to 2.4secs)
slide-37
SLIDE 37

37

Outline

  • Mo]va]on
  • Design
  • Dependency Extrac]on
  • Performance Predic]on
  • Implementa]on
  • Evalua]on
  • Conclusion
slide-38
SLIDE 38

Conclusions

  • Web service performance predic]on is hard

– Modern web services are complicated – Object dependencies are very important

  • Design an automated tool for performance

predic]on

– Dependency discovery – Dependency driven performance predica]on – Evalua]on on the accuracy and usefulness of our tool

slide-39
SLIDE 39

Q & A Thanks!