Measuring web performance. Velocity EU 2011

Co-Founder @ DevOpsGuys at DevOpsGuys Ltd
Nov. 8, 2011
Measuring web performance. Velocity EU 2011
Measuring web performance. Velocity EU 2011
Measuring web performance. Velocity EU 2011
Measuring web performance. Velocity EU 2011
Measuring web performance. Velocity EU 2011
Measuring web performance. Velocity EU 2011
Measuring web performance. Velocity EU 2011
Measuring web performance. Velocity EU 2011
Measuring web performance. Velocity EU 2011
Measuring web performance. Velocity EU 2011
Measuring web performance. Velocity EU 2011
Measuring web performance. Velocity EU 2011
Measuring web performance. Velocity EU 2011
Measuring web performance. Velocity EU 2011
Measuring web performance. Velocity EU 2011
Measuring web performance. Velocity EU 2011
Measuring web performance. Velocity EU 2011
Measuring web performance. Velocity EU 2011
Measuring web performance. Velocity EU 2011
Measuring web performance. Velocity EU 2011
Measuring web performance. Velocity EU 2011
Measuring web performance. Velocity EU 2011
Measuring web performance. Velocity EU 2011
Measuring web performance. Velocity EU 2011
Measuring web performance. Velocity EU 2011
Measuring web performance. Velocity EU 2011
Measuring web performance. Velocity EU 2011
Measuring web performance. Velocity EU 2011
Measuring web performance. Velocity EU 2011
Measuring web performance. Velocity EU 2011
Measuring web performance. Velocity EU 2011
Measuring web performance. Velocity EU 2011
Measuring web performance. Velocity EU 2011
Measuring web performance. Velocity EU 2011
Measuring web performance. Velocity EU 2011
Measuring web performance. Velocity EU 2011
Measuring web performance. Velocity EU 2011
Measuring web performance. Velocity EU 2011
Measuring web performance. Velocity EU 2011
Measuring web performance. Velocity EU 2011
Measuring web performance. Velocity EU 2011
Measuring web performance. Velocity EU 2011
Measuring web performance. Velocity EU 2011
Measuring web performance. Velocity EU 2011
Measuring web performance. Velocity EU 2011
Measuring web performance. Velocity EU 2011
Measuring web performance. Velocity EU 2011
Measuring web performance. Velocity EU 2011
Measuring web performance. Velocity EU 2011
Measuring web performance. Velocity EU 2011
Measuring web performance. Velocity EU 2011
Measuring web performance. Velocity EU 2011
Measuring web performance. Velocity EU 2011
Measuring web performance. Velocity EU 2011
Measuring web performance. Velocity EU 2011
Measuring web performance. Velocity EU 2011
Measuring web performance. Velocity EU 2011
1 of 57

More Related Content

Viewers also liked

Measuring Web Performance - HighEdWeb EditionMeasuring Web Performance - HighEdWeb Edition
Measuring Web Performance - HighEdWeb EditionDave Olsen
Web Analytics - WHR 2012 - Guida pratica Google AnalyticsWeb Analytics - WHR 2012 - Guida pratica Google Analytics
Web Analytics - WHR 2012 - Guida pratica Google AnalyticsEnrico Ferretti
Cosa sono le Web Performance e perché dovete preoccuparveneCosa sono le Web Performance e perché dovete preoccuparvene
Cosa sono le Web Performance e perché dovete preoccuparveneOlegs Belousovs
Web analytics -kpi e cruscottiWeb analytics -kpi e cruscotti
Web analytics -kpi e cruscottiDML Srl
Evaluation & Performance MeasurementEvaluation & Performance Measurement
Evaluation & Performance Measurementstephengranatin
Measuring Web Performance Measuring Web Performance
Measuring Web Performance Dave Olsen

Similar to Measuring web performance. Velocity EU 2011

Search Analytics Business Value & NoSQL BackendSearch Analytics Business Value & NoSQL Backend
Search Analytics Business Value & NoSQL BackendSematext Group, Inc.
The Three Stages of Cloud Adoption - RightScale Compute 2013The Three Stages of Cloud Adoption - RightScale Compute 2013
The Three Stages of Cloud Adoption - RightScale Compute 2013RightScale
IT Governance   PortalsIT Governance   Portals
IT Governance PortalsContinuum, Business Consulting
HiUED 前端/web 發展和體驗HiUED 前端/web 發展和體驗
HiUED 前端/web 發展和體驗Bobby Chen
Digital Asset Management with AlfrescoDigital Asset Management with Alfresco
Digital Asset Management with Alfrescorivetlogic
Web performance 101Web performance 101
Web performance 101Stephen Thair

Similar to Measuring web performance. Velocity EU 2011(20)

More from Stephen Thair

London web performance   WPO Lessons from the field June 2013London web performance   WPO Lessons from the field June 2013
London web performance WPO Lessons from the field June 2013Stephen Thair
Is the current model of load testing broken   ukcmg - steve thairIs the current model of load testing broken   ukcmg - steve thair
Is the current model of load testing broken ukcmg - steve thairStephen Thair
Continuous Integration - A Performance Engineer's TaleContinuous Integration - A Performance Engineer's Tale
Continuous Integration - A Performance Engineer's TaleStephen Thair
Web Performance Optimisation at times.co.ukWeb Performance Optimisation at times.co.uk
Web Performance Optimisation at times.co.ukStephen Thair
Practical web performance - Site Confidence Web Performance SeminarPractical web performance - Site Confidence Web Performance Seminar
Practical web performance - Site Confidence Web Performance SeminarStephen Thair
Measuring mobile performance (@LDNWebPerf Version)Measuring mobile performance (@LDNWebPerf Version)
Measuring mobile performance (@LDNWebPerf Version)Stephen Thair

Recently uploaded

Dev Dives: Mastering AI-powered Document UnderstandingDev Dives: Mastering AI-powered Document Understanding
Dev Dives: Mastering AI-powered Document UnderstandingUiPathCommunity
"Building Asynchronous SOA for Modern Applications", Sai Pragna Etikyala "Building Asynchronous SOA for Modern Applications", Sai Pragna Etikyala
"Building Asynchronous SOA for Modern Applications", Sai Pragna Etikyala Fwdays
Common WordPress APIs_ Settings APICommon WordPress APIs_ Settings API
Common WordPress APIs_ Settings APIJonathan Bossenger
Brisbane MuleSoft Meetup 13 MuleSoft Maven and Managing Dependencies Part 1.pptxBrisbane MuleSoft Meetup 13 MuleSoft Maven and Managing Dependencies Part 1.pptx
Brisbane MuleSoft Meetup 13 MuleSoft Maven and Managing Dependencies Part 1.pptxBrianFraser29
Knowledge Graphs and Generative AI_GraphSummit Minneapolis Sept 20.pptxKnowledge Graphs and Generative AI_GraphSummit Minneapolis Sept 20.pptx
Knowledge Graphs and Generative AI_GraphSummit Minneapolis Sept 20.pptxNeo4j
alfred-product-research-proposal.pdfalfred-product-research-proposal.pdf
alfred-product-research-proposal.pdfAlfredSuratos

Recently uploaded(20)

Measuring web performance. Velocity EU 2011

Editor's Notes

  1. Good Afternoon. My name is Stephen Thair and I am a freelance webops manager and performance specialist based in London, UK. I am also the organiser for the London Web Performance Meetup community. My topic today is “measuring web performance” and before we drill down into the specifics of measuring web performance I have one piece of bad news… <click>
  2. And not just wrong because of esoteric stuff like the observer effect, or even the accuracy of our measuring tools… it’s wrong because of one major reason… <click>
  3. And that reason is the human brain… The human brain does not have a metronomic clock in tick tocking away to a regular beat like the clocks we use to “measure” web performance… <click>
  4. The key here is “subjective” and “variable” – there is a lot of stuff that the “numbers” won’t and CAN’T tell you about how the user perceives the performance of your website… Subjective – because YOUR experience is not MY experience!!!And when we say that performance is variable what do we mean… Well, we’ve all heard about time “slowing down” under the effects of adrenaline in emergencies… so perhaps if we are visiting a website that particularly gets the adrenaline flowing (ahem) our perception of time might “slow down” and what is in reality a “fast” website might appear slow. Conversely, there is a psychological state called “flow” where we can “lose track of time” because we are involved in a task, perhaps playing an online game, where suddenly we find an hour or two has gone past without us being aware of it. But our perception of performance is variable on other ways, too <click> Different for different sites – for different users (Age, Gender, emotional state (“Is the train about to leave, I’m running late”?), culture, level of experience) – at different stages in the user journey (e.g Navigation browser vs Search vs checkout) Different devices? – Mobile vs wireless vs wired?
  5. Actual = what your “numbers” say it is…Expected = what your user wanted it to be… for your website… at this moment in time… which is to say expectations are not fixed & immutable!Perceived = How long the user “thought it took” with their subjective and variable perception of time…Remembered = What they told their friends down the pub about your crap & slow (or awesome&fast) website! Stoyan’s Talk at Velocity “The Psychology of Performance” – highly recommended… So… <click> http://velocityconf.com/velocity2010/public/schedule/detail/13019"Satisfaction = perception minus expectation" - David Maister
  6. So we have talked about the <click> “Subjective” nature of web performance but our challenge as developers, testers and WebOps is to devise ways to make the subjective…. <click> Objective… and measure it! So how can we do that? Well, science has been struggling with this problem of “subjective” and “objective” for centuries and have developed different techniques to apply to each… <click>
  7. To look at subjective data we use <click> Qualitative Techniques which are commonly used in the Social Sciences…. <click> case studies, focus groups, interviews <click> etc. If some of these sound familiar that’s because Many of these are the kinds of tools that people from the User Experience world use in their UE labs… And it’s worth making the point that you can start “measuring performance” very early on in the software development lifecycle, even with paper-based or simple static HTML click models by seeing how long people take to choose, decide, navigate… or even simply how many “clicks” they take to achieve a given task (less clicks = “faster performance”). And that’s all I am going to say on the qualitative side of things because as Web professionals we generally prefer to look at “objective” measures… <click>
  8. And objectively normally means Quantitatively – means we can use NUMBERS…. And bring our statistical tools to bear… And there are 7 techniques of “HOW” to measure website performance But before we dive into the “HOW” we need to talk about some other things <click>
  9. And those other things are what Rudyard Kipling called his “honest serving-men” – the what, why, when etc.So firstly, in terms of “what” do you want to measure do you care about <click> “objects”
  10. About “objects”… or pages… or the entire user journey? Even if we are talking about pages we have multiple metrics to chose from… <click>
  11. At a page and object level you have multiple metrics you can choose from… but I generally find that there are 4 I really care about…
  12. So what are they <click>TTFB – how fast is my back-end responding? RenderStart – when does the user start to get visual feedback from the page – remember, it’s about Perception… but it has got to be meaningful… e.g. not just a CSS background changeDOMContentLoaded – How soon can my developers start hooking up their fancy Javascript stuff to the DOM?Page (onLoad) – when have all the elements on the page been loaded (and I can start all my deferred resource loading via Ajax!). One “new” metrics you might have heard about it “above the fold time”… <click>
  13. AFT is basically designed to be a “render complete” timing, or at least a “render of the static stuff in the viewable area of the page”AFT is a nice idea… but it’s implementation is troublesome at present… 4 mins to calculate at present… But for most sites AFT = PLT… and but according to Pat from Webpagetest he has seen it range from ½ PLT to 2x PLT… Personally, I really like using the screen capture videos for this and look at it in comparison to previous versions, competitors etc…
  14. This sort of video comparison that you can create with webpagetest.org… but when you rely on human judgement you are back into the subjective, again…So what other metrics might we be interested in? <click>
  15. We start with the raw metrics… and then move up into counts (which we normally show as histograms) into the statistical measures and finally into artificial summary metrics like Apdex (which I will explain in a second) All of this data can be sliced and diced in your datawarehouse… but keep in mind that you can easily run into gigabytes and terabytes of data for a high-volume website in a month… so plan carefully! Ok, so back to Apdex - what is apdex <click> ApdexCalculated “summary” metricsStatisticalMetricsMeanModeMedianStdDevCounts/HistogramsHistogramsRaw MetricsConnection TimeRender Start TimePage Load Time“Above the Fold” time etc
  16. Apdex is simple – split the page load time for every visit to your website into 3 bucketsSatisfiedToleratedFrustratedAnd you get a score from 0 – 1 that represents an “overall” measure of your site’s performance, across all URL’s, across all the visits during the time period. So why do we need a “single number” metric like Apdex? <click>
  17. Because web performance is multi-dimensional…. Multiple Metrics For Multiple URLS From Different (measurement)Locations Using Different Tools Across the (software)Lifecycle Over TimeAnd it gives you a great number to stick on the plasma screen in the Ops area and a nice number to stick on your weekly report to your boss…But beyond just these metrics on how long a page took to load there is something else we need to record… <click> and that is “context”…
  18. “Context” is the metadata about the “numbers” we have collected. They are the key to EXPLAINING why the performance number recorded is “good or bad”…
  19. <click> “context” is the metadata about the measurement you made… what browser, from what geographical location, over what type of network etc etc. Without context your performance data is meaningless…
  20. Context helps us answer this question!!! We can see that the mode of the page load time is about 0.9sec but what about this cluster out at around 2.7 and 2.9 secs? Maybe they are from a group of customers in one location, or using an older browser etc… But back to our 6 honest serving men and let’s look at who and when… <click>
  21. We want to measure performance across the lifecycle (SDLC) and different teams will need to use different techniques to get the different metrics they need… We’ll talk more about this as we go through each technique…
  22. Where you chose to measure the your web performance depends on your objectives… what exactly are you trying to measure, at what stage in the lifecycle, synthetic or real-user? The further we move away from the origin server the more network latency begins to dominate… and the more contextual factors come into play… and hence <click> the signal-to-noise ratio increases…But why have I drawn a distinction between “real users” and “synthetic agents” like monitoring or performance test agents? <click>
  23. Well, because there is quite a debate raging out there at present on the future of web performance measurement… Synthetic = the active monitoring from Site Confidence / Keynote / Gomez / Pingdom we all know and love…Real-User = measuring the performance of real user visitors to your website using tools like Atomic Labs Pion, Triometric, Coradiant, Tealeaf etc.
  24. A lot of people have strong opinions about whether we should be measuring “real-user” performance, or whether we should be synthetically making requests/transaction to test our website, regardless of whether those “synthetic requests” come from real-browsers or browser emulating agents. My view is that people who say either/or are missing the SCIENCE behind two different techniques… and we can look to the scientific method to help us conceptualise the difference between the two.
  25. And science talks about two different quantitative techniques for gaining knowledge about the world, or in this case, web performance… and that is the “Observational Study” versus “Experiment” <click>
  26. Both seek to detect a relationship – “what is making this page load slowly?”Create the difference… keeping everything else the same… controlling the experimental factors (as much as possible)For example, what happens when I measure with a different browser… but keeping everything else the same?
  27. Observational Studies = Real-User monitoringWe can only measure what the OCCURS NATURALLY in the sample population. If no one visits that URL for a while, how will we know that it’s broken or slow? So what do I mean by “confound variables”? Wll, what I mean is <click> Context!
  28. In “real-user” performance measurement the USER’s define the context… all the of the variables that might affect the number that you measure. So… how can I get some control back and reduce the number of confounding variables? Run an Experiment! <click>
  29. <click> Experiment = Synthetic testing where we request the page we measure… <click> and hence we get to Design our “experiment” <click> We chose what to measure, from what location, over a fixed bandwidth, using a known agent/browser, with a known frequency (which means a stable sample size which is important for statistic when comparing means etc from a different URLs) <click> as we seek to control the confounding variables (as much as we can) to we get <click> a lower signal to noise ratio and hopefully get better at understanding the “root cause”… <click> I said “Hopefully”…  <click> So which one is “better” RUM or Synthetic, Observational Study or Experiment <click>
  30. So which one is better? <click> It depends on what you are trying to achieve… what’s your role… what’s your goal. Personally, if I am going to be woken up a 3am with an alert saying there is a problem with my website I’d like to have a higher degree to confidence in the alert than just because some ISP is having problems and giving their users a slow connection… I want to be alert about problems I can DO SOMETHING ABOUT and as an Ops Mgr I will “design my experiments” accordingly… But what about a “hybrid model” <click> where we move from RUM to Synthetic?... <click>
  31. So how would Pat’s idea work? <click> The RUM to detect changes out there “in the real world”… <click> then pass the URL to test via an API <click> to try and narrow down the signal/noise in…(note we might be calling an entire SET of regression tests here… But the goal is <click> to Move from Observation <click> by controlling the variables <click> to a well defined ExperimentBut don’t forget you can also go the other way… to make sure that your “experiment” even vaguely reflects “reality” by cross-checking your synthetic results with what’s out there in the real world… which is exactly what any scientist does when they create an experimental model… they make sure that it correlates with reality!Ok, so we’ve covered off the who,what, when, where etc, lets get back to the “HOW”… <click>
  32. Which is not to say that we can’t measure subjective things… qualitatively…
  33. There are basically 7 techniques used to measure web performance:Each one has it’s pros and cons… easy of use, what it can measure, cost etc <click> x 7 So which technique is best? Depends on what you want to measure, where etc… comparing them all together we get <click>
  34. So let’s look at each one in turn and how it works (in a very simplified way!)…
  35. For example, the following JavaScript shows a naive attempt to measure the time it takes to fully load a page:<html><head><script type="text/javascript">var start = new Date().getTime();function onLoad() {var now = new Date().getTime();var latency = now - start; alert("page loading time: " + latency);}</script></head><body onload="onLoad()"><!- Main page body goes from here. --></body></html>
  36. You can do custom page instrumentationby wrapping critical sections of the page in start/stop timersBut it relies on Javascript and Cookies… which might be disabled or not available (especially in Mobile). Only accurate for 2nd page.
  37. THE BROWSER is doing most of the timing for us… Brilliant!!! No more OnBeforeUnLoad event! It all occurs “after” the page has loaded…No more cookies… lots more metrics <click>
  38. Many more metrics in the Navigation-Timing spec… at a PAGE level, at least…
  39. Biggest pro is that the TIMING is mostly done by the browser… so it’s less intrusive and more accurate with a much better set of metrics… CON – browser support…A bit more about “SiteSpeed” <click>
  40. Free Navigation-Timing Based real-user performance monitoring…Also uses timings from the Google Toolbar… which leads us nicely into the next technique <click>
  41. Filtered to remove all measurements > 60 and samples > 2. Scale on the left is 3.5 second intervals
  42. Here is your histogram, turned on it’s side. 0-1 (23%), 1-3 (45%), 3-7 (22.
  43. Excellent metrics including object level metrics… so you can get that nice waterfall diagram we know and love!
  44. Basically you are sticking a recording mechanism, a proxy debugger like Charles or Fiddler, between you and the origin web server… and that proxy will record all your requests and the timings associated with them…
  45. YOU ARE NO LONGER IN THE CLIENT… so no RenderStart, no OnLoad Event, and hence the concept of a page gets “fuzzy”… particularly with AJAXy pages… How does the proxy affect your traffic – probably the biggest potential issue is how the proxy server connects to the origin server. There is no guarantee that it’s going to use the same number of connections or re-use them in the same way that your browser will… From 2005 EricLaw - http://insidehttp.blogspot.com/2005/06/using-fiddler-for-performance.htmlIn Fiddler 0.9 and below, Fiddler never reuses sockets for anything, which may dramatically affect the performance of your site. Fiddler 0.9.9 (the latest beta) offers server-socket reuse, so the connection from Fiddler to the server is reused. Note that the socket between your browser and Fiddler is not reused, but since this is a socket->socket connection on the same machine, there's not a significant performance hit for abandoning this socket.So, Fiddler isn't suitable for timing. But this doesn't impact your ability to check compression, conditional requests, Expires headers, bytes-transferred, etc. Other than the actual timings, the browser does not behave much differently with Fiddler than without (and chances are good that your visitors are using some type of proxy). The browser will often send Proxy-Connection: Keep-Alive; this isn't sent without a proxy.IE will send Pragma: no-cache if the user hits F5 or clicks the refresh button; without a proxy, you have to hit CTRL+F5 to send the No-Cache value.The fact that a client-socket is abandoned can lead to extra authentication roundtrips when using the NTLM connection-based authentication protocol.
  46. Write a mod or filter… that can see every request… start/stop timers… send them to a collector…
  47. Web Server mods/ISAPI filters are how most of the APM solutions work. AppDynamics, Dynatrace, New Relic are all in this space, and some of them have implemented the javascript timing as well… Great for measuring the performance of your web tier and backend… not that useful in measuring page level performance unless you go the hybrid approach.
  48. SPAN port then sniff the traffic…. Re-assemble the packets then the requests then the “page” then record the data…
  49. The network sniffing approach is really the only true “passive” technology out there i.e. one that doesn’t have any “observer effect” on the measurement. Pion, Coradiant, Tealeaf, TriometricThere is a Not cloud friendly since EC2 doesn’t allow promiscuous mode appliances…
  50. So in summary…. <Click x 6>And before we go, a quick plug for my user group… <click>
  51. A great WPO case study next week from “The Times” newspaper… and then in December we have a special Xmas event hosted by Betfair!