SlideShare uma empresa Scribd logo
1 de 25
Baixar para ler offline
WordPress
Need for Speed
Or How I Learned to Stop
Worrying and Love the Traffic
Load.
Who Am I?
Background Story
Objectives
On Rendering Speed
On Processing Speed
Conclusion
Pascal Deschenes
Technologist, Nu Echo Co-Founder




@pdeschen
http://about.me/pdeschen
Background Story
When your
blog meld
down.
,,   To one who
     waits, a
     moment seems
     a year.
A 1-second
delay in page
load time
equals 11%
fewer page
views.


       source: Aberdeen Group
On Rendering Speed



                     Elapse Time for a Page
                     to Load Completely
Play the Page Speed Game
Tracking Speed with Google Analytics




    _gaq.push(['_trackPageLoadTime']);
A Web Page in
a Browser is
like a Jigsaw.
On Images

Optimize your image resolution

Do not rely on browser image scaling

Have a (small) favicon
On Scripts and Styles


Scripts to the Bottom

CSS to the Top

Combine & Minify

Limit Inline CSS & JavaScript
On Requests

Move Static Content Away

Minimize Requests

Reduce DNS Look-Up

Limit Cookies Size
CDN Stands for
Content Delivery
Network
not Canada.
On Processing Speed



                      Elapse Time
                      to Serve a Page
All Web Servers
Aren't Equals



siege -c 250 http://blog.foo.bar
ab -q -n 2500 -c 250 http://blog.foo.bar
How may I serve you?

Add Expire Headers

Compress Content

Minimize Redirect

Workers are your Friends
WordPress Caching Plugins




                            source: tutorial9.net
HTTP Accelerators: Proxy and Cache




                                     source: Varnish Software
Rolling Your Own With nginx
  #compress
  gzip_buffers 32 8k;
  gzip on;
  gzip_types
     text/html
     application/javascript
     text/javascript
     text/css
     text/xml
     application/atom+xml
     application/xml;

  #caching related
  proxy_cache_path /var/lib/nginx/cache levels=1:2
     keys_zone=staticfilecache:180m max_size=500m;

  proxy_temp_path /var/lib/nginx/proxy;
  proxy_connect_timeout 30;
  proxy_read_timeout 120;
  proxy_send_timeout 120;
  proxy_cache_key "$scheme://$host$request_uri";
Rolling Your Own With nginx
  upstream wordpress {
    server 127.0.0.1:81 weight=1 fail_timeout=120s;
  }
  server {
    listen 80;
    server_name blog.foo.bar;
    proxy_cache_valid 200 20m;
    access_log /var/log/httpd/nginx-access.log combined;

   # for debugging, log cache hit or miss.
   log_format up_head '[$time_local] "$request" '
      '$status $body_bytes_sent "$http_referer" '
      '"$http_x_forwarded_for" "$upstream_cache_status"';
   access_log /var/log/nginx/blog.foo.bar-access.log up_head;

   proxy_set_header X-Real-IP $remote_addr;
   proxy_set_header Host $host;
   proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;

   #unless specified, activate the caching
   set $do_not_cache 0;
Rolling Your Own With nginx
 location / {
   # If logged in, don't cache.
   if ($http_cookie ~*
       "comment_author_ | wordpress_(?!test_cookie) | wp-postpass_" ) {
     set $do_not_cache 1;
   }
   proxy_cache_key "$scheme://$host$request_uri $do_not_cache";
   proxy_cache staticfilecache;
   proxy_pass http://wordpress;
 }
 location ~* wp-.*.php|wp-admin {
   proxy_pass http://wordpress;
 }
 location ~* .(jpg|png|gif|jpeg|css|js|mp3|swf|pdf)$ {
   proxy_cache_valid 200 120m;
   expires 864000;
   proxy_pass http://wordpress;
   proxy_cache staticfilecache;
 }
 location ~* /[^/]+/(feed|.xml)/? {
   proxy_cache_valid 200 45m;
   ...
 }
Virtual WordPress Hosting

  server_name www.blog.bar;
  location / {
    proxy_pass http://wordpress/www.blog.bar;
    ...
  }

  server_name www.blog.foo;
  location / {
    proxy_pass http://wordpress/www.blog.foo;
    ...
  }
Questions?

blog.rassemblr.com/tag/wordcampmtl

           @pdeschen

Mais conteúdo relacionado

Mais procurados

How to Speed Up Your Joomla! Site
How to Speed Up Your Joomla! SiteHow to Speed Up Your Joomla! Site
How to Speed Up Your Joomla! Site
Daniel Kanchev
 
Php & web server performace
Php & web server performacePhp & web server performace
Php & web server performace
Tuyển Đoàn
 

Mais procurados (20)

Nginx + PHP
Nginx + PHPNginx + PHP
Nginx + PHP
 
Fluent 2012 v2
Fluent 2012   v2Fluent 2012   v2
Fluent 2012 v2
 
High Performance - Joomla!Days NL 2009 #jd09nl
High Performance - Joomla!Days NL 2009 #jd09nlHigh Performance - Joomla!Days NL 2009 #jd09nl
High Performance - Joomla!Days NL 2009 #jd09nl
 
Search in WordPress - how it works and howto customize it
Search in WordPress - how it works and howto customize itSearch in WordPress - how it works and howto customize it
Search in WordPress - how it works and howto customize it
 
Introduction to performance tuning perl web applications
Introduction to performance tuning perl web applicationsIntroduction to performance tuning perl web applications
Introduction to performance tuning perl web applications
 
Client-side Website Optimization
Client-side Website OptimizationClient-side Website Optimization
Client-side Website Optimization
 
Harder, Better, Faster, Stronger
Harder, Better, Faster, StrongerHarder, Better, Faster, Stronger
Harder, Better, Faster, Stronger
 
Optimize
OptimizeOptimize
Optimize
 
Presentation1
Presentation1Presentation1
Presentation1
 
Caching in Drupal 8
Caching in Drupal 8Caching in Drupal 8
Caching in Drupal 8
 
DrupalCon Barcelona 2015
DrupalCon Barcelona 2015DrupalCon Barcelona 2015
DrupalCon Barcelona 2015
 
How to Speed Up Your Joomla! Site
How to Speed Up Your Joomla! SiteHow to Speed Up Your Joomla! Site
How to Speed Up Your Joomla! Site
 
Seravo.com: WordPress Security 101
Seravo.com: WordPress Security 101Seravo.com: WordPress Security 101
Seravo.com: WordPress Security 101
 
Caching for Cash - Part 4
Caching for Cash - Part 4Caching for Cash - Part 4
Caching for Cash - Part 4
 
Improving WordPress Performance with Xdebug and PHP Profiling
Improving WordPress Performance with Xdebug and PHP ProfilingImproving WordPress Performance with Xdebug and PHP Profiling
Improving WordPress Performance with Xdebug and PHP Profiling
 
Frontend Caching - The "new" frontier
Frontend Caching - The "new" frontierFrontend Caching - The "new" frontier
Frontend Caching - The "new" frontier
 
Caching for Cash, part 4 DPC 2009
Caching for Cash, part 4 DPC 2009Caching for Cash, part 4 DPC 2009
Caching for Cash, part 4 DPC 2009
 
Hidden Secrets For A Hack-Proof Joomla! Site
Hidden Secrets For A Hack-Proof Joomla! SiteHidden Secrets For A Hack-Proof Joomla! Site
Hidden Secrets For A Hack-Proof Joomla! Site
 
Php & web server performace
Php & web server performacePhp & web server performace
Php & web server performace
 
Memcached Presentation
Memcached PresentationMemcached Presentation
Memcached Presentation
 

Destaque (7)

Dec issue 2 2010 sales listing slideshow powerpoint pos one sales
Dec issue 2  2010 sales listing slideshow powerpoint pos one salesDec issue 2  2010 sales listing slideshow powerpoint pos one sales
Dec issue 2 2010 sales listing slideshow powerpoint pos one sales
 
Nov 2010 sales listing slideshow powerpoint pos one sales
Nov 2010 sales listing slideshow powerpoint pos one salesNov 2010 sales listing slideshow powerpoint pos one sales
Nov 2010 sales listing slideshow powerpoint pos one sales
 
приглашение. влияние цвета на внешность
приглашение. влияние цвета на внешностьприглашение. влияние цвета на внешность
приглашение. влияние цвета на внешность
 
This time is different
This time is differentThis time is different
This time is different
 
The Psychology of Running
The Psychology of Running The Psychology of Running
The Psychology of Running
 
My 20 years personal marketing plan
My 20 years personal marketing planMy 20 years personal marketing plan
My 20 years personal marketing plan
 
Marathon Mettle - The Psychology of Running
Marathon Mettle - The Psychology of RunningMarathon Mettle - The Psychology of Running
Marathon Mettle - The Psychology of Running
 

Semelhante a WordPress Need For Speed

WordCamp RVA 2011 - Performance & Tuning.pdf
WordCamp RVA 2011 - Performance & Tuning.pdfWordCamp RVA 2011 - Performance & Tuning.pdf
WordCamp RVA 2011 - Performance & Tuning.pdf
codearachnid_test
 
WordCamp RVA 2011 - Performance & Tuning.pdf
WordCamp RVA 2011 - Performance & Tuning.pdfWordCamp RVA 2011 - Performance & Tuning.pdf
WordCamp RVA 2011 - Performance & Tuning.pdf
codearachnid_test
 

Semelhante a WordPress Need For Speed (20)

WordPress + NGINX Best Practices with EasyEngine
WordPress + NGINX Best Practices with EasyEngineWordPress + NGINX Best Practices with EasyEngine
WordPress + NGINX Best Practices with EasyEngine
 
WordPress At Scale. WordCamp Dhaka 2019
WordPress At Scale. WordCamp Dhaka 2019WordPress At Scale. WordCamp Dhaka 2019
WordPress At Scale. WordCamp Dhaka 2019
 
Apache and PHP: Why httpd.conf is your new BFF!
Apache and PHP: Why httpd.conf is your new BFF!Apache and PHP: Why httpd.conf is your new BFF!
Apache and PHP: Why httpd.conf is your new BFF!
 
High Availability Content Caching with NGINX
High Availability Content Caching with NGINXHigh Availability Content Caching with NGINX
High Availability Content Caching with NGINX
 
High Availability Content Caching with NGINX
High Availability Content Caching with NGINXHigh Availability Content Caching with NGINX
High Availability Content Caching with NGINX
 
Caching 101
Caching 101Caching 101
Caching 101
 
High performance WordPress
High performance WordPressHigh performance WordPress
High performance WordPress
 
WordCamp RVA 2011 - Performance & Tuning.pdf
WordCamp RVA 2011 - Performance & Tuning.pdfWordCamp RVA 2011 - Performance & Tuning.pdf
WordCamp RVA 2011 - Performance & Tuning.pdf
 
WordCamp RVA
WordCamp RVAWordCamp RVA
WordCamp RVA
 
WordCamp RVA
WordCamp RVAWordCamp RVA
WordCamp RVA
 
WordCamp RVA 2011 - Performance & Tuning.pdf
WordCamp RVA 2011 - Performance & Tuning.pdfWordCamp RVA 2011 - Performance & Tuning.pdf
WordCamp RVA 2011 - Performance & Tuning.pdf
 
Optimizing wp
Optimizing wpOptimizing wp
Optimizing wp
 
Mastering WordPress Vol.1
Mastering WordPress Vol.1Mastering WordPress Vol.1
Mastering WordPress Vol.1
 
The Need for Speed - SMX Sydney 2013
The Need for Speed - SMX Sydney 2013The Need for Speed - SMX Sydney 2013
The Need for Speed - SMX Sydney 2013
 
Improving WordPress performance (xdebug and profiling)
Improving WordPress performance (xdebug and profiling)Improving WordPress performance (xdebug and profiling)
Improving WordPress performance (xdebug and profiling)
 
Developing cacheable PHP applications - PHPLimburgBE 2018
Developing cacheable PHP applications - PHPLimburgBE 2018Developing cacheable PHP applications - PHPLimburgBE 2018
Developing cacheable PHP applications - PHPLimburgBE 2018
 
ITB2017 - Nginx Effective High Availability Content Caching
ITB2017 - Nginx Effective High Availability Content CachingITB2017 - Nginx Effective High Availability Content Caching
ITB2017 - Nginx Effective High Availability Content Caching
 
More Than You Ever Wanted to Know About Resource Hints - Harry Roberts (CSS W...
More Than You Ever Wanted to Know About Resource Hints - Harry Roberts (CSS W...More Than You Ever Wanted to Know About Resource Hints - Harry Roberts (CSS W...
More Than You Ever Wanted to Know About Resource Hints - Harry Roberts (CSS W...
 
Oscon 2011 - ATS
Oscon 2011 - ATSOscon 2011 - ATS
Oscon 2011 - ATS
 
Optimize wordpress
Optimize wordpressOptimize wordpress
Optimize wordpress
 

Último

Último (20)

Artificial Intelligence Chap.5 : Uncertainty
Artificial Intelligence Chap.5 : UncertaintyArtificial Intelligence Chap.5 : Uncertainty
Artificial Intelligence Chap.5 : Uncertainty
 
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
 
Polkadot JAM Slides - Token2049 - By Dr. Gavin Wood
Polkadot JAM Slides - Token2049 - By Dr. Gavin WoodPolkadot JAM Slides - Token2049 - By Dr. Gavin Wood
Polkadot JAM Slides - Token2049 - By Dr. Gavin Wood
 
Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...
Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...
Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...
 
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
 
Navi Mumbai Call Girls 🥰 8617370543 Service Offer VIP Hot Model
Navi Mumbai Call Girls 🥰 8617370543 Service Offer VIP Hot ModelNavi Mumbai Call Girls 🥰 8617370543 Service Offer VIP Hot Model
Navi Mumbai Call Girls 🥰 8617370543 Service Offer VIP Hot Model
 
Ransomware_Q4_2023. The report. [EN].pdf
Ransomware_Q4_2023. The report. [EN].pdfRansomware_Q4_2023. The report. [EN].pdf
Ransomware_Q4_2023. The report. [EN].pdf
 
Automating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps ScriptAutomating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps Script
 
Strategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a FresherStrategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a Fresher
 
2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...
 
presentation ICT roal in 21st century education
presentation ICT roal in 21st century educationpresentation ICT roal in 21st century education
presentation ICT roal in 21st century education
 
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law DevelopmentsTrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
 
Apidays Singapore 2024 - Scalable LLM APIs for AI and Generative AI Applicati...
Apidays Singapore 2024 - Scalable LLM APIs for AI and Generative AI Applicati...Apidays Singapore 2024 - Scalable LLM APIs for AI and Generative AI Applicati...
Apidays Singapore 2024 - Scalable LLM APIs for AI and Generative AI Applicati...
 
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost SavingRepurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
 
MS Copilot expands with MS Graph connectors
MS Copilot expands with MS Graph connectorsMS Copilot expands with MS Graph connectors
MS Copilot expands with MS Graph connectors
 
DBX First Quarter 2024 Investor Presentation
DBX First Quarter 2024 Investor PresentationDBX First Quarter 2024 Investor Presentation
DBX First Quarter 2024 Investor Presentation
 
Corporate and higher education May webinar.pptx
Corporate and higher education May webinar.pptxCorporate and higher education May webinar.pptx
Corporate and higher education May webinar.pptx
 
Apidays Singapore 2024 - Modernizing Securities Finance by Madhu Subbu
Apidays Singapore 2024 - Modernizing Securities Finance by Madhu SubbuApidays Singapore 2024 - Modernizing Securities Finance by Madhu Subbu
Apidays Singapore 2024 - Modernizing Securities Finance by Madhu Subbu
 
Real Time Object Detection Using Open CV
Real Time Object Detection Using Open CVReal Time Object Detection Using Open CV
Real Time Object Detection Using Open CV
 
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot TakeoffStrategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
 

WordPress Need For Speed

  • 1. WordPress Need for Speed Or How I Learned to Stop Worrying and Love the Traffic Load.
  • 2. Who Am I? Background Story Objectives On Rendering Speed On Processing Speed Conclusion
  • 3. Pascal Deschenes Technologist, Nu Echo Co-Founder @pdeschen http://about.me/pdeschen
  • 6. ,, To one who waits, a moment seems a year.
  • 7. A 1-second delay in page load time equals 11% fewer page views. source: Aberdeen Group
  • 8. On Rendering Speed Elapse Time for a Page to Load Completely
  • 9. Play the Page Speed Game
  • 10. Tracking Speed with Google Analytics _gaq.push(['_trackPageLoadTime']);
  • 11. A Web Page in a Browser is like a Jigsaw.
  • 12. On Images Optimize your image resolution Do not rely on browser image scaling Have a (small) favicon
  • 13. On Scripts and Styles Scripts to the Bottom CSS to the Top Combine & Minify Limit Inline CSS & JavaScript
  • 14. On Requests Move Static Content Away Minimize Requests Reduce DNS Look-Up Limit Cookies Size
  • 15. CDN Stands for Content Delivery Network not Canada.
  • 16. On Processing Speed Elapse Time to Serve a Page
  • 17. All Web Servers Aren't Equals siege -c 250 http://blog.foo.bar ab -q -n 2500 -c 250 http://blog.foo.bar
  • 18. How may I serve you? Add Expire Headers Compress Content Minimize Redirect Workers are your Friends
  • 19. WordPress Caching Plugins source: tutorial9.net
  • 20. HTTP Accelerators: Proxy and Cache source: Varnish Software
  • 21. Rolling Your Own With nginx #compress gzip_buffers 32 8k; gzip on; gzip_types text/html application/javascript text/javascript text/css text/xml application/atom+xml application/xml; #caching related proxy_cache_path /var/lib/nginx/cache levels=1:2 keys_zone=staticfilecache:180m max_size=500m; proxy_temp_path /var/lib/nginx/proxy; proxy_connect_timeout 30; proxy_read_timeout 120; proxy_send_timeout 120; proxy_cache_key "$scheme://$host$request_uri";
  • 22. Rolling Your Own With nginx upstream wordpress { server 127.0.0.1:81 weight=1 fail_timeout=120s; } server { listen 80; server_name blog.foo.bar; proxy_cache_valid 200 20m; access_log /var/log/httpd/nginx-access.log combined; # for debugging, log cache hit or miss. log_format up_head '[$time_local] "$request" ' '$status $body_bytes_sent "$http_referer" ' '"$http_x_forwarded_for" "$upstream_cache_status"'; access_log /var/log/nginx/blog.foo.bar-access.log up_head; proxy_set_header X-Real-IP $remote_addr; proxy_set_header Host $host; proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; #unless specified, activate the caching set $do_not_cache 0;
  • 23. Rolling Your Own With nginx location / { # If logged in, don't cache. if ($http_cookie ~* "comment_author_ | wordpress_(?!test_cookie) | wp-postpass_" ) { set $do_not_cache 1; } proxy_cache_key "$scheme://$host$request_uri $do_not_cache"; proxy_cache staticfilecache; proxy_pass http://wordpress; } location ~* wp-.*.php|wp-admin { proxy_pass http://wordpress; } location ~* .(jpg|png|gif|jpeg|css|js|mp3|swf|pdf)$ { proxy_cache_valid 200 120m; expires 864000; proxy_pass http://wordpress; proxy_cache staticfilecache; } location ~* /[^/]+/(feed|.xml)/? { proxy_cache_valid 200 45m; ... }
  • 24. Virtual WordPress Hosting server_name www.blog.bar; location / { proxy_pass http://wordpress/www.blog.bar; ... } server_name www.blog.foo; location / { proxy_pass http://wordpress/www.blog.foo; ... }