SlideShare une entreprise Scribd logo
1  sur  55
Mark Friedman 
Demand Technology Software 
markf@demandtech.com 
http://performancebydesign.blogspot.com 
1 
Why is this web app running slowly?
 Main Topics 
 Building scalable web applications 
 YSlow scalability model of web page composition 
 Page Load Time and Round trips 
 W3C Nav/Timing API 
 Google Analytics & RUM 
 An ETW-based approach to web application performance monitoring 
 plus, sprinkle in some case studies & best practices 
2
 Themes: 
 The Value of Response Time measurements 
 Service Level reporting 
 Application response time measurements correlate with measures of customer 
productivity & satisfaction 
 Queuing models, decomposition & other analytic techniques 
 Obstacles: 
 Measurement data missing from standard Windows ASP.NET counters, but it is available 
from other sources 
 Request-Response boundaries are blurred in many AJAX applications 
 Understanding how to set good response time objectives 
 Since human beings are adaptable & 
 “ Good” and “Bad” are often relative to the application context 
 See “Engineering Time,” by Dr. Steve Seow 
3
 Themes: 
 Web application programming models and fashion change faster than 
tools can adapt 
 AJAX 
 e.g., Auto-complete in Google Search 
 achieved using client-side Javascript & Asysnchronous Http web service Requests 
 High Availability and Scalability using n-tiered architectures 
 typically, a Presentation Layer, Business Objects layer, and a Data Access Layer 
 HTML5 
 Effective performance tools are usually one or two releases behind emerging 
technology 
4
 Fundamental concept in software performance engineering (SPE) 
 namely, f(x), 
such that f(x) reliably predicts Response time. 
 Factors can be 
 linear (m+n…) 
 mutliplicative (m * n) 
 exponential (mn) 
5
6 
Part 1.
7
 Developed using ASP.NET (Server-side controls) 
 Multiple tiers: presentation/business objects/data layer 
 Uses the Model-View-Controller (MVC) pattern 
 Key elements of the web Page 
 data-rich Charting component (.NET Chart, based on the Dundas component) 
 Chart definition used to generate the PDB Query and the results are mapped to a Chart 
instance 
 Library of Chart templates 
 Machine selection 
 Date/Time selection 
8
Ask YSlow 
9
 Based on the influential work of Steve Souders* 
 originally at Yahoo 
 since migrated to Google 
 Google Chrome extension 
 Rule-based 
 Influenced: 
 Chrome PageSpeed Insights 
 IE Developer Tools 
 Fiddler 
 Glimpse 
 etc. 
* High Performance Web Sites, O’Reilly Media, 2007 
10
 Optimize for Page Load Time 
 Request.Start  DOM.Complete 
 Make specific recommendations on how to improve Page Load Time for a 
specific web page 
 Inventorying the Document Object Model (DOM) after the composition & 
rendering the of web page: 
 Calculate # of Http objects and their size 
 Does not attempt to actually measure Page Load Time, however. 
 Lead to a standardization effort to wire performance timing data to the 
DOM & create a consistent way to access it 
 Navigation Time, Performance Timing & a High Resolution Clock 
11
12 
Http GET Request (Uri) 
Web Browser Http Server 
Compose 
& 
Render 
Http RESPONSE 
Note: Http is a sessionless protocol
13
14
Http GET Request (Uri) 
 Response message often contains embedded references to additional 
resources needed to render the Page 
 e.g., 
 image files 
 style sheets 
 javascript files 
15 
Web Browser Http Server 
Compose & Render 
Http RESPONSE
Http GET Request (Uri) 
 HTTP interacts with the underlying TCP/IP networking protocols 
 HTTP Response messages > Ethernet packet size (~ 1500 bytes) require 
multiple IP packets 
 With large cookies and a large number of parms, GET Request messages 
can even exceed the Ethernet packet size 
16 
Web Browser Http Server 
Compose & Render 
Http RESPONSE
 YSlow scalability model: 
assuming web client processing time is minimal, then 
Render Time  RoundTrips * RTT 
풏 풉풕풕풑푶풃풋풆풄풕푺풊풛풆풊 
RoundTrips = 풊=ퟏ 
풑풂풄풌풆풕풔풊풛풆 
17
Ask 
YSlow 
18
 YSlow scalability model: 
Browser Render Time  RoundTrips * RTT 
 Web Browser performs page composition using the Document Object 
Model, or DOM 
 YSlow Rule: Make fewer HTTP requests 
 YSlow Rule: Improve cache effectiveness 
 YSlow Rule: Reduce the number of DOM elements 
 YSlow Rule: Compress the objects the page does need to load 
 Tuning is a process that attempts to drive 
# RoundTrips  1 
RoundTripTime  0 
19
 YSlow never actually measures RTT, but other related tools can 
 RTT may vary across Requests 
 Objects can be geographically dispersed 
 Local cluster, remote, cloud 
 e.g., referencing 3rd-party, advertising services 
 TCP adaptive window scaling and other network congestion avoidance strategies 
 Ignores variability in the execution time of client and server-side code 
 e.g., sort() a large list of elements, or 
 a hi-res visualization component that scales nonlinearly with the size of the result 
set 
 Compression recommendations can be at odds with good code 
maintainability practices 
20
 Web Browsers create multiple TCP sessions to download referenced 
objects in parallel 
 YSlow Rule: take advantage of parallel sessions by loading scripts last 
 Accurate rendering of the DOM requires that downloading a Javascript file blocks 
parallel downloads 
 Script may add elements to the DOM dynamically, call other scripts or reference additional 
resources 
 Browser assumes DOM rendering can only resume after the Javascript code executes 
Page Load Time = Browser Render Time + 
Script execution Time + 
(RoundTrips * RTT)/Sessions 
21
 Despite the many complications, the YSlow scalability model has 
proved very influential 
 Browser Page Load Time is an end-to-end measurement of service time, 
which is apt to be correlated with customer satisfaction 
 see, for example, http://www.slideshare.net/Strangeloopnet/37-lessons-ive-learned- 
on-the-performance-front-lines 
 Inspired development of related tools to measure Page Load Time 
22
 The YSlow scalability model is useful, but it is not 
adequate for many web applications 
23
 Page Load time is a measure of end-to-end 
response time 
 Navigation Timing measurements decompose overall 
response time into Network, Server, and Client (i.e., web 
browser) components 
 YSlow is silent: 
 the scalability of server-side components 
 the diversity of web client hardware (PCs, tablets, 
phones) & software (iOS, Android, Windows) 
 the performance of the client’s network connection 
 e.g., Internet vs. Intranet connections 
24
 Despite the many complications, the YSlow scalability model has 
proved very influential 
 Sparked a standardization effort so Javascript developers could access the PLT 
measurements reliably across Browsers 
 Creation of standard DOM performance objects that are accessible to 
Javascript 
 Finally, now that actual web application performance data is available in the 
web browser, how do I get that data back to my data center for optimization & 
capacity planning? 
25
26 
Prompt for 
unload 
redirect 
App 
cache 
DNS TCP Request Response Processing load 
unload DOMContentLoaded 
navigationStart 
redirectStart 
redirectEnd 
fetchStart 
domainLookupStart 
domainLookupEnd 
connectStart 
secureConnectionStart 
connectEnd 
requestStart 
responseStart 
responseEnd 
loadEventStart 
loadEventEnd 
unloadEventStart 
unloadEventEnd 
domInteractive 
domLoading 
domContentLoadedEventStart 
domComplete 
domContentLoadedEventEnd
 Http Request/Response and Rendering events 
 Web Performance Working Group 
 Performance Timeline, Navigation Timing, and 
High Resolution Time specs 
 Supported in IE, Chrome, WebKit, and FoxFire 
 Event timings can be use to calculate: 
 Network latency (from the standpoint of the web client) 
 Page Render time (once the page components are received 
from the server) 
 Entire sequence from navigation to page load completion: 
Navigation Timing spec: https://dvcs.w3.org/hg/webperf/raw-file/tip/specs/NavigationTiming/Overview.html#processing-model 27
 Calculate network latency: 
responseEnd - fetchStart 
28
Calculate Page Render Time: 
loadEventEnd - responseEnd 
29
Calculate entire sequence: 
loadEventEnd - navigationStart. 
30
 see https://developer.mozilla.org/ 
31 
<html> 
<head> 
<script type="text/javascript"> 
// Add load event listener. 
window.addEventListener("load", loadTime, false); 
function loadTime() { 
// Get current time. 
var now = window.performance.now(); 
// Calculate page load time. 
var page_load_time = now - performance.timing.navigationStart; 
// Write the load time to the F12 console. 
if (window.console) console.log(page_load_time); 
} 
</script> 
</head><body> 
<!- Main page body is here. --> </body> 
</html>
 Now that actual web application performance data is available in the web 
browser, how do I get that data back from the web client? 
 What about the volume of measurement data that requires processing & analysis? 
 Google Analytics uses web beacons to send the response time data to 
Google’s data center for analysis and reporting 
 Yahoo Boomerang project can be used to send web beacons with the data 
back to your data center 
32
 Architecture of an ASP.NET application 
 Windows OS 
 TCP/IP 
 (Clustered) IIS front end Web Servers 
 ASP.NET 
 .NET CLR 
 ADO.NET (data layer) 
33
 Dynamic HTML is session-oriented behavior layered on top of the 
HTTP 
 Web applications require state 
 Who you are 
 Where you are (mobile apps) 
 They preserve state: 
 During a session 
 TCP protocol is session-oriented 
 Requires a connection 
 Calculates RTT per connection (used in re-try logic) 
 Between sessions (using cookies, etc.) 
34
 Server-side Request processing 
 Event-oriented programming model (Postback) 
 HttpContext wrapper around the HTTP Request 
 Persistent State 
 ViewState 
 Session State 
 Application and Page Cache objects 
 etc. 
35
36 
IIS Architecture 
User 
Kernel 
Windows 
Authentication 
SSL 
HTTP 
TCP 
IP 
Network 
Inter face 
IIS 
Administration 
Metabase 
FTP 
SMTP 
NNTP 
HTTP Kernel Mode 
Dr iver 
(http.sys) 
Application Pool 
http 
Default.aspx 
<code-behind>.dll 
Mscoree.dll 
Application Pool 
Default.aspx 
<code-behind>.dll 
Mscoree.dll 
HTTP Response Cache 
(Physical Memory) 
LSSAS 
Inetinfo 
W3SVC 
SVCHOST 
W3wp 
W3wp 
W3wp 
W3wp 
WAS 
Cache 
net.tcp net.tcp 
http
 HttpApplication Event Handlers (IHttpModule) 
Event Event 
BeginRequest PreRequestHandlerExecute 
AuthenticateRequest PostRequestHandlerExecute 
PostAuthenticateRequest ReleaseRequestState 
AuthorizeRequest PostReleaseRequestState 
PostAuthorizeRequest PostMapRequestHandler 
ResolveRequestCache PostMapRequestHandler 
PostResolveRequestCache PostMapRequestHandler 
MapRequestHandler UpdateRequestCache 
PostMapRequestHandler PostUpdateRequestCache 
AcquireRequestState LogRequest 
PostAcquireRequestState EndRequest 37
w3wp.exe 
Common Language Runtime (CLR) 
JIT compiler 
Garbage Collection threads 
mscoree.dll 
MyApp.dll mscorsvr.dll 
38
 Many, many Windows components are 
instrumented with ETW 
 Kernel objects include disk IO, process, thread, 
paging, CPU 
 TCP/IP, HttpServer, CLR 
 Providers may issue a current status Rundown 
 CallStacks can be captured 
 Event correlation: 
 CPU ID, Process ID, Thread ID, File Handle, Tcp 
Session ID (Port) 
39
 Many obstacles to using trace-based instrumentation effectively in 
performance investigations 
 Sheer volume of trace data that can be generated (e.g., OS Dispatcher ContextSwitch 
events) 
 Cannot always be filtered effectively 
 Very little documentation on specific events and how they are logically related 
 Inconsistent semantics (but only a few common patterns) 
 Sequence: Begin, Step, End 
 StateChange(oldState, newState) 
 Fork:Join 
 Send:Receive 
 etc. 
40
 Resource Monitor 
 Windows Performance tools (aka xperf) 
 VS Profiler’s Concurrency Visualizer 
 inspired by Rico Mariani’s ETLStackBrowser program 
 leveraged Vance Morrison’s TraceEvent .NET libray 
 and, introducing the Web Application Trace Explorer 
 Gathers, analyzes, filters & reports on server-side events from TcpIP, HttpServer, and 
instrumented application Scenarios, plus Boomerang Beacon data from web clients 
 Designed to help explore the semantics of these sparsely documented event streams 
41
Demo using sample 
data from 
webscorer.com 
42
43
44
45
46
 Boomerang beacon support 
 Add the boomerang.js script to your web page HTML: 
 
47 
<script src="javascriptBoomerangboomerang.js" type="text/javascript"></script> 
<script src="javascriptBoomerangplug-insnavtiming.js" type="text/javascript"></script> 
<script lang="javascript"> 
BOOMR.init({ 
beacon_url: "boomerang.gif" 
}); 
</script>
 Boomerang beacon support 
 Add the BoomerangBeacon HttpModule from MeasurementWareWebServices.dll to 
web.config 
48 
<system.webServer> 
<modules> 
<add name="MeasurementWareWebServices“ 
type="MeasurementWareWebServices.BoomerangBeacon"/> 
</modules> 
</system.webServer>
 BoomerangBeacon class 
 derives from IHttpModule 
 adds an EventHandler for HttpApplication.BeginRequest 
 In the BeginRequest event handler, 
 intercepts the boomerang.gif GET Requests 
 parse the beacon parms 
 generate a MeasurementWareWeb ETW event whose payload includes 
 Page Load Time measurements 
 plus, IP Address and Tcp Port (unique session ID) of the Sender for correlation with other 
HttpServer and TcpIP events 
49
50
51
52
53
 Initial stage of the work to add Boomerang beacon data to the event 
collection and the displays is functionally complete 
 Limited ToDo List prior to release as a github Open Source project 
 Correlated Web client and web server measurement reports 
 Add the boomerang.js scripts automatically to Response messages 
 Contact me if your org is interested in participating 
 markf@demandtech.com 
 See my blog at http://performancebydesign.blogspot.comfor the 
latest status (until it reaches the Release to github stage) 
54
55

Contenu connexe

Tendances

Velocity 2014 nyc WebPagetest private instances
Velocity 2014 nyc   WebPagetest private instancesVelocity 2014 nyc   WebPagetest private instances
Velocity 2014 nyc WebPagetest private instancesPatrick Meenan
 
Measuring web performance
Measuring web performanceMeasuring web performance
Measuring web performancePatrick Meenan
 
Measuring the visual experience of website performance
Measuring the visual experience of website performanceMeasuring the visual experience of website performance
Measuring the visual experience of website performancePatrick Meenan
 
Hands on performance testing and analysis with web pagetest
Hands on performance testing and analysis with web pagetestHands on performance testing and analysis with web pagetest
Hands on performance testing and analysis with web pagetestPatrick Meenan
 
Service Workers for Performance
Service Workers for PerformanceService Workers for Performance
Service Workers for PerformancePatrick Meenan
 
Front-End Single Point of Failure - Velocity 2016 Training
Front-End Single Point of Failure - Velocity 2016 TrainingFront-End Single Point of Failure - Velocity 2016 Training
Front-End Single Point of Failure - Velocity 2016 TrainingPatrick Meenan
 
Tracking Performance - Velocity NYC 2013
Tracking Performance - Velocity NYC 2013Tracking Performance - Velocity NYC 2013
Tracking Performance - Velocity NYC 2013Patrick Meenan
 
Selecting and deploying automated optimization solutions
Selecting and deploying automated optimization solutionsSelecting and deploying automated optimization solutions
Selecting and deploying automated optimization solutionsPatrick Meenan
 
Check Yourself Before You Wreck Yourself: Auditing and Improving the Performa...
Check Yourself Before You Wreck Yourself: Auditing and Improving the Performa...Check Yourself Before You Wreck Yourself: Auditing and Improving the Performa...
Check Yourself Before You Wreck Yourself: Auditing and Improving the Performa...Nicholas Jansma
 
Asynchronous Web Programming with HTML5 WebSockets and Java
Asynchronous Web Programming with HTML5 WebSockets and JavaAsynchronous Web Programming with HTML5 WebSockets and Java
Asynchronous Web Programming with HTML5 WebSockets and JavaJames Falkner
 
Disrupting the application eco system with progressive web applications
Disrupting the application eco system with progressive web applicationsDisrupting the application eco system with progressive web applications
Disrupting the application eco system with progressive web applicationsChris Love
 
Performance Of Web Applications On Client Machines
Performance Of Web Applications On Client MachinesPerformance Of Web Applications On Client Machines
Performance Of Web Applications On Client MachinesCurelet Marius
 
Forensic Tools for In-Depth Performance Investigations
Forensic Tools for In-Depth Performance InvestigationsForensic Tools for In-Depth Performance Investigations
Forensic Tools for In-Depth Performance InvestigationsNicholas Jansma
 
Web Client Performance
Web Client PerformanceWeb Client Performance
Web Client PerformanceHerea Adrian
 
Building Next Generation Real-Time Web Applications using Websockets
Building Next Generation Real-Time Web Applications using WebsocketsBuilding Next Generation Real-Time Web Applications using Websockets
Building Next Generation Real-Time Web Applications using WebsocketsNaresh Chintalcheru
 
Google App Engine for PHP
Google App Engine for PHP Google App Engine for PHP
Google App Engine for PHP Eric Johnson
 
Getting the most out of WebPageTest
Getting the most out of WebPageTestGetting the most out of WebPageTest
Getting the most out of WebPageTestPatrick Meenan
 
Consuming ASP.NET Web API with WebSockets
Consuming ASP.NET Web API with WebSocketsConsuming ASP.NET Web API with WebSockets
Consuming ASP.NET Web API with WebSocketsMaayan Glikser
 

Tendances (20)

Velocity 2014 nyc WebPagetest private instances
Velocity 2014 nyc   WebPagetest private instancesVelocity 2014 nyc   WebPagetest private instances
Velocity 2014 nyc WebPagetest private instances
 
Making the web faster
Making the web fasterMaking the web faster
Making the web faster
 
Measuring web performance
Measuring web performanceMeasuring web performance
Measuring web performance
 
Measuring the visual experience of website performance
Measuring the visual experience of website performanceMeasuring the visual experience of website performance
Measuring the visual experience of website performance
 
Hands on performance testing and analysis with web pagetest
Hands on performance testing and analysis with web pagetestHands on performance testing and analysis with web pagetest
Hands on performance testing and analysis with web pagetest
 
Service Workers for Performance
Service Workers for PerformanceService Workers for Performance
Service Workers for Performance
 
Front-End Single Point of Failure - Velocity 2016 Training
Front-End Single Point of Failure - Velocity 2016 TrainingFront-End Single Point of Failure - Velocity 2016 Training
Front-End Single Point of Failure - Velocity 2016 Training
 
Tracking Performance - Velocity NYC 2013
Tracking Performance - Velocity NYC 2013Tracking Performance - Velocity NYC 2013
Tracking Performance - Velocity NYC 2013
 
Selecting and deploying automated optimization solutions
Selecting and deploying automated optimization solutionsSelecting and deploying automated optimization solutions
Selecting and deploying automated optimization solutions
 
Check Yourself Before You Wreck Yourself: Auditing and Improving the Performa...
Check Yourself Before You Wreck Yourself: Auditing and Improving the Performa...Check Yourself Before You Wreck Yourself: Auditing and Improving the Performa...
Check Yourself Before You Wreck Yourself: Auditing and Improving the Performa...
 
Asynchronous Web Programming with HTML5 WebSockets and Java
Asynchronous Web Programming with HTML5 WebSockets and JavaAsynchronous Web Programming with HTML5 WebSockets and Java
Asynchronous Web Programming with HTML5 WebSockets and Java
 
Disrupting the application eco system with progressive web applications
Disrupting the application eco system with progressive web applicationsDisrupting the application eco system with progressive web applications
Disrupting the application eco system with progressive web applications
 
Performance Of Web Applications On Client Machines
Performance Of Web Applications On Client MachinesPerformance Of Web Applications On Client Machines
Performance Of Web Applications On Client Machines
 
Measuring Continuity
Measuring ContinuityMeasuring Continuity
Measuring Continuity
 
Forensic Tools for In-Depth Performance Investigations
Forensic Tools for In-Depth Performance InvestigationsForensic Tools for In-Depth Performance Investigations
Forensic Tools for In-Depth Performance Investigations
 
Web Client Performance
Web Client PerformanceWeb Client Performance
Web Client Performance
 
Building Next Generation Real-Time Web Applications using Websockets
Building Next Generation Real-Time Web Applications using WebsocketsBuilding Next Generation Real-Time Web Applications using Websockets
Building Next Generation Real-Time Web Applications using Websockets
 
Google App Engine for PHP
Google App Engine for PHP Google App Engine for PHP
Google App Engine for PHP
 
Getting the most out of WebPageTest
Getting the most out of WebPageTestGetting the most out of WebPageTest
Getting the most out of WebPageTest
 
Consuming ASP.NET Web API with WebSockets
Consuming ASP.NET Web API with WebSocketsConsuming ASP.NET Web API with WebSockets
Consuming ASP.NET Web API with WebSockets
 

En vedette

ASP.NET Presentation
ASP.NET PresentationASP.NET Presentation
ASP.NET PresentationRasel Khan
 
ASP.NET Best Practices - Useful Tips from the Trenches
ASP.NET Best Practices - Useful Tips from the TrenchesASP.NET Best Practices - Useful Tips from the Trenches
ASP.NET Best Practices - Useful Tips from the TrenchesHabeeb Rushdan
 
Introduction to asp.net
Introduction to asp.netIntroduction to asp.net
Introduction to asp.netSHADAB ALI
 
Introduction to asp.net
Introduction to asp.netIntroduction to asp.net
Introduction to asp.netshan km
 
Writing clean code in C# and .NET
Writing clean code in C# and .NETWriting clean code in C# and .NET
Writing clean code in C# and .NETDror Helper
 
Concepts of Asp.Net
Concepts of Asp.NetConcepts of Asp.Net
Concepts of Asp.Netvidyamittal
 
DIWE - Coding HTML for Basic Web Designing
DIWE - Coding HTML for Basic Web DesigningDIWE - Coding HTML for Basic Web Designing
DIWE - Coding HTML for Basic Web DesigningRasan Samarasinghe
 
ASP.NET Presentation
ASP.NET PresentationASP.NET Presentation
ASP.NET Presentationdimuthu22
 
DIWE - Programming with JavaScript
DIWE - Programming with JavaScriptDIWE - Programming with JavaScript
DIWE - Programming with JavaScriptRasan Samarasinghe
 
Developing an aspnet web application
Developing an aspnet web applicationDeveloping an aspnet web application
Developing an aspnet web applicationRahul Bansal
 
DIWE - Introduction to Web Technologies
DIWE - Introduction to Web TechnologiesDIWE - Introduction to Web Technologies
DIWE - Introduction to Web TechnologiesRasan Samarasinghe
 
Introduction to ASP.NET
Introduction to ASP.NETIntroduction to ASP.NET
Introduction to ASP.NETRajkumarsoy
 
ASP.NET Tutorial - Presentation 1
ASP.NET Tutorial - Presentation 1ASP.NET Tutorial - Presentation 1
ASP.NET Tutorial - Presentation 1Kumar S
 

En vedette (18)

ASP.NET Presentation
ASP.NET PresentationASP.NET Presentation
ASP.NET Presentation
 
ASP.NET Best Practices - Useful Tips from the Trenches
ASP.NET Best Practices - Useful Tips from the TrenchesASP.NET Best Practices - Useful Tips from the Trenches
ASP.NET Best Practices - Useful Tips from the Trenches
 
Introduction to asp.net
Introduction to asp.netIntroduction to asp.net
Introduction to asp.net
 
Introduction to asp.net
Introduction to asp.netIntroduction to asp.net
Introduction to asp.net
 
Asp dot net final (2)
Asp dot net   final (2)Asp dot net   final (2)
Asp dot net final (2)
 
DITEC - E-Commerce & ASP.NET
DITEC - E-Commerce & ASP.NETDITEC - E-Commerce & ASP.NET
DITEC - E-Commerce & ASP.NET
 
ASP.NET Core Security
ASP.NET Core SecurityASP.NET Core Security
ASP.NET Core Security
 
DITEC - Programming with Java
DITEC - Programming with JavaDITEC - Programming with Java
DITEC - Programming with Java
 
Writing clean code in C# and .NET
Writing clean code in C# and .NETWriting clean code in C# and .NET
Writing clean code in C# and .NET
 
Concepts of Asp.Net
Concepts of Asp.NetConcepts of Asp.Net
Concepts of Asp.Net
 
DIWE - Coding HTML for Basic Web Designing
DIWE - Coding HTML for Basic Web DesigningDIWE - Coding HTML for Basic Web Designing
DIWE - Coding HTML for Basic Web Designing
 
ASP.NET Presentation
ASP.NET PresentationASP.NET Presentation
ASP.NET Presentation
 
DIWE - Programming with JavaScript
DIWE - Programming with JavaScriptDIWE - Programming with JavaScript
DIWE - Programming with JavaScript
 
Developing an aspnet web application
Developing an aspnet web applicationDeveloping an aspnet web application
Developing an aspnet web application
 
DIWE - Introduction to Web Technologies
DIWE - Introduction to Web TechnologiesDIWE - Introduction to Web Technologies
DIWE - Introduction to Web Technologies
 
Introduction to ASP.NET
Introduction to ASP.NETIntroduction to ASP.NET
Introduction to ASP.NET
 
ASP.NET Tutorial - Presentation 1
ASP.NET Tutorial - Presentation 1ASP.NET Tutorial - Presentation 1
ASP.NET Tutorial - Presentation 1
 
Asp.net.
Asp.net.Asp.net.
Asp.net.
 

Similaire à Monitoring web application response times, a new approach

Monitoring web application response times^lj a hybrid approach for windows
Monitoring web application response times^lj a hybrid approach for windowsMonitoring web application response times^lj a hybrid approach for windows
Monitoring web application response times^lj a hybrid approach for windowsMark Friedman
 
Application Performance Lecture
Application Performance LectureApplication Performance Lecture
Application Performance LectureVishwanath Ramdas
 
Website Performance at Client Level
Website Performance at Client LevelWebsite Performance at Client Level
Website Performance at Client LevelConstantin Stan
 
Metrics, metrics everywhere (but where the heck do you start?)
Metrics, metrics everywhere (but where the heck do you start?) Metrics, metrics everywhere (but where the heck do you start?)
Metrics, metrics everywhere (but where the heck do you start?) SOASTA
 
Velocity NYC: Metrics, metrics everywhere (but where the heck do you start?)
Velocity NYC: Metrics, metrics everywhere (but where the heck do you start?)Velocity NYC: Metrics, metrics everywhere (but where the heck do you start?)
Velocity NYC: Metrics, metrics everywhere (but where the heck do you start?)Cliff Crocker
 
WebAccel: Accelerating Web access for low-bandwidth hosts
WebAccel: Accelerating Web access for low-bandwidth hostsWebAccel: Accelerating Web access for low-bandwidth hosts
WebAccel: Accelerating Web access for low-bandwidth hostsZhenyun Zhuang
 
Metrics, Metrics Everywhere (but where the heck do you start?)
Metrics, Metrics Everywhere (but where the heck do you start?)Metrics, Metrics Everywhere (but where the heck do you start?)
Metrics, Metrics Everywhere (but where the heck do you start?)SOASTA
 
Metrics, metrics everywhere (but where the heck do you start?)
Metrics, metrics everywhere (but where the heck do you start?)Metrics, metrics everywhere (but where the heck do you start?)
Metrics, metrics everywhere (but where the heck do you start?)Tammy Everts
 
Client-side web acceleration for low-bandwidth hosts
Client-side web acceleration for low-bandwidth hostsClient-side web acceleration for low-bandwidth hosts
Client-side web acceleration for low-bandwidth hostsZhenyun Zhuang
 
DevNext - Web Programming Concepts Using Asp Net
DevNext - Web Programming Concepts Using Asp NetDevNext - Web Programming Concepts Using Asp Net
DevNext - Web Programming Concepts Using Asp NetAdil Mughal
 
Android chapter16-web-services
Android chapter16-web-servicesAndroid chapter16-web-services
Android chapter16-web-servicesAravindharamanan S
 
Lessons from the Trenches: Engineering Great AJAX Experiences
Lessons from the Trenches: Engineering Great AJAX ExperiencesLessons from the Trenches: Engineering Great AJAX Experiences
Lessons from the Trenches: Engineering Great AJAX Experiencesgoodfriday
 
Internet programming lecture 1
Internet programming lecture 1Internet programming lecture 1
Internet programming lecture 1Mohammed Hussein
 
Load Speed PSI development of webcore vitals
Load Speed PSI development of webcore vitalsLoad Speed PSI development of webcore vitals
Load Speed PSI development of webcore vitalsrahmathidayat471220
 

Similaire à Monitoring web application response times, a new approach (20)

Monitoring web application response times^lj a hybrid approach for windows
Monitoring web application response times^lj a hybrid approach for windowsMonitoring web application response times^lj a hybrid approach for windows
Monitoring web application response times^lj a hybrid approach for windows
 
Application Performance Lecture
Application Performance LectureApplication Performance Lecture
Application Performance Lecture
 
Browser Based Performance Testing and Tuning
Browser Based Performance Testing and TuningBrowser Based Performance Testing and Tuning
Browser Based Performance Testing and Tuning
 
Website Performance at Client Level
Website Performance at Client LevelWebsite Performance at Client Level
Website Performance at Client Level
 
Presemtation Tier Optimizations
Presemtation Tier OptimizationsPresemtation Tier Optimizations
Presemtation Tier Optimizations
 
Metrics, metrics everywhere (but where the heck do you start?)
Metrics, metrics everywhere (but where the heck do you start?) Metrics, metrics everywhere (but where the heck do you start?)
Metrics, metrics everywhere (but where the heck do you start?)
 
Velocity NYC: Metrics, metrics everywhere (but where the heck do you start?)
Velocity NYC: Metrics, metrics everywhere (but where the heck do you start?)Velocity NYC: Metrics, metrics everywhere (but where the heck do you start?)
Velocity NYC: Metrics, metrics everywhere (but where the heck do you start?)
 
WebAccel: Accelerating Web access for low-bandwidth hosts
WebAccel: Accelerating Web access for low-bandwidth hostsWebAccel: Accelerating Web access for low-bandwidth hosts
WebAccel: Accelerating Web access for low-bandwidth hosts
 
Metrics, Metrics Everywhere (but where the heck do you start?)
Metrics, Metrics Everywhere (but where the heck do you start?)Metrics, Metrics Everywhere (but where the heck do you start?)
Metrics, Metrics Everywhere (but where the heck do you start?)
 
Metrics, metrics everywhere (but where the heck do you start?)
Metrics, metrics everywhere (but where the heck do you start?)Metrics, metrics everywhere (but where the heck do you start?)
Metrics, metrics everywhere (but where the heck do you start?)
 
World Wide Web(WWW)
World Wide Web(WWW)World Wide Web(WWW)
World Wide Web(WWW)
 
Client-side web acceleration for low-bandwidth hosts
Client-side web acceleration for low-bandwidth hostsClient-side web acceleration for low-bandwidth hosts
Client-side web acceleration for low-bandwidth hosts
 
DevNext - Web Programming Concepts Using Asp Net
DevNext - Web Programming Concepts Using Asp NetDevNext - Web Programming Concepts Using Asp Net
DevNext - Web Programming Concepts Using Asp Net
 
Android chapter16-web-services
Android chapter16-web-servicesAndroid chapter16-web-services
Android chapter16-web-services
 
Performance engineering
Performance engineeringPerformance engineering
Performance engineering
 
Lessons from the Trenches: Engineering Great AJAX Experiences
Lessons from the Trenches: Engineering Great AJAX ExperiencesLessons from the Trenches: Engineering Great AJAX Experiences
Lessons from the Trenches: Engineering Great AJAX Experiences
 
Lessons
LessonsLessons
Lessons
 
Internet programming lecture 1
Internet programming lecture 1Internet programming lecture 1
Internet programming lecture 1
 
Load Speed PSI development of webcore vitals
Load Speed PSI development of webcore vitalsLoad Speed PSI development of webcore vitals
Load Speed PSI development of webcore vitals
 
ChandanResume
ChandanResumeChandanResume
ChandanResume
 

Dernier

20240508 QFM014 Elixir Reading List April 2024.pdf
20240508 QFM014 Elixir Reading List April 2024.pdf20240508 QFM014 Elixir Reading List April 2024.pdf
20240508 QFM014 Elixir Reading List April 2024.pdfMatthew Sinclair
 
best call girls in Hyderabad Finest Escorts Service 📞 9352988975 📞 Available ...
best call girls in Hyderabad Finest Escorts Service 📞 9352988975 📞 Available ...best call girls in Hyderabad Finest Escorts Service 📞 9352988975 📞 Available ...
best call girls in Hyderabad Finest Escorts Service 📞 9352988975 📞 Available ...kajalverma014
 
75539-Cyber Security Challenges PPT.pptx
75539-Cyber Security Challenges PPT.pptx75539-Cyber Security Challenges PPT.pptx
75539-Cyber Security Challenges PPT.pptxAsmae Rabhi
 
20240510 QFM016 Irresponsible AI Reading List April 2024.pdf
20240510 QFM016 Irresponsible AI Reading List April 2024.pdf20240510 QFM016 Irresponsible AI Reading List April 2024.pdf
20240510 QFM016 Irresponsible AI Reading List April 2024.pdfMatthew Sinclair
 
Microsoft Azure Arc Customer Deck Microsoft
Microsoft Azure Arc Customer Deck MicrosoftMicrosoft Azure Arc Customer Deck Microsoft
Microsoft Azure Arc Customer Deck MicrosoftAanSulistiyo
 
PowerDirector Explination Process...pptx
PowerDirector Explination Process...pptxPowerDirector Explination Process...pptx
PowerDirector Explination Process...pptxgalaxypingy
 
"Boost Your Digital Presence: Partner with a Leading SEO Agency"
"Boost Your Digital Presence: Partner with a Leading SEO Agency""Boost Your Digital Presence: Partner with a Leading SEO Agency"
"Boost Your Digital Presence: Partner with a Leading SEO Agency"growthgrids
 
哪里办理美国迈阿密大学毕业证(本硕)umiami在读证明存档可查
哪里办理美国迈阿密大学毕业证(本硕)umiami在读证明存档可查哪里办理美国迈阿密大学毕业证(本硕)umiami在读证明存档可查
哪里办理美国迈阿密大学毕业证(本硕)umiami在读证明存档可查ydyuyu
 
Meaning of On page SEO & its process in detail.
Meaning of On page SEO & its process in detail.Meaning of On page SEO & its process in detail.
Meaning of On page SEO & its process in detail.krishnachandrapal52
 
一比一原版(Offer)康考迪亚大学毕业证学位证靠谱定制
一比一原版(Offer)康考迪亚大学毕业证学位证靠谱定制一比一原版(Offer)康考迪亚大学毕业证学位证靠谱定制
一比一原版(Offer)康考迪亚大学毕业证学位证靠谱定制pxcywzqs
 
Best SEO Services Company in Dallas | Best SEO Agency Dallas
Best SEO Services Company in Dallas | Best SEO Agency DallasBest SEO Services Company in Dallas | Best SEO Agency Dallas
Best SEO Services Company in Dallas | Best SEO Agency DallasDigicorns Technologies
 
20240509 QFM015 Engineering Leadership Reading List April 2024.pdf
20240509 QFM015 Engineering Leadership Reading List April 2024.pdf20240509 QFM015 Engineering Leadership Reading List April 2024.pdf
20240509 QFM015 Engineering Leadership Reading List April 2024.pdfMatthew Sinclair
 
在线制作约克大学毕业证(yu毕业证)在读证明认证可查
在线制作约克大学毕业证(yu毕业证)在读证明认证可查在线制作约克大学毕业证(yu毕业证)在读证明认证可查
在线制作约克大学毕业证(yu毕业证)在读证明认证可查ydyuyu
 
APNIC Updates presented by Paul Wilson at ARIN 53
APNIC Updates presented by Paul Wilson at ARIN 53APNIC Updates presented by Paul Wilson at ARIN 53
APNIC Updates presented by Paul Wilson at ARIN 53APNIC
 
Story Board.pptxrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrr
Story Board.pptxrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrStory Board.pptxrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrr
Story Board.pptxrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrHenryBriggs2
 
Real Men Wear Diapers T Shirts sweatshirt
Real Men Wear Diapers T Shirts sweatshirtReal Men Wear Diapers T Shirts sweatshirt
Real Men Wear Diapers T Shirts sweatshirtrahman018755
 
Power point inglese - educazione civica di Nuria Iuzzolino
Power point inglese - educazione civica di Nuria IuzzolinoPower point inglese - educazione civica di Nuria Iuzzolino
Power point inglese - educazione civica di Nuria Iuzzolinonuriaiuzzolino1
 
Russian Call girls in Abu Dhabi 0508644382 Abu Dhabi Call girls
Russian Call girls in Abu Dhabi 0508644382 Abu Dhabi Call girlsRussian Call girls in Abu Dhabi 0508644382 Abu Dhabi Call girls
Russian Call girls in Abu Dhabi 0508644382 Abu Dhabi Call girlsMonica Sydney
 
Russian Escort Abu Dhabi 0503464457 Abu DHabi Escorts
Russian Escort Abu Dhabi 0503464457 Abu DHabi EscortsRussian Escort Abu Dhabi 0503464457 Abu DHabi Escorts
Russian Escort Abu Dhabi 0503464457 Abu DHabi EscortsMonica Sydney
 
pdfcoffee.com_business-ethics-q3m7-pdf-free.pdf
pdfcoffee.com_business-ethics-q3m7-pdf-free.pdfpdfcoffee.com_business-ethics-q3m7-pdf-free.pdf
pdfcoffee.com_business-ethics-q3m7-pdf-free.pdfJOHNBEBONYAP1
 

Dernier (20)

20240508 QFM014 Elixir Reading List April 2024.pdf
20240508 QFM014 Elixir Reading List April 2024.pdf20240508 QFM014 Elixir Reading List April 2024.pdf
20240508 QFM014 Elixir Reading List April 2024.pdf
 
best call girls in Hyderabad Finest Escorts Service 📞 9352988975 📞 Available ...
best call girls in Hyderabad Finest Escorts Service 📞 9352988975 📞 Available ...best call girls in Hyderabad Finest Escorts Service 📞 9352988975 📞 Available ...
best call girls in Hyderabad Finest Escorts Service 📞 9352988975 📞 Available ...
 
75539-Cyber Security Challenges PPT.pptx
75539-Cyber Security Challenges PPT.pptx75539-Cyber Security Challenges PPT.pptx
75539-Cyber Security Challenges PPT.pptx
 
20240510 QFM016 Irresponsible AI Reading List April 2024.pdf
20240510 QFM016 Irresponsible AI Reading List April 2024.pdf20240510 QFM016 Irresponsible AI Reading List April 2024.pdf
20240510 QFM016 Irresponsible AI Reading List April 2024.pdf
 
Microsoft Azure Arc Customer Deck Microsoft
Microsoft Azure Arc Customer Deck MicrosoftMicrosoft Azure Arc Customer Deck Microsoft
Microsoft Azure Arc Customer Deck Microsoft
 
PowerDirector Explination Process...pptx
PowerDirector Explination Process...pptxPowerDirector Explination Process...pptx
PowerDirector Explination Process...pptx
 
"Boost Your Digital Presence: Partner with a Leading SEO Agency"
"Boost Your Digital Presence: Partner with a Leading SEO Agency""Boost Your Digital Presence: Partner with a Leading SEO Agency"
"Boost Your Digital Presence: Partner with a Leading SEO Agency"
 
哪里办理美国迈阿密大学毕业证(本硕)umiami在读证明存档可查
哪里办理美国迈阿密大学毕业证(本硕)umiami在读证明存档可查哪里办理美国迈阿密大学毕业证(本硕)umiami在读证明存档可查
哪里办理美国迈阿密大学毕业证(本硕)umiami在读证明存档可查
 
Meaning of On page SEO & its process in detail.
Meaning of On page SEO & its process in detail.Meaning of On page SEO & its process in detail.
Meaning of On page SEO & its process in detail.
 
一比一原版(Offer)康考迪亚大学毕业证学位证靠谱定制
一比一原版(Offer)康考迪亚大学毕业证学位证靠谱定制一比一原版(Offer)康考迪亚大学毕业证学位证靠谱定制
一比一原版(Offer)康考迪亚大学毕业证学位证靠谱定制
 
Best SEO Services Company in Dallas | Best SEO Agency Dallas
Best SEO Services Company in Dallas | Best SEO Agency DallasBest SEO Services Company in Dallas | Best SEO Agency Dallas
Best SEO Services Company in Dallas | Best SEO Agency Dallas
 
20240509 QFM015 Engineering Leadership Reading List April 2024.pdf
20240509 QFM015 Engineering Leadership Reading List April 2024.pdf20240509 QFM015 Engineering Leadership Reading List April 2024.pdf
20240509 QFM015 Engineering Leadership Reading List April 2024.pdf
 
在线制作约克大学毕业证(yu毕业证)在读证明认证可查
在线制作约克大学毕业证(yu毕业证)在读证明认证可查在线制作约克大学毕业证(yu毕业证)在读证明认证可查
在线制作约克大学毕业证(yu毕业证)在读证明认证可查
 
APNIC Updates presented by Paul Wilson at ARIN 53
APNIC Updates presented by Paul Wilson at ARIN 53APNIC Updates presented by Paul Wilson at ARIN 53
APNIC Updates presented by Paul Wilson at ARIN 53
 
Story Board.pptxrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrr
Story Board.pptxrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrStory Board.pptxrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrr
Story Board.pptxrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrr
 
Real Men Wear Diapers T Shirts sweatshirt
Real Men Wear Diapers T Shirts sweatshirtReal Men Wear Diapers T Shirts sweatshirt
Real Men Wear Diapers T Shirts sweatshirt
 
Power point inglese - educazione civica di Nuria Iuzzolino
Power point inglese - educazione civica di Nuria IuzzolinoPower point inglese - educazione civica di Nuria Iuzzolino
Power point inglese - educazione civica di Nuria Iuzzolino
 
Russian Call girls in Abu Dhabi 0508644382 Abu Dhabi Call girls
Russian Call girls in Abu Dhabi 0508644382 Abu Dhabi Call girlsRussian Call girls in Abu Dhabi 0508644382 Abu Dhabi Call girls
Russian Call girls in Abu Dhabi 0508644382 Abu Dhabi Call girls
 
Russian Escort Abu Dhabi 0503464457 Abu DHabi Escorts
Russian Escort Abu Dhabi 0503464457 Abu DHabi EscortsRussian Escort Abu Dhabi 0503464457 Abu DHabi Escorts
Russian Escort Abu Dhabi 0503464457 Abu DHabi Escorts
 
pdfcoffee.com_business-ethics-q3m7-pdf-free.pdf
pdfcoffee.com_business-ethics-q3m7-pdf-free.pdfpdfcoffee.com_business-ethics-q3m7-pdf-free.pdf
pdfcoffee.com_business-ethics-q3m7-pdf-free.pdf
 

Monitoring web application response times, a new approach

  • 1. Mark Friedman Demand Technology Software markf@demandtech.com http://performancebydesign.blogspot.com 1 Why is this web app running slowly?
  • 2.  Main Topics  Building scalable web applications  YSlow scalability model of web page composition  Page Load Time and Round trips  W3C Nav/Timing API  Google Analytics & RUM  An ETW-based approach to web application performance monitoring  plus, sprinkle in some case studies & best practices 2
  • 3.  Themes:  The Value of Response Time measurements  Service Level reporting  Application response time measurements correlate with measures of customer productivity & satisfaction  Queuing models, decomposition & other analytic techniques  Obstacles:  Measurement data missing from standard Windows ASP.NET counters, but it is available from other sources  Request-Response boundaries are blurred in many AJAX applications  Understanding how to set good response time objectives  Since human beings are adaptable &  “ Good” and “Bad” are often relative to the application context  See “Engineering Time,” by Dr. Steve Seow 3
  • 4.  Themes:  Web application programming models and fashion change faster than tools can adapt  AJAX  e.g., Auto-complete in Google Search  achieved using client-side Javascript & Asysnchronous Http web service Requests  High Availability and Scalability using n-tiered architectures  typically, a Presentation Layer, Business Objects layer, and a Data Access Layer  HTML5  Effective performance tools are usually one or two releases behind emerging technology 4
  • 5.  Fundamental concept in software performance engineering (SPE)  namely, f(x), such that f(x) reliably predicts Response time.  Factors can be  linear (m+n…)  mutliplicative (m * n)  exponential (mn) 5
  • 7. 7
  • 8.  Developed using ASP.NET (Server-side controls)  Multiple tiers: presentation/business objects/data layer  Uses the Model-View-Controller (MVC) pattern  Key elements of the web Page  data-rich Charting component (.NET Chart, based on the Dundas component)  Chart definition used to generate the PDB Query and the results are mapped to a Chart instance  Library of Chart templates  Machine selection  Date/Time selection 8
  • 10.  Based on the influential work of Steve Souders*  originally at Yahoo  since migrated to Google  Google Chrome extension  Rule-based  Influenced:  Chrome PageSpeed Insights  IE Developer Tools  Fiddler  Glimpse  etc. * High Performance Web Sites, O’Reilly Media, 2007 10
  • 11.  Optimize for Page Load Time  Request.Start  DOM.Complete  Make specific recommendations on how to improve Page Load Time for a specific web page  Inventorying the Document Object Model (DOM) after the composition & rendering the of web page:  Calculate # of Http objects and their size  Does not attempt to actually measure Page Load Time, however.  Lead to a standardization effort to wire performance timing data to the DOM & create a consistent way to access it  Navigation Time, Performance Timing & a High Resolution Clock 11
  • 12. 12 Http GET Request (Uri) Web Browser Http Server Compose & Render Http RESPONSE Note: Http is a sessionless protocol
  • 13. 13
  • 14. 14
  • 15. Http GET Request (Uri)  Response message often contains embedded references to additional resources needed to render the Page  e.g.,  image files  style sheets  javascript files 15 Web Browser Http Server Compose & Render Http RESPONSE
  • 16. Http GET Request (Uri)  HTTP interacts with the underlying TCP/IP networking protocols  HTTP Response messages > Ethernet packet size (~ 1500 bytes) require multiple IP packets  With large cookies and a large number of parms, GET Request messages can even exceed the Ethernet packet size 16 Web Browser Http Server Compose & Render Http RESPONSE
  • 17.  YSlow scalability model: assuming web client processing time is minimal, then Render Time  RoundTrips * RTT 풏 풉풕풕풑푶풃풋풆풄풕푺풊풛풆풊 RoundTrips = 풊=ퟏ 풑풂풄풌풆풕풔풊풛풆 17
  • 19.  YSlow scalability model: Browser Render Time  RoundTrips * RTT  Web Browser performs page composition using the Document Object Model, or DOM  YSlow Rule: Make fewer HTTP requests  YSlow Rule: Improve cache effectiveness  YSlow Rule: Reduce the number of DOM elements  YSlow Rule: Compress the objects the page does need to load  Tuning is a process that attempts to drive # RoundTrips  1 RoundTripTime  0 19
  • 20.  YSlow never actually measures RTT, but other related tools can  RTT may vary across Requests  Objects can be geographically dispersed  Local cluster, remote, cloud  e.g., referencing 3rd-party, advertising services  TCP adaptive window scaling and other network congestion avoidance strategies  Ignores variability in the execution time of client and server-side code  e.g., sort() a large list of elements, or  a hi-res visualization component that scales nonlinearly with the size of the result set  Compression recommendations can be at odds with good code maintainability practices 20
  • 21.  Web Browsers create multiple TCP sessions to download referenced objects in parallel  YSlow Rule: take advantage of parallel sessions by loading scripts last  Accurate rendering of the DOM requires that downloading a Javascript file blocks parallel downloads  Script may add elements to the DOM dynamically, call other scripts or reference additional resources  Browser assumes DOM rendering can only resume after the Javascript code executes Page Load Time = Browser Render Time + Script execution Time + (RoundTrips * RTT)/Sessions 21
  • 22.  Despite the many complications, the YSlow scalability model has proved very influential  Browser Page Load Time is an end-to-end measurement of service time, which is apt to be correlated with customer satisfaction  see, for example, http://www.slideshare.net/Strangeloopnet/37-lessons-ive-learned- on-the-performance-front-lines  Inspired development of related tools to measure Page Load Time 22
  • 23.  The YSlow scalability model is useful, but it is not adequate for many web applications 23
  • 24.  Page Load time is a measure of end-to-end response time  Navigation Timing measurements decompose overall response time into Network, Server, and Client (i.e., web browser) components  YSlow is silent:  the scalability of server-side components  the diversity of web client hardware (PCs, tablets, phones) & software (iOS, Android, Windows)  the performance of the client’s network connection  e.g., Internet vs. Intranet connections 24
  • 25.  Despite the many complications, the YSlow scalability model has proved very influential  Sparked a standardization effort so Javascript developers could access the PLT measurements reliably across Browsers  Creation of standard DOM performance objects that are accessible to Javascript  Finally, now that actual web application performance data is available in the web browser, how do I get that data back to my data center for optimization & capacity planning? 25
  • 26. 26 Prompt for unload redirect App cache DNS TCP Request Response Processing load unload DOMContentLoaded navigationStart redirectStart redirectEnd fetchStart domainLookupStart domainLookupEnd connectStart secureConnectionStart connectEnd requestStart responseStart responseEnd loadEventStart loadEventEnd unloadEventStart unloadEventEnd domInteractive domLoading domContentLoadedEventStart domComplete domContentLoadedEventEnd
  • 27.  Http Request/Response and Rendering events  Web Performance Working Group  Performance Timeline, Navigation Timing, and High Resolution Time specs  Supported in IE, Chrome, WebKit, and FoxFire  Event timings can be use to calculate:  Network latency (from the standpoint of the web client)  Page Render time (once the page components are received from the server)  Entire sequence from navigation to page load completion: Navigation Timing spec: https://dvcs.w3.org/hg/webperf/raw-file/tip/specs/NavigationTiming/Overview.html#processing-model 27
  • 28.  Calculate network latency: responseEnd - fetchStart 28
  • 29. Calculate Page Render Time: loadEventEnd - responseEnd 29
  • 30. Calculate entire sequence: loadEventEnd - navigationStart. 30
  • 31.  see https://developer.mozilla.org/ 31 <html> <head> <script type="text/javascript"> // Add load event listener. window.addEventListener("load", loadTime, false); function loadTime() { // Get current time. var now = window.performance.now(); // Calculate page load time. var page_load_time = now - performance.timing.navigationStart; // Write the load time to the F12 console. if (window.console) console.log(page_load_time); } </script> </head><body> <!- Main page body is here. --> </body> </html>
  • 32.  Now that actual web application performance data is available in the web browser, how do I get that data back from the web client?  What about the volume of measurement data that requires processing & analysis?  Google Analytics uses web beacons to send the response time data to Google’s data center for analysis and reporting  Yahoo Boomerang project can be used to send web beacons with the data back to your data center 32
  • 33.  Architecture of an ASP.NET application  Windows OS  TCP/IP  (Clustered) IIS front end Web Servers  ASP.NET  .NET CLR  ADO.NET (data layer) 33
  • 34.  Dynamic HTML is session-oriented behavior layered on top of the HTTP  Web applications require state  Who you are  Where you are (mobile apps)  They preserve state:  During a session  TCP protocol is session-oriented  Requires a connection  Calculates RTT per connection (used in re-try logic)  Between sessions (using cookies, etc.) 34
  • 35.  Server-side Request processing  Event-oriented programming model (Postback)  HttpContext wrapper around the HTTP Request  Persistent State  ViewState  Session State  Application and Page Cache objects  etc. 35
  • 36. 36 IIS Architecture User Kernel Windows Authentication SSL HTTP TCP IP Network Inter face IIS Administration Metabase FTP SMTP NNTP HTTP Kernel Mode Dr iver (http.sys) Application Pool http Default.aspx <code-behind>.dll Mscoree.dll Application Pool Default.aspx <code-behind>.dll Mscoree.dll HTTP Response Cache (Physical Memory) LSSAS Inetinfo W3SVC SVCHOST W3wp W3wp W3wp W3wp WAS Cache net.tcp net.tcp http
  • 37.  HttpApplication Event Handlers (IHttpModule) Event Event BeginRequest PreRequestHandlerExecute AuthenticateRequest PostRequestHandlerExecute PostAuthenticateRequest ReleaseRequestState AuthorizeRequest PostReleaseRequestState PostAuthorizeRequest PostMapRequestHandler ResolveRequestCache PostMapRequestHandler PostResolveRequestCache PostMapRequestHandler MapRequestHandler UpdateRequestCache PostMapRequestHandler PostUpdateRequestCache AcquireRequestState LogRequest PostAcquireRequestState EndRequest 37
  • 38. w3wp.exe Common Language Runtime (CLR) JIT compiler Garbage Collection threads mscoree.dll MyApp.dll mscorsvr.dll 38
  • 39.  Many, many Windows components are instrumented with ETW  Kernel objects include disk IO, process, thread, paging, CPU  TCP/IP, HttpServer, CLR  Providers may issue a current status Rundown  CallStacks can be captured  Event correlation:  CPU ID, Process ID, Thread ID, File Handle, Tcp Session ID (Port) 39
  • 40.  Many obstacles to using trace-based instrumentation effectively in performance investigations  Sheer volume of trace data that can be generated (e.g., OS Dispatcher ContextSwitch events)  Cannot always be filtered effectively  Very little documentation on specific events and how they are logically related  Inconsistent semantics (but only a few common patterns)  Sequence: Begin, Step, End  StateChange(oldState, newState)  Fork:Join  Send:Receive  etc. 40
  • 41.  Resource Monitor  Windows Performance tools (aka xperf)  VS Profiler’s Concurrency Visualizer  inspired by Rico Mariani’s ETLStackBrowser program  leveraged Vance Morrison’s TraceEvent .NET libray  and, introducing the Web Application Trace Explorer  Gathers, analyzes, filters & reports on server-side events from TcpIP, HttpServer, and instrumented application Scenarios, plus Boomerang Beacon data from web clients  Designed to help explore the semantics of these sparsely documented event streams 41
  • 42. Demo using sample data from webscorer.com 42
  • 43. 43
  • 44. 44
  • 45. 45
  • 46. 46
  • 47.  Boomerang beacon support  Add the boomerang.js script to your web page HTML:  47 <script src="javascriptBoomerangboomerang.js" type="text/javascript"></script> <script src="javascriptBoomerangplug-insnavtiming.js" type="text/javascript"></script> <script lang="javascript"> BOOMR.init({ beacon_url: "boomerang.gif" }); </script>
  • 48.  Boomerang beacon support  Add the BoomerangBeacon HttpModule from MeasurementWareWebServices.dll to web.config 48 <system.webServer> <modules> <add name="MeasurementWareWebServices“ type="MeasurementWareWebServices.BoomerangBeacon"/> </modules> </system.webServer>
  • 49.  BoomerangBeacon class  derives from IHttpModule  adds an EventHandler for HttpApplication.BeginRequest  In the BeginRequest event handler,  intercepts the boomerang.gif GET Requests  parse the beacon parms  generate a MeasurementWareWeb ETW event whose payload includes  Page Load Time measurements  plus, IP Address and Tcp Port (unique session ID) of the Sender for correlation with other HttpServer and TcpIP events 49
  • 50. 50
  • 51. 51
  • 52. 52
  • 53. 53
  • 54.  Initial stage of the work to add Boomerang beacon data to the event collection and the displays is functionally complete  Limited ToDo List prior to release as a github Open Source project  Correlated Web client and web server measurement reports  Add the boomerang.js scripts automatically to Response messages  Contact me if your org is interested in participating  markf@demandtech.com  See my blog at http://performancebydesign.blogspot.comfor the latest status (until it reaches the Release to github stage) 54
  • 55. 55