Performance automation 101 @LDNWebPerf MickMcGuinness


Published on

An overview of web performance automation in the Production environment - "faster ways to make your website faster". Covers things like sample .htaccess files through to performance accelerators like mod_pagespeed and Aptimize through to DSA's like Cotendo.

  • Be the first to comment

  • Be the first to like this

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

No notes for slide

Performance automation 101 @LDNWebPerf MickMcGuinness

  1. 1. Performance Automation faster ways to make your website faster @AppPerfConfidential © Performance is our business!
  2. 2. Topics Quick recap from last time Frontend optimization The optimization techniques Who is using them? If not why not? How to apply the techniques faster Manual coding .htaccess file PHP Libraries CMS plugins Web Server software/modules Hardware appliances SaaS Solutions and Advanced CDNsConfidential © Performance is our business!
  3. 3. What do we mean by Frontend Time? Definition Steve Souders “High-Performance Websites”Confidential © Performance is our business!
  4. 4. Why front-end Optimization? Over 80% of the page load time is spent outside the data centre!!! Steve Souders “High-Performance Websites”Confidential © Performance is our business!
  5. 5. The Tools Yahoo YSlow Google PageSpeed Take your pick, the rules are roughly equivalent.Confidential © Performance is our business!
  6. 6. 5 Important Ones 1. Reduce Page Size (<500Kb) 2. Enable (Gzip) Compression 3. Reduce the number of roundtrips (<40 per page…) 4. Structure the page (to improve render & download) CSS First Javascript last 5. Cache, Cache, CacheConfidential © Performance is our business!
  7. 7. Are sites applying the rules? Percent of sites that got a passing grade for the basic optimization checks: Percent of pages with a passing grade Optimization (2010) Keep-alive Enabled 85% Compress Text 43% Compress Images 39% Cache Static Content 15% Combine JS/CSS 47% CDN Usage 12% These arent the advanced optimizations - theyre the most basic. Only 15% of pages are effectively leveraging the browser cache! (and "passing" is pretty generous here - a score of 80 or better). © Performance is our business!
  8. 8. Analysis of FTSE 350 Frontend vs Backend TimeConfidential © Performance is our business!
  9. 9. Top 5 and Bottom 5 for FTSE 350 Top 5 Repeat FV Global RV Global Repeat First View View - Average Average First View View Size - HTTP HTTP Load Load URL Size (KB) (KB) Requests Requests YSlow Server Details Time Time 112 47 15 13 63 Microsoft-IIS/5.0 1.916 7.565 106 13 11 1 71 Microsoft-IIS/6.0 ASP.NET 2.047 0.663 49 3 7 6 82 Microsoft-IIS/6.0 ASP.NET 2.076 1.474 73 15 9 8 94 Apache 2.148 1.483 90 5 10 9 68 Microsoft-IIS/6.0 ASP.NET 2.525 1.779 Bottom 5 Repeat Repeat First View View - FV Global RV Global First View View Size - HTTP HTTP Average Average URL Size (KB) (KB) Requests Requests YSlow Server Details Load Time Load Time 1812 55 108 107 65 WS6 53.228 14.912 4125 18 66 62 47 Apache/2.0.52 (CentOS) 47.342 19.218 585 107 25 21 51 Microsoft-IIS/6.0 ASP.NET 36.791 29.976 1010 17 35 33 44 Microsoft-IIS/6.0 ASP.NET 36.361 7.926 387 37 50 48 54 Microsoft-IIS/5.0 ASP.NET 32.949 6.652 Full list © Performance is our business!
  10. 10. Second fastest home page in FTSE 350 Rich looking site but only 11 requests and 108KConfidential © Performance is our business!
  11. 11. Why isn’t everyone using the rules? Possible Reasons They don’t know about them They may still be focussing inside the data center They can be difficult to apply Let’s take a look at some ways to make it easierConfidential © Performance is our business!
  12. 12. Manual Coding Pros Anyone think of any??? Cons Time consuming. Developers would rather write new functionality. Not a one off. Needs to be repeated each time the site is updated. Some of the techniques are very difficult to implement manually. Difficult to do within most CMS environments Need to keep up to date with new techniques and new browsers as they become available.Confidential © Performance is our business!
  13. 13. Manual Coding Examples Image optimization    JS and CSS minification   © Performance is our business!
  14. 14. .htaccess Pros It’s FREE! (from Sergey Chernyshev) It is easy to implement Cons Apache or NginX only It won’t do all the optimizations. What it does is: Compression for text mime-types (mod_deflate) File versioning for static resources (mod_rewrite) Far-future cache expiry headers (mod_expires) Examples  now-on-github-go-fork-it/Confidential © Performance is our business!
  15. 15. PHP Libraries Pros Free in some cases Same optimizations as .htaccess technique but in some cases can also do additional techniques like: JS/CSS file combination and minification Cons PHP and Apache Only It won’t do all the optimizations. Examples  (GPL Open Source)  (Free & Commercial versions)  and-cache-output/187 (Free)Confidential © Performance is our business!
  16. 16. CMS Plugins Pros FREE in many cases Cons Specific to the CMS They won’t do all the optimizations Examples  performance  (Built in CSS and JS combination and minification)  performance (Built in CSS and JS combination and minification)Confidential © Performance is our business!
  17. 17. Acceleration Software/Modules Pros Quick to install. Automatically apply the most optimizations without code changes or hardware. Vendors continually develop to add support for new optimizations and browsers as they come along. Cons Beware of conflicts with other modules. Examples Aptimize (Commercial, any server) Google mod_pagespeed (Open Source, Apache only)Confidential © Performance is our business!
  18. 18. Aptimize example Load Time = 4.0 seconds Load Time = 9.1 seconds Fully Loaded = 6.8 seconds Fully Loaded = 13.2 seconds Page size = 501 KB Page size = 1251 KB Requests = 21 Requests = 84 © Performance is our business!
  19. 19. Hardware Appliances Traditional Load balancers have evolved to do additional tasks (Application Delivery Controllers) Pros Offload tasks from the web server such as:  Gzip compression  SSL termination  Caching Some are starting to do more frontend optimization techniques too. Cons They won’t do all the optimizations You need to install extra hardwareConfidential © Performance is our business!
  20. 20. Hardware Appliances Examples F5 Networks Citrix Netscaler Zeus StrangeLoops ActivNetworks We are seeing some convergence between network layer acceleration and application layer acceleration devices.Confidential © Performance is our business!
  21. 21. SaaS Solutions Pros No on site hardware or software needed Cons DNS points to the provider so your site availability outside your control Examples  optimizer-service/Confidential © Performance is our business!
  22. 22. Next generation CDNs Global edge caches with the addition of ‘middle mile acceleration’ which optimizes how data travels Pros No on site hardware or software needed TCP/IP optimization for middle mile Reduces round-trips Cons It won’t do all the optimizations.Confidential © Performance is our business!
  23. 23. Next generation CDNs Examples   © Performance is our business!
  24. 24. Summary Many sites are not following the rules for frontend optimization. Doing it manually is time consuming There are several better options to help you do things quicker and easier. Evaluate multiple options and benchmarkConfidential © Performance is our business!
  25. 25. Questions?Confidential © Performance is our business!
  26. 26. About Me 15yrs IT experience Started in 1996 as a C/C++ and Oracle developer Performance Consultant at Precise Software 1998-2003 Founded Application Performance Ltd in 2004-present  m:+44 7876 680410 Twitter: LinkedIn: Skype: mick_mcguinnessConfidential © Performance is our business!