SlideShare ist ein Scribd-Unternehmen logo
1 von 27
The Art and Science of
                   Web Performance


                              Daniel Austin
                              Technical Staff
                              Paypal, Inc.
CMU Invited Lecture
August 02 , 2012              daaustin@paypal.com
V1.1                          @daniel_b_austin
TODAY’S PROGRAM


Overture: Web Performance As Art And
 Science

First the Theory…

…Then the Practice

Coda: Making the Web Faster and Smarter


                            Confidential and Proprietary   8/2/2012
STATE OF THE ART?

• An Art and a Science
• Very Little Prior Art
• Users Suffer –
  • The World Wide Wait isn’t over yet!
• Rapid Change in the Industry
  • Browsers
  • Devices
  • Standards
• The Rest of the World is Catching Up
  • Challenges of Global/Local/Mobile/Social
    Performance
                                   Confidential and Proprietary   8/2/2012
PERFORMANCE IS RESPONSE TIME

  PERFORMANCE IS RESPONSE TIME

      PERFORMANCE IS RESPONSE TIME


        PERFORMANCE IS RESPONSE TIME


(It’s not latency, it’s not bandwidth, it’s not queue
 residence time or queue length or any such thing.)




                                        Confidential and Proprietary   8/2/2012
Who needs
    ‘Performance’
    measurements
       anyway?

?




                    Confidential and Proprietary
A MORE RATIONAL APPROACH?




                            Confidential and Proprietary
DIMENSIONS OF PERFORMANCE

• Geography/Network location
• Bandwidth/Transport Type
• Browser/Device Type
  • RT Varies by as much as 50%
• Page Composition
  • Client-side rendering and execution
    effects (JS, CSS)
  • Network Transport Effects
    • # of Connections, CDN Use



                                  Confidential and Proprietary   8/2/2012
THE MPPC MODEL OF WEB PERFORMANCE
                “Multiple Parallel Persistent Connections”
              Request                             DNS/Network
            Initiation by      HTTP Request        Resolution                      HTTP Request
                 User                                 t1

                            This entire cycle, steps 1-4, is repeated once for each external
                                                                                                                 Page
                            reference on the page, so for a given page the total time is:                     Composition
                   S                  T = S Dt1 + Dt2 + Dt3 + Dt4                                                  t2
                  n+1                     n+1
End User                    Where n is the number of external page requisites.

                                                    Payload
              Browser          HTTP Response      Delivery Time                     HTTP Response
           Rendering Time                             t3
                 t4



           T1                        T2                           T3                         T4
           Connection Time           Server Duration              Transport Time             Render Time



                                                                               Confidential and Proprietary      8/2/2012
HTTP CONNECTION FLOW

                 Client                      Server
                          Connection setup (t1)

                                                  Handshake time
                                                  Request transmission
Client’s perceived                                time
response time                Request (t2)         Estimated server
                                                  processing time
                                                  Response transmission
                             Response (t3)
                                                  time



   The more HTTP requests & network roundtrips you require, the slower
   your site will be: Images, CSS, JS, DNS lookups, Redirects, #of
   packets

                                                    Confidential and Proprietary   8/2/2012
T1 – MAKING THE CONNECTION




     1=   DNS   +   TCP+   SSL
                                 Confidential and Proprietary   8/2/2012
T2 – THE SERVER DURATION
                                • Let (            )        r


                                • U      = ( r)[                     r
                                                                         W]



                                • X      =U*

                                • Navg =
                                  ( r [W( r)W+1 -
                                  (W+1)( r)W+1]



                                • … so 2 = Navg/X
                                  (The response
                                  time law)

Never mind - it’s a constant!

                                      Confidential and Proprietary        8/2/2012
T3 – TCP TRANSPORT TIME


Single Object:

 3   = Sz/R+2RTT+   idle




For persistent parallel connections:

 3   = (M+1)Si/Ri+[M/kNh]*3 RTTi+      idle

… for 1 base HTML page with M objects, with Si
bits, at bandwidth Ri, k connections per
host, and Nh unique hostnames

                                              Confidential and Proprietary   8/2/2012
T4 – WHAT THE BROWSER DOES




                             Confidential and Proprietary   8/2/2012
BANDWIDTH EFFICIENCY
                  Bmax = 1.22*(L)^1/2 * MSS/RTT




                            Confidential and Proprietary   8/2/2012
WHERE ARE THE DELAYS?




                        Confidential and Proprietary   8/2/2012
LET’S TALK TOOLS
Site Performance Services         Page Analysis Tools
   – Gomez                           – YSlow
   – Keynote                         – MS Virtual RoundTrip
   – WebPagestest.Org                  Analyzer,
• ‘Wholesale’ Testing                  HTTPWatch, Many
                                       Others
   – Statistical data for many
     page views under different      – F12 in your browser
     conditions                   • ‘Retail’ Testing
   – Operational testing             – One Page or App
   – Best for understanding          – Diagnostic
     global and network effects      – Best for functional
                                       testing




                                            Confidential and Proprietary
COMMERCIAL TESTING SERVICES
•   Gomez, AlertSite, and Keynote toolsets are similar in many
    ways
     •   Synthetic Test Setup
     •   Test nodes in large datacenters and/or end user’s machines
     •   Statistical data about response times


•   You can do this for yourself on a smaller scale at
    WebPageTest.org




                                                       Confidential and Proprietary   8/2/2012
HAPPY BIRTHDAY, YSLOW!

Methodology
   – DOM Crawler and Packet
     Sniffer
   – More accurate
   – Analyzes components
   – Stats view



Implements the 14 18 22 105
  YSlow Rules
   – All browsers except IE
   – Mobile bookmarklet
   – Best tool for page analysis




                                   Confidential and Proprietary
TESTING YOUR COMPETITORS FOR FUN &
PROFIT
 •   Try to measure task sequences not pages
 •   Be prepared for lots of breakage
 •   Be respectful
 •   Difficult and time-consuming




                                   Confidential and Proprietary   8/2/2012
TASK-BASED PERFORMANCE THINKING

                                                          Welcome                        1400
                                                          Inbox                          2200
                            Inbox                         Bulk                           3200
                            (B)                           …
                                        61.77%



     P(A,B) = 0.5168
                                                     Read
                       10.04%      66.25%            Message
                                                     (D)                     Verify
                                                                             (F)
                                            34.52%
    Welcome 9.85%           Bulk
    (A)                     (C)                  58.07%
                                                           64.53%
                                                                     22.30%             34.38%


                         35.02%

                                                                             Send
                                                     Compose28.04%
                                                                             Confirm
                                                     (E)
                                                                             (G)




                                                                    Confidential and Proprietary   8/2/2012
GLOBAL PERFORMANCE TESTING (BRIEFLY)

• Cannot compare performance data out-of-region
• There are many global factors involved in
  performance:
   • Bandwidth
   • ISP
   • Infrastructure
   • Secular cycles (weeks, holidays, usage patterns)
• The best approach: use the relative ‘StormCat’
  system
   • Best case (Northern California high broadband @3 AM)
   • Worst Case (rural Indonesia on VSNL @ 2PM local)
   • Divide the range into 5 categories equally spaced
     between the best & worst: some locales will be in Cat I,
     some in Cat II, some in Cat III, etc.
                                             Confidential and Proprietary   8/2/2012
BAKE IT IN UP FRONT
Performance Engineering is a
design-time activity!

This is absolutely crucial!

Anti-Pattern: Releasing a
new or modified product
without testing its
performance.

Seriously.




                               Confidential and Proprietary
QUANTIFY




           Confidential and Proprietary
KNOW THE LANDSCAPE
  “What are the differences among browsers?”

  “What are my competitors doing?”

  “What about low bandwidth users?

  “How can I test that?”




                                          Confidential and Proprietary   8/2/2012
THE 7 HABITS OF EXCEPTIONAL
PERFORMANCE
 1.   Make Performance a Priority
 2.   Test, Measure, Test Again
 3.   Learn about the Tools
 4.   Balance Performance with Features
 5.   Track Results Over Time
 6.   Set Targets
 7.   Ask Questions; Check It for Yourself!




                                Confidential and Proprietary
CODA: MAKING THE WEB SMARTER AND
FASTER

• Faster HTTP
  • SPDY
  • HTTP Speed+Mobility
  • Scratch
• Better Browsers
  • Chrome has disrupted the market
  • HTML5 will drive further evolution
• Moving to Mobile/Device Platforms
  • More sensitive to network effects of all kinds
  • Application-driven user experience
  • Moving away from Hypertext?
                                    Confidential and Proprietary   8/2/2012
42



Michael Faraday is the father of network performance, having
performed the first bandwidth measurements on the first
transatlantic telegraph cable in 1854.



                                  Daniel Austin
                                  Technical Staff
   CMU Invited Lecture            Paypal, Inc.
   August 02 , 2012
   V1.1
                                  daaustin@paypal.com
                                  @daniel_b_austin

Weitere ähnliche Inhalte

Ähnlich wie Performance analysisclass

stackconf 2023 | How the Network Protocols You Choose Ultimately Affect Your ...
stackconf 2023 | How the Network Protocols You Choose Ultimately Affect Your ...stackconf 2023 | How the Network Protocols You Choose Ultimately Affect Your ...
stackconf 2023 | How the Network Protocols You Choose Ultimately Affect Your ...
NETWAYS
 
Next Gen Data Modeling in the Open Data Platform With Doron Porat and Liran Y...
Next Gen Data Modeling in the Open Data Platform With Doron Porat and Liran Y...Next Gen Data Modeling in the Open Data Platform With Doron Porat and Liran Y...
Next Gen Data Modeling in the Open Data Platform With Doron Porat and Liran Y...
HostedbyConfluent
 
D1-3-Signaling
D1-3-SignalingD1-3-Signaling
D1-3-Signaling
Oleg Levy
 
Reverse Engineering Finite State Machines from Rich Internet Applications
Reverse Engineering Finite State Machines from Rich Internet ApplicationsReverse Engineering Finite State Machines from Rich Internet Applications
Reverse Engineering Finite State Machines from Rich Internet Applications
Porfirio Tramontana
 

Ähnlich wie Performance analysisclass (20)

OpenStack Summit Tokyo - Know-how of Challlenging Deploy/Operation NTT DOCOMO...
OpenStack Summit Tokyo - Know-how of Challlenging Deploy/Operation NTT DOCOMO...OpenStack Summit Tokyo - Know-how of Challlenging Deploy/Operation NTT DOCOMO...
OpenStack Summit Tokyo - Know-how of Challlenging Deploy/Operation NTT DOCOMO...
 
Web Architecture and Technologies
Web Architecture and TechnologiesWeb Architecture and Technologies
Web Architecture and Technologies
 
Web Introduction
Web IntroductionWeb Introduction
Web Introduction
 
Next generation web protocols
Next generation web protocolsNext generation web protocols
Next generation web protocols
 
Reactive Stream Processing Using DDS and Rx
Reactive Stream Processing Using DDS and RxReactive Stream Processing Using DDS and Rx
Reactive Stream Processing Using DDS and Rx
 
stackconf 2023 | How the Network Protocols You Choose Ultimately Affect Your ...
stackconf 2023 | How the Network Protocols You Choose Ultimately Affect Your ...stackconf 2023 | How the Network Protocols You Choose Ultimately Affect Your ...
stackconf 2023 | How the Network Protocols You Choose Ultimately Affect Your ...
 
Next Gen Data Modeling in the Open Data Platform With Doron Porat and Liran Y...
Next Gen Data Modeling in the Open Data Platform With Doron Porat and Liran Y...Next Gen Data Modeling in the Open Data Platform With Doron Porat and Liran Y...
Next Gen Data Modeling in the Open Data Platform With Doron Porat and Liran Y...
 
BlazeMeter- Effective Performance Reporting
BlazeMeter- Effective Performance ReportingBlazeMeter- Effective Performance Reporting
BlazeMeter- Effective Performance Reporting
 
BlazeMeter Effective Performance Reporting
BlazeMeter Effective Performance Reporting BlazeMeter Effective Performance Reporting
BlazeMeter Effective Performance Reporting
 
D1-3-Signaling
D1-3-SignalingD1-3-Signaling
D1-3-Signaling
 
Part 7 : HTTP/2, UDP and TCP
Part 7 : HTTP/2, UDP and TCPPart 7 : HTTP/2, UDP and TCP
Part 7 : HTTP/2, UDP and TCP
 
Communication Mechanisms, Past, Present & Future
Communication Mechanisms, Past, Present & FutureCommunication Mechanisms, Past, Present & Future
Communication Mechanisms, Past, Present & Future
 
Communication middleware
Communication middlewareCommunication middleware
Communication middleware
 
Lifting the hood on spark streaming - StampedeCon 2015
Lifting the hood on spark streaming - StampedeCon 2015Lifting the hood on spark streaming - StampedeCon 2015
Lifting the hood on spark streaming - StampedeCon 2015
 
Reverse Engineering Finite State Machines from Rich Internet Applications
Reverse Engineering Finite State Machines from Rich Internet ApplicationsReverse Engineering Finite State Machines from Rich Internet Applications
Reverse Engineering Finite State Machines from Rich Internet Applications
 
Discover problems in your distributed system before it's too late
Discover problems in your distributed system before it's too lateDiscover problems in your distributed system before it's too late
Discover problems in your distributed system before it's too late
 
Chapter2 Application
Chapter2 ApplicationChapter2 Application
Chapter2 Application
 
Ch. x web performance
Ch. x web performanceCh. x web performance
Ch. x web performance
 
Web Transactions
Web TransactionsWeb Transactions
Web Transactions
 
Communication Patterns Using Data-Centric Publish/Subscribe
Communication Patterns Using Data-Centric Publish/SubscribeCommunication Patterns Using Data-Centric Publish/Subscribe
Communication Patterns Using Data-Centric Publish/Subscribe
 

Mehr von Daniel Austin

Mehr von Daniel Austin (18)

Always Offline: Delay-Tolerant Networking for the Internet of Things
Always Offline: Delay-Tolerant Networking for the Internet of ThingsAlways Offline: Delay-Tolerant Networking for the Internet of Things
Always Offline: Delay-Tolerant Networking for the Internet of Things
 
Performance: How Fast is Fast Enough?
Performance: How Fast is Fast Enough?Performance: How Fast is Fast Enough?
Performance: How Fast is Fast Enough?
 
Big Data and the Future of Money 2014
Big Data and the Future of Money 2014Big Data and the Future of Money 2014
Big Data and the Future of Money 2014
 
Big data comes in small packages v1.2
Big data comes in small packages v1.2Big data comes in small packages v1.2
Big data comes in small packages v1.2
 
Designing Delay-tolerant Data Services for the Network of Things
Designing Delay-tolerant Data Services for the Network of ThingsDesigning Delay-tolerant Data Services for the Network of Things
Designing Delay-tolerant Data Services for the Network of Things
 
Web Performance Bootcamp 2014
Web Performance Bootcamp 2014Web Performance Bootcamp 2014
Web Performance Bootcamp 2014
 
Managing Performance Globally with MySQL
Managing Performance Globally with MySQLManaging Performance Globally with MySQL
Managing Performance Globally with MySQL
 
Perspectives on the Evolution of HTML
Perspectives on the Evolution of HTMLPerspectives on the Evolution of HTML
Perspectives on the Evolution of HTML
 
The Fastest Possible Search Algorithm: Grover's Search and the World of Quant...
The Fastest Possible Search Algorithm: Grover's Search and the World of Quant...The Fastest Possible Search Algorithm: Grover's Search and the World of Quant...
The Fastest Possible Search Algorithm: Grover's Search and the World of Quant...
 
Quantum Computing in a Nutshell: Grover's Search and the World of Quantum Com...
Quantum Computing in a Nutshell: Grover's Search and the World of Quantum Com...Quantum Computing in a Nutshell: Grover's Search and the World of Quantum Com...
Quantum Computing in a Nutshell: Grover's Search and the World of Quantum Com...
 
Reconceiving the Web as a Distributed (NoSQL) Data System
Reconceiving the Web as a Distributed (NoSQL) Data SystemReconceiving the Web as a Distributed (NoSQL) Data System
Reconceiving the Web as a Distributed (NoSQL) Data System
 
Big data and the Future of Money (World Big Data Congress 2013)
Big data and the Future of Money (World Big Data Congress 2013)Big data and the Future of Money (World Big Data Congress 2013)
Big data and the Future of Money (World Big Data Congress 2013)
 
Big Data is a Big Scam Most of the Time! (MySQL Connect Keynote 2012)
Big Data is a Big Scam Most of the Time! (MySQL Connect Keynote 2012)Big Data is a Big Scam Most of the Time! (MySQL Connect Keynote 2012)
Big Data is a Big Scam Most of the Time! (MySQL Connect Keynote 2012)
 
Yes sql08 inmemorydb
Yes sql08 inmemorydbYes sql08 inmemorydb
Yes sql08 inmemorydb
 
The Fastest Possible Search Algorithm
The Fastest Possible Search AlgorithmThe Fastest Possible Search Algorithm
The Fastest Possible Search Algorithm
 
A Global In-memory Data System for MySQL
A Global In-memory Data System for MySQLA Global In-memory Data System for MySQL
A Global In-memory Data System for MySQL
 
Notes on a High-Performance JSON Protocol
Notes on a High-Performance JSON ProtocolNotes on a High-Performance JSON Protocol
Notes on a High-Performance JSON Protocol
 
Wrestling Large Data Volumes to the Ground
Wrestling Large Data Volumes to the GroundWrestling Large Data Volumes to the Ground
Wrestling Large Data Volumes to the Ground
 

Kürzlich hochgeladen

CNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of ServiceCNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of Service
giselly40
 
Artificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and MythsArtificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and Myths
Joaquim Jorge
 

Kürzlich hochgeladen (20)

A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)
 
What Are The Drone Anti-jamming Systems Technology?
What Are The Drone Anti-jamming Systems Technology?What Are The Drone Anti-jamming Systems Technology?
What Are The Drone Anti-jamming Systems Technology?
 
Handwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsHandwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed texts
 
GenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationGenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day Presentation
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected Worker
 
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
 
CNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of ServiceCNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of Service
 
Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024
 
Exploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone ProcessorsExploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone Processors
 
08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men
 
Artificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and MythsArtificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and Myths
 
Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024
 
🐬 The future of MySQL is Postgres 🐘
🐬  The future of MySQL is Postgres   🐘🐬  The future of MySQL is Postgres   🐘
🐬 The future of MySQL is Postgres 🐘
 
2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...
 
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdfThe Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
 
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
 
Understanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdfUnderstanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdf
 
Breaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path MountBreaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path Mount
 
Boost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityBoost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivity
 
Boost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfBoost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdf
 

Performance analysisclass

  • 1. The Art and Science of Web Performance Daniel Austin Technical Staff Paypal, Inc. CMU Invited Lecture August 02 , 2012 daaustin@paypal.com V1.1 @daniel_b_austin
  • 2. TODAY’S PROGRAM Overture: Web Performance As Art And Science First the Theory… …Then the Practice Coda: Making the Web Faster and Smarter Confidential and Proprietary 8/2/2012
  • 3. STATE OF THE ART? • An Art and a Science • Very Little Prior Art • Users Suffer – • The World Wide Wait isn’t over yet! • Rapid Change in the Industry • Browsers • Devices • Standards • The Rest of the World is Catching Up • Challenges of Global/Local/Mobile/Social Performance Confidential and Proprietary 8/2/2012
  • 4. PERFORMANCE IS RESPONSE TIME PERFORMANCE IS RESPONSE TIME PERFORMANCE IS RESPONSE TIME PERFORMANCE IS RESPONSE TIME (It’s not latency, it’s not bandwidth, it’s not queue residence time or queue length or any such thing.) Confidential and Proprietary 8/2/2012
  • 5. Who needs ‘Performance’ measurements anyway? ? Confidential and Proprietary
  • 6. A MORE RATIONAL APPROACH? Confidential and Proprietary
  • 7. DIMENSIONS OF PERFORMANCE • Geography/Network location • Bandwidth/Transport Type • Browser/Device Type • RT Varies by as much as 50% • Page Composition • Client-side rendering and execution effects (JS, CSS) • Network Transport Effects • # of Connections, CDN Use Confidential and Proprietary 8/2/2012
  • 8. THE MPPC MODEL OF WEB PERFORMANCE “Multiple Parallel Persistent Connections” Request DNS/Network Initiation by HTTP Request Resolution HTTP Request User t1 This entire cycle, steps 1-4, is repeated once for each external Page reference on the page, so for a given page the total time is: Composition S T = S Dt1 + Dt2 + Dt3 + Dt4 t2 n+1 n+1 End User Where n is the number of external page requisites. Payload Browser HTTP Response Delivery Time HTTP Response Rendering Time t3 t4 T1 T2 T3 T4 Connection Time Server Duration Transport Time Render Time Confidential and Proprietary 8/2/2012
  • 9. HTTP CONNECTION FLOW Client Server Connection setup (t1) Handshake time Request transmission Client’s perceived time response time Request (t2) Estimated server processing time Response transmission Response (t3) time The more HTTP requests & network roundtrips you require, the slower your site will be: Images, CSS, JS, DNS lookups, Redirects, #of packets Confidential and Proprietary 8/2/2012
  • 10. T1 – MAKING THE CONNECTION 1= DNS + TCP+ SSL Confidential and Proprietary 8/2/2012
  • 11. T2 – THE SERVER DURATION • Let ( ) r • U = ( r)[ r W] • X =U* • Navg = ( r [W( r)W+1 - (W+1)( r)W+1] • … so 2 = Navg/X (The response time law) Never mind - it’s a constant! Confidential and Proprietary 8/2/2012
  • 12. T3 – TCP TRANSPORT TIME Single Object: 3 = Sz/R+2RTT+ idle For persistent parallel connections: 3 = (M+1)Si/Ri+[M/kNh]*3 RTTi+ idle … for 1 base HTML page with M objects, with Si bits, at bandwidth Ri, k connections per host, and Nh unique hostnames Confidential and Proprietary 8/2/2012
  • 13. T4 – WHAT THE BROWSER DOES Confidential and Proprietary 8/2/2012
  • 14. BANDWIDTH EFFICIENCY Bmax = 1.22*(L)^1/2 * MSS/RTT Confidential and Proprietary 8/2/2012
  • 15. WHERE ARE THE DELAYS? Confidential and Proprietary 8/2/2012
  • 16. LET’S TALK TOOLS Site Performance Services Page Analysis Tools – Gomez – YSlow – Keynote – MS Virtual RoundTrip – WebPagestest.Org Analyzer, • ‘Wholesale’ Testing HTTPWatch, Many Others – Statistical data for many page views under different – F12 in your browser conditions • ‘Retail’ Testing – Operational testing – One Page or App – Best for understanding – Diagnostic global and network effects – Best for functional testing Confidential and Proprietary
  • 17. COMMERCIAL TESTING SERVICES • Gomez, AlertSite, and Keynote toolsets are similar in many ways • Synthetic Test Setup • Test nodes in large datacenters and/or end user’s machines • Statistical data about response times • You can do this for yourself on a smaller scale at WebPageTest.org Confidential and Proprietary 8/2/2012
  • 18. HAPPY BIRTHDAY, YSLOW! Methodology – DOM Crawler and Packet Sniffer – More accurate – Analyzes components – Stats view Implements the 14 18 22 105 YSlow Rules – All browsers except IE – Mobile bookmarklet – Best tool for page analysis Confidential and Proprietary
  • 19. TESTING YOUR COMPETITORS FOR FUN & PROFIT • Try to measure task sequences not pages • Be prepared for lots of breakage • Be respectful • Difficult and time-consuming Confidential and Proprietary 8/2/2012
  • 20. TASK-BASED PERFORMANCE THINKING Welcome 1400 Inbox 2200 Inbox Bulk 3200 (B) … 61.77% P(A,B) = 0.5168 Read 10.04% 66.25% Message (D) Verify (F) 34.52% Welcome 9.85% Bulk (A) (C) 58.07% 64.53% 22.30% 34.38% 35.02% Send Compose28.04% Confirm (E) (G) Confidential and Proprietary 8/2/2012
  • 21. GLOBAL PERFORMANCE TESTING (BRIEFLY) • Cannot compare performance data out-of-region • There are many global factors involved in performance: • Bandwidth • ISP • Infrastructure • Secular cycles (weeks, holidays, usage patterns) • The best approach: use the relative ‘StormCat’ system • Best case (Northern California high broadband @3 AM) • Worst Case (rural Indonesia on VSNL @ 2PM local) • Divide the range into 5 categories equally spaced between the best & worst: some locales will be in Cat I, some in Cat II, some in Cat III, etc. Confidential and Proprietary 8/2/2012
  • 22. BAKE IT IN UP FRONT Performance Engineering is a design-time activity! This is absolutely crucial! Anti-Pattern: Releasing a new or modified product without testing its performance. Seriously. Confidential and Proprietary
  • 23. QUANTIFY Confidential and Proprietary
  • 24. KNOW THE LANDSCAPE “What are the differences among browsers?” “What are my competitors doing?” “What about low bandwidth users? “How can I test that?” Confidential and Proprietary 8/2/2012
  • 25. THE 7 HABITS OF EXCEPTIONAL PERFORMANCE 1. Make Performance a Priority 2. Test, Measure, Test Again 3. Learn about the Tools 4. Balance Performance with Features 5. Track Results Over Time 6. Set Targets 7. Ask Questions; Check It for Yourself! Confidential and Proprietary
  • 26. CODA: MAKING THE WEB SMARTER AND FASTER • Faster HTTP • SPDY • HTTP Speed+Mobility • Scratch • Better Browsers • Chrome has disrupted the market • HTML5 will drive further evolution • Moving to Mobile/Device Platforms • More sensitive to network effects of all kinds • Application-driven user experience • Moving away from Hypertext? Confidential and Proprietary 8/2/2012
  • 27. 42 Michael Faraday is the father of network performance, having performed the first bandwidth measurements on the first transatlantic telegraph cable in 1854. Daniel Austin Technical Staff CMU Invited Lecture Paypal, Inc. August 02 , 2012 V1.1 daaustin@paypal.com @daniel_b_austin

Hinweis der Redaktion

  1. Note that this is a work in progressStill being worked on, things are fluid though the direction is clear
  2. These are good problems to have.
  3. This diagram gives you an idea of the number of different use cases and actors across a large organization who are concerned with performance and the user experience. Every one of these people needs to know something about performance.It’s really complicated in more ways than one!
  4. Yslow turns 5 today!
  5. Competitive testing is an art in itself
  6. Nothing we do about performance is more important than testingEverything upfront in a disciplined way.
  7. Heresy!