Practical web performance - Site Confidence Web Performance Seminar


Published on

Over of Web performance optimisation (WPO) as well as some results from 25 web performance site analysis. Some information on Mobile web performance as well.

Published in: Technology, Design
  • Be the first to comment

No Downloads
Total views
On SlideShare
From Embeds
Number of Embeds
Embeds 0
No embeds

No notes for slide
  • Very Subjective!!! Perceived… because perception is crucial (as we shall see)Action to Response – from “here to here” – ie any delay experienced has a context of what the customer’s intention is…Meaningful Response – spinners are good, but people won’t wait forever… 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?
  • Stoyan’s Talk at Velocity “The Psychology of Performance”"Satisfaction = perception minus expectation" - David Maister
  • In fact, your performance could be “stressing them out”….
  • This is from the Foviance/ CA Study
  • The 3 response-time limits are the same today as when I wrote about them in 1993 (based on 40-year-old research by human factors pioneers): 0.1 seconds gives the feeling of instantaneous response — that is, the outcome feels like it was caused by the user, not the computer. This level of responsiveness is essential to support the feeling of direct manipulation (direct manipulation is one of the key GUI techniques to increase user engagement and control — for more about it, see our Principles of Interface Design seminar). 1 second keeps the user's flow of thought seamless. Users can sense a delay, and thus know the computer is generating the outcome, but they still feel in control of the overall experience and that they're moving freely rather than waiting on the computer. This degree of responsiveness is needed for good navigation. 10 seconds keeps the user's attention. From 1–10 seconds, users definitely feel at the mercy of the computer and wish it was faster, but they can handle it. After 10 seconds, they start thinking about other things, making it harder to get their brains back on track once the computer finally does respond.
  • As measured @ 2Mbps in IE8…But the actual download speed and browser are irrelevant… this is about user perception… so the real question is “which customers do I want to have a good perception of my site…”
  • Can anyone guess why performance matters?
  • Front-end – between browser and data centreBack-end – generating the response on the server
  • A review of 25 web performance optimisation engagements performed by Site Confidence over the last 12 months.
  • Load time correlation from the HTTP Archive
  • Render time correlation from the HTTP Archive
  • Based on 25 consulting reports across a wide range of e-commerce and publishing sites
  • 100% of the time there were too many requests100% of the time they weren’t using caching to its full advantage, and hence repeat visits were slower than they needed to be…76% of the sites exhibited noticable slowing down during peak time of day/week~50% of the time the pages were bloated (often due to images that on average can be optimised ~15%) Frighteningly ¼ of the sites analysed either didn’t have Gzip compression enabled or it had problems e.g. failing under load!
  • The MSN performance talk was excellent improvements can increase and DECREASE your bottom line so be careful!
  • In fact this is an example where it took 30 secsIt’s also crappy JavaScript and a poor page design…
  • 100ms latency on each request = 5 sec page slowdown on a page100ms is about the latency you would get from here to the US…
  • [Next Slide…]But what about “the bigger picture”? Being successful in WPO is more than just “implementing the rules”… so what else can we learn from the experiences of others?
  • KeepAliveTimeout DirectiveDescription:Amount of time the server will wait for subsequent requests on a persistent connectionSyntax:KeepAliveTimeout secondsDefault:KeepAliveTimeout 5MaxKeepAliveRequests DirectiveDefault:MaxKeepAliveRequests 100 MaxKeepAliveRequests directive limits the number of requests allowed per connection when KeepAlive is on. If it is set to 0, unlimited requests will be allowed. We recommend that this setting be kept to a high value for maximum server performance.For example:MaxKeepAliveRequests 500
  • It’s about measurement…
  • WPO Performance isn’t just for Christmas…It’s an on-going effort…
  • Just like an ITIL implementation…
  • So you need these 8 skills (at a minimum) contributing to your web performance process…But if you are a small startup these all might be one person…Performance Lead / EvangelistFront-end DeveloperBack-end DeveloperPerformance QADatabase AdministratorSystems AdministratorNetwork AdministratorWeb Analytics Analyst
  • So a team like that, even part-time, is going to cost you money…… but there are ways to automate it with both commercial (e.g. Aptimize) and open-source (Google’s Mod_pagespeed)What works for you depends on the size and scale of your website, your available resources, etc. OpexvsCapex… Probably a hybrid approach is best – automate where it’s cost-effective, hand-tune the important bits.
  • What else? Let’s hear from Lord Kelvin…
  • An dyou can use those measurements as a differentiator in your business!!! – See Betfair’s Performance Charter…This doesn’t have to be esoteric backroom stuff!
  • Don’t be afraid to make some noise about it!!! Use it as a BHAG and as a point of differentiation to your competitors!
  • Just a reminder…. For those that were paying attention earlier! So how can we measure web performance…
  • There are basically 6 techniques used to measure web performance:Each one has it’s pros and cons… easy of use, what it can measure, cost etc
  • Operations has different needs to Marketing or User Experience team
  • Notethat active monitoring can use either an synthetic agent or a “real browser”Passive – the signal to noise ratio is huge, just like passive sonar. Trying to detect the signal from the clutter is very hard… Anyway, enough about all the WPO projects, what about the
  • It’s about measurement…
  • This is from 2009 so it’s out of date BUT it makes the point that “which measurement do you choose” 2011 data here -,3013.html
  • It’s about measurement…
  • And if you throw in CyanogenMod you can get even better performance…
  • Whilst its growing fast… From Souders preso -
  • From Souders preso - this is heavily influenced by sector…e.g. the Adactus guys can tell you about Pizza Hut who do very nicely on mobile!Ditto for music, ringtones etc.
  • I was on the Thames Clipper on my way back from the O2 after a concert. So I ran some automated testing and this graphs my results… on the Velocity Conference home page…Min9.275Max156.520Average32.859Median12.071Std Deviation45.691
  • Network latency varies enormously…. What can we see here?The connection is relatively good at sending and receiving data. The green crosses represent packets that were actually lost which only happened for 75 of 1000.There are some crazy-high round trip times. The minimum round trip time was 107ms (which would put my home cable connection to shame) and even the median is pretty awesome at 239ms but the maximum was a whopping 20226 ms - that's more than 20 seconds!
  • But before I go… two quick plugs…
  • Practical web performance - Site Confidence Web Performance Seminar

    1. 1. Practical Web performance<br />Stephen Thair, Seriti Consulting, @TheOpsMgr<br /><br />26/09/2011<br />© Seriti Consulting<br />1<br />
    2. 2. Defining “Web Performance”?<br />Why performance matters (to your business)<br />The “Rules” of Web Performance<br />Practical Web Performance (“where to start!”)<br />Agenda<br />26/09/2011<br />(c) Seriti Consulting, 2011<br />2<br />
    3. 3. My Definition of Web Performance<br />26/09/2011<br />(c) Seriti Consulting, 2011<br />3<br />“The delay perceived by the website visitor between an action (e.g click) and a meaningful response”<br />“The delay perceived by the website visitor between an action (e.g click) and a meaningful response”<br />“The delay perceived by the website visitor between an action (e.g click) and a meaningful response”<br />
    4. 4. Perception<br /><br />26/09/2011<br />(c) Seriti Consulting, 2011<br />4<br />
    5. 5. 26/09/2011<br />© Seriti Consulting<br />5<br />Just because your DevMgr, QA Mgr, Ops Mgr tells you “performance is good” doesn’t means that it is PERCEIVED that way by your CUSTOMERS…<br />
    6. 6. “Brain wave analysis from the experiment revealed that participants had to concentrate up to 50% more when using badly performing websites, while facial muscle and behavioural analysis of the subjects also revealed greater agitation and stress in these periods.<br /><br />Poor Performance = Web Stress!!!<br />26/09/2011<br />(c) Seriti Consulting, 2011<br />6<br />
    7. 7. 0.1 secondsgives the feeling of instantaneous response <br />1 secondkeeps the user's flow of thought seamless. <br />10 secondskeeps the user's attention<br />JakobNeilsen.<br />So what is “Good Performance”?<br />26/09/2011<br />(c) Seriti Consulting, 2011<br />7<br />
    8. 8. 10 Seconds is too slow… (IMHO)<br />“Initial render” < 750ms and be <br />“Page Complete” < 3 seconds <br />“3 Second Rule”<br />26/09/2011<br />(c) Seriti Consulting, 2011<br />8<br />
    9. 9. Why Performance Matters<br />26/09/2011<br />(c) Seriti Consulting, 2011<br />9<br />
    10. 10. Bounce Rate goes up<br /><br />26/09/2011<br />(c) Seriti Consulting, 2011<br />10<br />
    11. 11. Page Views goes down<br /><br />26/09/2011<br />(c) Seriti Consulting, 2011<br />11<br />
    12. 12. Conversion Rate goes down<br /><br />26/09/2011<br />(c) Seriti Consulting, 2011<br />12<br />
    13. 13. “A 1-second delay in page load time equals 11% fewer page views, a 16% decrease in customer satisfaction, and 7% loss in conversions” <br />Aberdeen Group<br /><br />3rd Party Research<br />26/09/2011<br />(c) Seriti Consulting, 2011<br />13<br />
    14. 14. Artificial 1s delay = 2.8% reduction in revenue per user<br />Empirical Testing<br />26/09/2011<br />(c) Seriti Consulting, 2011<br />14<br /><br />
    15. 15. You are losing Visitors<br />You are losing Sales<br />You are losing Ad-revenue<br />You are wasting SEO/SEM/PPC budget<br />Spending £££ on bandwidth and servers<br />In Summary…<br />26/09/2011<br />(c) Seriti Consulting, 2011<br />15<br />
    16. 16. 26/09/2011<br />© Seriti Consulting<br />16<br />So how are we doing?<br />
    17. 17. 26/09/2011<br />© Seriti Consulting<br />17<br />Largest Page…<br />4,909,588 bytes<br />
    18. 18. 26/09/2011<br />© Seriti Consulting<br />18<br />Slowest Page…<br />12.436 secs<br />
    19. 19. 26/09/2011<br />© Seriti Consulting<br />19<br />Most objects…<br />227<br />
    20. 20. 26/09/2011<br />© Seriti Consulting<br />20<br />1 was down for maintenance<br />1 didn’t re-direct from http to https<br />~28% had some type of error<br />
    21. 21. 26/09/2011<br />© Seriti Consulting<br />21<br />So what can you do about it?<br />Answer = Optimise! <br />
    22. 22. 26/09/2011<br />© Seriti Consulting<br />22<br />80% “Front End”<br />20% “Back-end”<br />
    23. 23. Focus on the “front end”<br />Optimise the interaction between the browser and the data-centre<br />And how the browser processes the client-side objects<br />“Front End Engineering”<br />26/09/2011<br />(c) Seriti Consulting, 2011<br />23<br />
    24. 24. Yahoo’s Rules<br /><ul><li>Minimize HTTP Requests
    25. 25. Use a Content Delivery Network
    26. 26. Add an Expires or a Cache-Control Header
    27. 27. Gzip Components
    28. 28. Put StyleSheets at the Top
    29. 29. Put Scripts at the Bottom
    30. 30. Avoid CSS Expressions
    31. 31. Make JavaScript and CSS External
    32. 32. Reduce DNS Lookups
    33. 33. Minify JavaScript and CSS
    34. 34. Avoid Redirects</li></ul>Remove Duplicate Scripts<br />Configure ETags<br />Make AJAX Cacheable<br />Use GET for AJAX Requests<br />Reduce the Number of DOM Elements<br />No 404s<br />Reduce Cookie Size<br />Use Cookie-Free Domains for Components<br />Avoid Filters<br />Do Not Scale Images in HTML<br />Make favicon.ico Small & Cacheable<br /><br />26/09/2011<br />(c) Seriti Consulting, 2011<br />24<br />
    35. 35. Google’s Rules<br /><ul><li>Avoid bad requests
    36. 36. Avoid CSS expressions
    37. 37. Combine external CSS
    38. 38. Combine external JavaScript
    39. 39. Defer loading of JavaScript
    40. 40. Enable compression
    41. 41. Leverage browser caching
    42. 42. Leverage proxy caching
    43. 43. Minify CSS
    44. 44. Minify HTML
    45. 45. Minify JavaScript
    46. 46. Minimize request size
    47. 47. Minimize DNS lookups</li></ul>Minimize redirects<br />Optimize images<br />Optimize the order of styles and scripts<br />Parallelize downloads across hostnames<br />Put CSS in the document head<br />Remove unused CSS<br />Serve resources from a consistent URL<br />Serve scaled images<br />Serve static content from a cookieless domain<br />Specify a character set early<br />Specify image dimensions<br />Use efficient CSS selectors <br /><br />26/09/2011<br />(c) Seriti Consulting, 2011<br />25<br />
    48. 48. 26/09/2011<br />© Seriti Consulting<br />26<br />Informationoverload!<br />
    49. 49. 26/09/2011<br />© Seriti Consulting<br />27<br />Where should you start? <br />
    50. 50. 26/09/2011<br />© Seriti Consulting<br />28<br />Which optimisations are most common?<br />Which optimisations are most important? <br />And the survey says…<br />
    51. 51. HTTP Archive - Load Time Correlation<br />26/09/2011<br />© Seriti Consulting<br />29<br /><br />
    52. 52. HTTP Archive - Render Time Correlation<br />26/09/2011<br />© Seriti Consulting<br />30<br /><br />
    53. 53. Lessons learnt from consulting…<br />26/09/2011<br />© Seriti Consulting<br />31<br />
    54. 54. 26/09/2011<br />© Seriti Consulting<br />32<br />
    55. 55. 5 Important Ones<br />Reduce Page Size (<500Kb)<br />Enable (Gzip) Compression<br />Reduce the number of roundtrips (<40 per page…)<br />HTTP Cache Headers (cache long & prosper!)<br />Structure the page (to improve render & download)<br />CSS First<br />Javascript last<br />26/09/2011<br />(c) Seriti Consulting, 2011<br />33<br />
    56. 56. Even if you apply just those 5 rules…Your page download times will drop by ~50%<br />Low hanging fruit…<br />26/09/2011<br />(c) Seriti Consulting, 2011<br />34<br />
    57. 57. What about the other rules?<br />Generally you are now measuring gains in milliseconds<br />26/09/2011<br />(c) Seriti Consulting, 2011<br />35<br />But even milliseconds can make a difference…<br />
    58. 58. Optimising JavaScript & async loading<br />26/09/2011<br />© Seriti Consulting<br />36<br />Loading jqueryAsync<br />Improving JS Execution time<br />Delayed ad-loading<br />Faster does not always equal more revenue!!!<br /><br />
    59. 59. “Reduce the number of DOM elements”<br />26/09/2011<br />(c) Seriti Consulting, 2011<br />37<br />24,000 calls to a selector takes time…<br />
    60. 60. “Use a content delivery network”<br />26/09/2011<br />© Seriti Consulting<br />38<br />You can’t beat the speed of light…<br />And if your customers are not in the UK, invest in a CDN…<br />
    61. 61. 26/09/2011<br />© Seriti Consulting<br />39<br />4.5 seconds in London<br />becomes<br />12.5 seconds in Singapore<br />
    62. 62. “Use http keep-alives”<br />26/09/2011<br />© Seriti Consulting<br />40<br />Tune your HTTP Keep-Alives!<br />KeepAliveTimeout Value (sec)<br />MaxKeepAlive Requests (# requests/connection)<br />Stop forcing your customers to re-negotiate connections (even partway through a page!)<br />Even more important for SSL! (~4x slower)<br />
    63. 63. 26/09/2011<br />© Seriti Consulting<br />41<br />“The Bigger Picture”<br />
    64. 64. 26/09/2011<br />© Seriti Consulting<br />42<br />WPO is not just for Christmas…<br />
    65. 65. 26/09/2011<br />© Seriti Consulting<br />43<br />Performance is a<br /> PROCESS<br />NOT a<br />PROJECT<br /><br />
    66. 66. 26/09/2011<br />© Seriti Consulting<br />44<br />Who should you have on your<br />WPO project<br /> team? <br /><br />
    67. 67. 26/09/2011<br />© Seriti Consulting<br />45<br />Who should you have on your<br />WPO Process!<br /> team? <br /><br />
    68. 68. 26/09/2011<br />© Seriti Consulting<br />46<br />Performance Lead / Evangelist<br />Front-end Developer<br />Back-end Developer<br />Performance QA<br />Database Administrator<br />Systems Administrator<br />Network Administrator<br />Web Analytics Analyst<br />
    69. 69. 26/09/2011<br />© Seriti Consulting<br />47<br />Economics of WPO… is automation the answer?<br /><br />Answer: Maybe?<br />
    70. 70. 26/09/2011<br />© Seriti Consulting<br />48<br />What Else?<br />
    71. 71. 26/09/2011<br />© Seriti Consulting<br />49<br />“I often say that when you can measure what you are speaking about, and express it in numbers, you know something about it; but when you cannot express it in numbers, your knowledge is of a meagre and unsatisfactory kind; it may be the beginning of knowledge, but you have scarcely, in your thoughts, advanced to the stage of Science, whatever the matter may be.”<br />-- William Thomson,1st Baron Kelvin<br />
    72. 72. 26/09/2011<br />© Seriti Consulting<br />50<br />Make sure you can measure your website performance… <br />(and that the numbers are getting better, not worse!)<br />
    73. 73. Betfair’s customer performance charter<br />26/09/2011<br />© Seriti Consulting<br />51<br /> ”We aim for 99.9% of bets placed in less than a second and our aspirational website SLA is as follows. Under peak loads, with performance measured at the 95th percentile, for typical user bandwidths and a 0% error rate, our users shall experience Visual Progress (header loaded) in less than 1 second, Time to Interact with useful content within 1.5 seconds and full page loads within 3 seconds. (There is room for improvement on this front as our current sports home page loads in approx. 18 seconds at the 95th percentile). We will publish our aggregate stats here monthly.”<br /><br />
    74. 74. 10 Seconds is too slow… (IMHO)<br />“Initial render” < 750ms and be <br />“Page Complete” < 3 seconds <br />“3 Second Rule”<br />26/09/2011<br />(c) Seriti Consulting, 2011<br />52<br />
    75. 75. JavaScript timing e.g. WebTuna, GA SiteSpeed<br />Browser plug-in e.g. HTTPwatch<br />Custom browser e.g. Site Confidence Active<br />Proxy timing e.g. Fiddler proxy<br />Web Server Module e.g. APM solutions<br />Network-level e.g. SC Organic, Atomic Labs Pion<br />26/09/2011<br />(c) Seriti Consulting, 2011<br />53<br />6 ways of measuring WebPerf<br />
    76. 76. 26/09/2011<br />(c) Seriti Consulting, 2011<br />54<br />Which is better?<br />It Depends…<br />
    77. 77. Do you want to measure every visit to your website?<br />Use a jscript tag, web server or network level solution<br />Are you measuring as part of Dev or QA?<br />Use a browser plug-in or proxy<br />Do you want detailed browser metrics like render start time?<br />Use a browser plug-in<br />Are you a 3rd party monitoring provider?<br />Use a custom browser variant! <br />26/09/2011<br />(c) Seriti Consulting, 2011<br />55<br />It depends on…<br />
    78. 78. Active Monitoring<br />Agent “pings” the web page<br />“Real-User” Monitoring (RUM)<br />“listening in” to real user traffic<br />Complementary methods!<br />Best solution is Active & Real-User<br />Not Active or Real-User…<br />26/09/2011<br />(c) Seriti Consulting, 2011<br />56<br />Active vs “Real-User”<br />
    79. 79. 26/09/2011<br />© Seriti Consulting<br />57<br />What about client-side?<br />
    80. 80. The Browser performance wars…<br />26/09/2011<br />© Seriti Consulting<br />58<br /> (2009)<br />
    81. 81. Automate cross-Browser perf testing!<br />26/09/2011<br />© Seriti Consulting<br />59<br />
    82. 82. 26/09/2011<br />© Seriti Consulting<br />60<br />What about Mobile?<br />
    83. 83. Different operating systems<br />26/09/2011<br />© Seriti Consulting<br />61<br />
    84. 84. Even more browsers?<br />26/09/2011<br />© Seriti Consulting<br />62<br /><br />
    85. 85.<br />
    86. 86. 26/09/2011<br />© Seriti Consulting<br />64<br /><br />
    87. 87. Mobile Performance is location-dependent<br />26/09/2011<br />© Seriti Consulting<br />65<br /><br />
    88. 88. Mobile latency (over HSDPA)<br />26/09/2011<br />© Seriti Consulting<br />66<br />Max RTT = 20 seconds!<br /><br />
    89. 89. Mobile performance rules???<br />Latency kills… <br />DNS Lookups take far longer<br />Avoid re-directs (to<br />Reduce the number of roundtrips (<15 per page?)<br />26/09/2011<br />(c) Seriti Consulting, 2011<br />67<br />
    90. 90. Mobile performance rules???<br />“Intelligent Adaptation”<br />Be device & network aware!<br />Send only what you need<br />Send the right sized images<br />With the minimum of script/CSS/etc<br />26/09/2011<br />(c) Seriti Consulting, 2011<br />68<br />
    91. 91. Mobile performance rules???<br />Cache<br />Brower cache (small cache, with a different eviction algorithm…)<br />AppCache, <br />LocalStorage, <br />26/09/2011<br />(c) Seriti Consulting, 2011<br />69<br />
    92. 92. 26/09/2011<br />© Seriti Consulting<br />70<br />And that’s all I’ve got…(but before I go…)<br />
    93. 93. 26/09/2011<br />© Seriti Consulting<br />71<br />Velocity EU<br />Web Performance Conference<br />Berlin 8th/9th November<br />(see me for a discount code!)<br /><br />