WordCamp RVA 2011 - Performance & Tuning


Published on

This is my presentation from WordCamp RVA 2011 on Performance and Tuning WordPress

Published in: Technology
1 Like
  • Be the first to comment

No Downloads
Total Views
On Slideshare
From Embeds
Number of Embeds
Embeds 0
No embeds

No notes for slide

WordCamp RVA 2011 - Performance & Tuning

  1. 1. WordPress PerformanceTimothy Wood @codearachnidwww.ImagineSimplicity.com || www.codearachnid.com
  2. 2. How do you percieve performance?
  3. 3. Change behavior to influence perceptionPercieved Performance: Actual Performance:Responsive ● Optimize● Feedback ● Cache● Progressive ● Minimize● Escape or Distract ● Workflow● Describe
  4. 4. Low hanging fruit for WordPress:● Frontend ○ Minimize ○ Sprites● Caching ○ Asset delivery ○ Chunking● Application ○ Theme ○ Plugins● Server Setups ○ OS choice & tweaking
  5. 5. Battle of the brawn● Process based ● Event based● Req increase RAM ● RAM use is stable● Gobs of features ● Speed > features● More use cases ● no .htaccessLike Apache, Nginx has all the features youwould expect from a leading Web server. It isstable, secure and very easy to configure.
  6. 6. Real world comparisons: 9794 req/5 min 32 req/second Only site on fresh VPS install, with minimal graphics, scripts, css. 17479 req/5 min 60 req/second One of several sites on VPS, photographer portofolio, heavyStress tests by http://loadimpact.com graphics, minimal scripts & css.
  7. 7. Real world comparisions (cont.):
  8. 8. But wait... Theres more! - WP Plugin: nginx Compatibility - Pretty URLS: /etc/nginx/sites-available/nginx.conf if (!-e $request_filename) { rewrite ^ /index.php last; } Performance
  9. 9. Tips for optimizing application layerTheme: Plugins:● Simplify & Reduce ● Delete Unused ● Combine Functionality● Keep Code Updated ● Avoid Bad Plugins● Repair MySQL DB● Log Slow Queries● Move CSS to top & Javascript to bottom
  10. 10. Caching with static content + CDNPlugins: Benefit:● W3TC ● At least 10x improvement in site● WP Super Cache performance● Hyper Cache ● “Instant” second page● DB Cache Reloaded views ● Reduced page load time ● Improved web serverCDN: performance● Amazon S3 & ● Up to 80% Bandwidth Cloudfront savings
  11. 11. W3 Total Cache (setup walkthrough)1. Sign-up for Amazon S3 & Cloudfront2. Install W3 Total Cache Plugin within WordPress3. Follow W3 Total Cache Instructions within WordPress admin panel4. Log in to Cloudfront control panel and create a Distribution for your newly created bucked
  12. 12. CDN explained & expoundedA content delivery network or contentdistribution network (CDN) is a system ofcomputers containing copies of data placed atvarious nodes of a network.* The optimal number is somewhere between 1 and 5 hosts (1 main host plus 4hosts on which to parallelize cacheable resources). As a rule of thumb, youshouldnt use more than 1 host for fewer than 6 resources; fewer than 2resources on a single host is especially wasteful. It should never be necessaryto use more than 5 hosts (not counting hosts serving resources over which youhave no control, such as ads). (source: Google Page Speed)
  13. 13. Interface polish & performance● Yslow, Page Speed, Speed Tracer● Minify and combine all CSS and JavaScript● gZip, image sprites, smush.it● Cleanup your markup● Improve wait messaging
  14. 14. What did we learn?● Build on a good foundation● Pull the weeds of unnecessary code● Optimize browser rendering● Minimize request overhead● Minimize round-trip times● Minimize payload size● Optimize caching● Change perception
  15. 15. Find me online:@CODEARACHNID
  1. A particular slide catching your eye?

    Clipping is a handy way to collect important slides you want to go back to later.