SlideShare a Scribd company logo
1 of 17
Whenever you’re ready...
 Performance & Scalability with Drupal




                                     !"#$%&#'()
Who the hell is this guy?


• I run Wiredcraft (http://wiredcraft.com)
• We build (serious) Web and mobile solutions
  using Open Source technologies

• We work with the United Nations, CNN,
  Nvidia...



                                          !"#$%&#'()
What’s the deal?

• Drupal is;
 • flexible & extensible
 • slow  as hell




• We want to;
 • deliver the content quickly to the user
 • optimize the use of backend resources
                                        !"#$%&#'()
How do we do that?


• Analyze the bottleneck
• Adapt the back-end and/or front-end
• Test
• Repeat


                                        !"#$%&#'()
Now a few advices...


• Add complexity incrementally
• Scale vertically first
• Focus on users not system administrators
• Optimizing your code is a huge part of the
  equation



                                         !"#$%&#'()
Analyze the bottleneck

• Pimp up your shell skills
• Problem: Network? Disk? CPU? Memory?
• Source: Web server? App server? DB?
• Caching is not magic; it adds complexity
• For the long run, consider monitoring;
  Zabbix, Cacti, Nagios, Munin...



                                        !"#$%&#'()
Web server

• Clean up your configuration (MPM,
  MaxClients, MaxRequestsPerChild,
  KeepAlive...)

• Remove unnecessary modules
• Consider switching to NGINX
• Stress test (Apache Benchmark)
• Scale horizontally; load balancer (HAproxy)
                                         !"#$%&#'()
App server


• Clean up your configurationand add slow logs if possible




• Remove unnecessary modules
• Consider switching to CGI; PHP-FPM or
  FastCGI

• Add an opcode; XCache, eAccelerator or APC

                                                       !"#$%&#'()
Database server


• Clean up your configuration   and add slow logs




• Add caching; Memcache
• Switch from MyISAM to InnoDB
• Scale horizontally; Master/Slave replication


                                                   !"#$%&#'()
What is Pressflow?


• Patched version of Drupalfor performance purpose




• Runs Drupal.org
• Only works with PHP5 and MySQL
• Supports M/S replication and reverse-proxy


                                                     !"#$%&#'()
Other optimizations...

• Views caching
• Block caching (Block Cache Alter module)
• Reverse proxy (Varnish) or file caching
  (Boost)

• Add a full text search engine; Solr, Sphinx,
  Elastic Search... Plenty of modules; Search
  API module, Searchlight...


                                          !"#$%&#'()
And then some more


• Authenticated caching; much more complex
  (AuthCache module)

• More core patches; http://
  tag1consulting.com/patches

• Denormalize your tables (Materialized View
  API)   if you’re on fire




                                        !"#$%&#'()
Now the real big thing


• The biggest bottleneck: the code
• Too many modules (feature creep)
• Poor code, slow queries
• “Bad” modules usually results from “bad” engineering




                                                         !"#$%&#'()
Find out the culprit


• Slow query logs (MySQL)
• Slow script logs (PHP-FPM)
• Code Profiling; XHProf, XDebug
• Testingthe good old “disable and load the page”




                                                    !"#$%&#'()
Dealing with the situation

• Buy some time:
 • Quick wins; Opcode, Memcache
 • Switch to NGINX+PHP-FPM
 • Cleanup your configuration
 • Cache anonymous traffic (Boost or
    Varnish)

• Clean up the mess
                                       !"#$%&#'()
Next step; front-end

• Complete separate topic;
 • CSS/JS aggregation,
 • parallelization & CDN,
 • Gzip compression,
 • sprites & image optimization...
• Code also matters here: optimize!
                                      !"#$%&#'()
Questions?
Go easy on me though, I’m sick today...




                                          !"#$%&#'()

More Related Content

What's hot

About Caching
About CachingAbout Caching
About CachingWeng Wei
 
PAC 2019 virtual Mark Tomlinson
PAC 2019 virtual Mark TomlinsonPAC 2019 virtual Mark Tomlinson
PAC 2019 virtual Mark TomlinsonNeotys
 
2013 - Igor Sysoev - NGINx: origen, evolución y futuro - PHP Conference Argen...
2013 - Igor Sysoev - NGINx: origen, evolución y futuro - PHP Conference Argen...2013 - Igor Sysoev - NGINx: origen, evolución y futuro - PHP Conference Argen...
2013 - Igor Sysoev - NGINx: origen, evolución y futuro - PHP Conference Argen...PHP Conference Argentina
 
SenchaCon 2016: The Modern Toolchain - Ross Gerbasi
SenchaCon 2016: The Modern Toolchain - Ross Gerbasi   SenchaCon 2016: The Modern Toolchain - Ross Gerbasi
SenchaCon 2016: The Modern Toolchain - Ross Gerbasi Sencha
 
Bundling your front-end with Webpack
Bundling your front-end with WebpackBundling your front-end with Webpack
Bundling your front-end with WebpackDanillo Corvalan
 
High Performance WordPress
High Performance WordPressHigh Performance WordPress
High Performance WordPressBarry Abrahamson
 
ServerBeach and WordPress BlogWorldExpo 2007
ServerBeach and WordPress BlogWorldExpo 2007ServerBeach and WordPress BlogWorldExpo 2007
ServerBeach and WordPress BlogWorldExpo 2007Barry Abrahamson
 
Cluster Fudge: Recipes for WordPress in the Cloud (WordCamp Austin 2014 Speaker)
Cluster Fudge: Recipes for WordPress in the Cloud (WordCamp Austin 2014 Speaker)Cluster Fudge: Recipes for WordPress in the Cloud (WordCamp Austin 2014 Speaker)
Cluster Fudge: Recipes for WordPress in the Cloud (WordCamp Austin 2014 Speaker)Grant Norwood
 
WordPress Development Environments
WordPress Development EnvironmentsWordPress Development Environments
WordPress Development EnvironmentsJosh Cummings
 
DotNet MVC and webpack + Babel + react
DotNet MVC and webpack + Babel + reactDotNet MVC and webpack + Babel + react
DotNet MVC and webpack + Babel + reactChen-Tien Tsai
 
Back to the 90s' - Revenge of the static website
Back to the 90s' - Revenge of the static websiteBack to the 90s' - Revenge of the static website
Back to the 90s' - Revenge of the static websiteYves Goeleven
 
FITC - Here Be Dragons: Advanced JavaScript Debugging
FITC - Here Be Dragons: Advanced JavaScript DebuggingFITC - Here Be Dragons: Advanced JavaScript Debugging
FITC - Here Be Dragons: Advanced JavaScript DebuggingRami Sayar
 
WP-CLI Talk from WordCamp Montreal
WP-CLI Talk from WordCamp MontrealWP-CLI Talk from WordCamp Montreal
WP-CLI Talk from WordCamp MontrealShawn Hooper
 
A crash course in scaling wordpress
A crash course inscaling wordpress A crash course inscaling wordpress
A crash course in scaling wordpress GovLoop
 
Adobe CQ5 for Developers - Introduction
Adobe CQ5 for Developers - IntroductionAdobe CQ5 for Developers - Introduction
Adobe CQ5 for Developers - IntroductionTekno Point
 
Building Enterprise Grade Front-End Applications with JavaScript Frameworks
Building Enterprise Grade Front-End Applications with JavaScript FrameworksBuilding Enterprise Grade Front-End Applications with JavaScript Frameworks
Building Enterprise Grade Front-End Applications with JavaScript FrameworksFITC
 

What's hot (20)

About Caching
About CachingAbout Caching
About Caching
 
PAC 2019 virtual Mark Tomlinson
PAC 2019 virtual Mark TomlinsonPAC 2019 virtual Mark Tomlinson
PAC 2019 virtual Mark Tomlinson
 
2013 - Igor Sysoev - NGINx: origen, evolución y futuro - PHP Conference Argen...
2013 - Igor Sysoev - NGINx: origen, evolución y futuro - PHP Conference Argen...2013 - Igor Sysoev - NGINx: origen, evolución y futuro - PHP Conference Argen...
2013 - Igor Sysoev - NGINx: origen, evolución y futuro - PHP Conference Argen...
 
SenchaCon 2016: The Modern Toolchain - Ross Gerbasi
SenchaCon 2016: The Modern Toolchain - Ross Gerbasi   SenchaCon 2016: The Modern Toolchain - Ross Gerbasi
SenchaCon 2016: The Modern Toolchain - Ross Gerbasi
 
Bundling your front-end with Webpack
Bundling your front-end with WebpackBundling your front-end with Webpack
Bundling your front-end with Webpack
 
High Performance WordPress
High Performance WordPressHigh Performance WordPress
High Performance WordPress
 
ServerBeach and WordPress BlogWorldExpo 2007
ServerBeach and WordPress BlogWorldExpo 2007ServerBeach and WordPress BlogWorldExpo 2007
ServerBeach and WordPress BlogWorldExpo 2007
 
Introduction to CQ5
Introduction to CQ5Introduction to CQ5
Introduction to CQ5
 
Cluster Fudge: Recipes for WordPress in the Cloud (WordCamp Austin 2014 Speaker)
Cluster Fudge: Recipes for WordPress in the Cloud (WordCamp Austin 2014 Speaker)Cluster Fudge: Recipes for WordPress in the Cloud (WordCamp Austin 2014 Speaker)
Cluster Fudge: Recipes for WordPress in the Cloud (WordCamp Austin 2014 Speaker)
 
WordPress Development Environments
WordPress Development EnvironmentsWordPress Development Environments
WordPress Development Environments
 
Speed Matters
Speed MattersSpeed Matters
Speed Matters
 
DotNet MVC and webpack + Babel + react
DotNet MVC and webpack + Babel + reactDotNet MVC and webpack + Babel + react
DotNet MVC and webpack + Babel + react
 
Back to the 90s' - Revenge of the static website
Back to the 90s' - Revenge of the static websiteBack to the 90s' - Revenge of the static website
Back to the 90s' - Revenge of the static website
 
Flash And Dom
Flash And DomFlash And Dom
Flash And Dom
 
FITC - Here Be Dragons: Advanced JavaScript Debugging
FITC - Here Be Dragons: Advanced JavaScript DebuggingFITC - Here Be Dragons: Advanced JavaScript Debugging
FITC - Here Be Dragons: Advanced JavaScript Debugging
 
WP-CLI Talk from WordCamp Montreal
WP-CLI Talk from WordCamp MontrealWP-CLI Talk from WordCamp Montreal
WP-CLI Talk from WordCamp Montreal
 
A crash course in scaling wordpress
A crash course inscaling wordpress A crash course inscaling wordpress
A crash course in scaling wordpress
 
Adobe CQ5 for Developers - Introduction
Adobe CQ5 for Developers - IntroductionAdobe CQ5 for Developers - Introduction
Adobe CQ5 for Developers - Introduction
 
Metarefresh
MetarefreshMetarefresh
Metarefresh
 
Building Enterprise Grade Front-End Applications with JavaScript Frameworks
Building Enterprise Grade Front-End Applications with JavaScript FrameworksBuilding Enterprise Grade Front-End Applications with JavaScript Frameworks
Building Enterprise Grade Front-End Applications with JavaScript Frameworks
 

Similar to Performance and scalability with drupal

5 Common Mistakes You are Making on your Website
 5 Common Mistakes You are Making on your Website 5 Common Mistakes You are Making on your Website
5 Common Mistakes You are Making on your WebsiteAcquia
 
Introduction to memcached
Introduction to memcachedIntroduction to memcached
Introduction to memcachedJurriaan Persyn
 
Masterin Large Scale Java Script Applications
Masterin Large Scale Java Script ApplicationsMasterin Large Scale Java Script Applications
Masterin Large Scale Java Script ApplicationsFabian Jakobs
 
Where Django Caching Bust at the Seams
Where Django Caching Bust at the SeamsWhere Django Caching Bust at the Seams
Where Django Caching Bust at the SeamsConcentric Sky
 
DrupalSouth 2015 - Performance: Not an Afterthought
DrupalSouth 2015 - Performance: Not an AfterthoughtDrupalSouth 2015 - Performance: Not an Afterthought
DrupalSouth 2015 - Performance: Not an AfterthoughtNick Santamaria
 
Configuration management with puppet
Configuration management with puppetConfiguration management with puppet
Configuration management with puppetJakub Stransky
 
Northeast PHP - High Performance PHP
Northeast PHP - High Performance PHPNortheast PHP - High Performance PHP
Northeast PHP - High Performance PHPJonathan Klein
 
Yapc10 Cdt World Domination
Yapc10   Cdt World DominationYapc10   Cdt World Domination
Yapc10 Cdt World DominationcPanel
 
Capacity Planning for fun & profit
Capacity Planning for fun & profitCapacity Planning for fun & profit
Capacity Planning for fun & profitRodrigo Campos
 
Mainframe, the fast PHP framework
Mainframe, the fast PHP frameworkMainframe, the fast PHP framework
Mainframe, the fast PHP frameworkbibakis
 
Women Who Code, Ground Floor
Women Who Code, Ground FloorWomen Who Code, Ground Floor
Women Who Code, Ground FloorKatie Weiss
 
Web Development using Ruby on Rails
Web Development using Ruby on RailsWeb Development using Ruby on Rails
Web Development using Ruby on RailsAvi Kedar
 
introduction to node.js
introduction to node.jsintroduction to node.js
introduction to node.jsorkaplan
 
1.6 米嘉 gobuildweb
1.6 米嘉 gobuildweb1.6 米嘉 gobuildweb
1.6 米嘉 gobuildwebLeo Zhou
 
The things we found in your website
The things we found in your websiteThe things we found in your website
The things we found in your websitehernanibf
 

Similar to Performance and scalability with drupal (20)

Top ten-list
Top ten-listTop ten-list
Top ten-list
 
5 Common Mistakes You are Making on your Website
 5 Common Mistakes You are Making on your Website 5 Common Mistakes You are Making on your Website
5 Common Mistakes You are Making on your Website
 
Introduction to memcached
Introduction to memcachedIntroduction to memcached
Introduction to memcached
 
Masterin Large Scale Java Script Applications
Masterin Large Scale Java Script ApplicationsMasterin Large Scale Java Script Applications
Masterin Large Scale Java Script Applications
 
Where Django Caching Bust at the Seams
Where Django Caching Bust at the SeamsWhere Django Caching Bust at the Seams
Where Django Caching Bust at the Seams
 
DrupalSouth 2015 - Performance: Not an Afterthought
DrupalSouth 2015 - Performance: Not an AfterthoughtDrupalSouth 2015 - Performance: Not an Afterthought
DrupalSouth 2015 - Performance: Not an Afterthought
 
Configuration management with puppet
Configuration management with puppetConfiguration management with puppet
Configuration management with puppet
 
Northeast PHP - High Performance PHP
Northeast PHP - High Performance PHPNortheast PHP - High Performance PHP
Northeast PHP - High Performance PHP
 
Be faster then rabbits
Be faster then rabbitsBe faster then rabbits
Be faster then rabbits
 
Yapc10 Cdt World Domination
Yapc10   Cdt World DominationYapc10   Cdt World Domination
Yapc10 Cdt World Domination
 
Capacity Planning for fun & profit
Capacity Planning for fun & profitCapacity Planning for fun & profit
Capacity Planning for fun & profit
 
JavaScript Event Loop
JavaScript Event LoopJavaScript Event Loop
JavaScript Event Loop
 
Mainframe, the fast PHP framework
Mainframe, the fast PHP frameworkMainframe, the fast PHP framework
Mainframe, the fast PHP framework
 
Women Who Code, Ground Floor
Women Who Code, Ground FloorWomen Who Code, Ground Floor
Women Who Code, Ground Floor
 
Why ruby and rails
Why ruby and railsWhy ruby and rails
Why ruby and rails
 
Web Development using Ruby on Rails
Web Development using Ruby on RailsWeb Development using Ruby on Rails
Web Development using Ruby on Rails
 
introduction to node.js
introduction to node.jsintroduction to node.js
introduction to node.js
 
1.6 米嘉 gobuildweb
1.6 米嘉 gobuildweb1.6 米嘉 gobuildweb
1.6 米嘉 gobuildweb
 
The things we found in your website
The things we found in your websiteThe things we found in your website
The things we found in your website
 
Ipc mysql php
Ipc mysql php Ipc mysql php
Ipc mysql php
 

More from Ronan Berder

UI/UX Conf - The future of design will be open
UI/UX Conf - The future of design will be openUI/UX Conf - The future of design will be open
UI/UX Conf - The future of design will be openRonan Berder
 
The revolution will be collaborative
The revolution will be collaborativeThe revolution will be collaborative
The revolution will be collaborativeRonan Berder
 
Getting sh*t done with Jekyll
Getting sh*t done with JekyllGetting sh*t done with Jekyll
Getting sh*t done with JekyllRonan Berder
 
13 steps to a faster jekyll website
13 steps to a faster jekyll website13 steps to a faster jekyll website
13 steps to a faster jekyll websiteRonan Berder
 
Creatives are Bullsh*t - Engineering Creativity
Creatives are Bullsh*t - Engineering CreativityCreatives are Bullsh*t - Engineering Creativity
Creatives are Bullsh*t - Engineering CreativityRonan Berder
 
13 steps to a faster jekyll website
13 steps to a faster jekyll website13 steps to a faster jekyll website
13 steps to a faster jekyll websiteRonan Berder
 
Doing the right thing
Doing the right thingDoing the right thing
Doing the right thingRonan Berder
 
Speeding up your Drupal site
Speeding up your Drupal siteSpeeding up your Drupal site
Speeding up your Drupal siteRonan Berder
 
Build Drupal Camp Shanghai with Drupal6
Build Drupal Camp Shanghai with Drupal6Build Drupal Camp Shanghai with Drupal6
Build Drupal Camp Shanghai with Drupal6Ronan Berder
 

More from Ronan Berder (11)

UI/UX Conf - The future of design will be open
UI/UX Conf - The future of design will be openUI/UX Conf - The future of design will be open
UI/UX Conf - The future of design will be open
 
The revolution will be collaborative
The revolution will be collaborativeThe revolution will be collaborative
The revolution will be collaborative
 
Getting sh*t done with Jekyll
Getting sh*t done with JekyllGetting sh*t done with Jekyll
Getting sh*t done with Jekyll
 
13 steps to a faster jekyll website
13 steps to a faster jekyll website13 steps to a faster jekyll website
13 steps to a faster jekyll website
 
Creatives are Bullsh*t - Engineering Creativity
Creatives are Bullsh*t - Engineering CreativityCreatives are Bullsh*t - Engineering Creativity
Creatives are Bullsh*t - Engineering Creativity
 
13 steps to a faster jekyll website
13 steps to a faster jekyll website13 steps to a faster jekyll website
13 steps to a faster jekyll website
 
Doing the right thing
Doing the right thingDoing the right thing
Doing the right thing
 
JSON all the way
JSON all the wayJSON all the way
JSON all the way
 
Views 3
Views 3Views 3
Views 3
 
Speeding up your Drupal site
Speeding up your Drupal siteSpeeding up your Drupal site
Speeding up your Drupal site
 
Build Drupal Camp Shanghai with Drupal6
Build Drupal Camp Shanghai with Drupal6Build Drupal Camp Shanghai with Drupal6
Build Drupal Camp Shanghai with Drupal6
 

Performance and scalability with drupal

  • 1. Whenever you’re ready... Performance & Scalability with Drupal !"#$%&#'()
  • 2. Who the hell is this guy? • I run Wiredcraft (http://wiredcraft.com) • We build (serious) Web and mobile solutions using Open Source technologies • We work with the United Nations, CNN, Nvidia... !"#$%&#'()
  • 3. What’s the deal? • Drupal is; • flexible & extensible • slow as hell • We want to; • deliver the content quickly to the user • optimize the use of backend resources !"#$%&#'()
  • 4. How do we do that? • Analyze the bottleneck • Adapt the back-end and/or front-end • Test • Repeat !"#$%&#'()
  • 5. Now a few advices... • Add complexity incrementally • Scale vertically first • Focus on users not system administrators • Optimizing your code is a huge part of the equation !"#$%&#'()
  • 6. Analyze the bottleneck • Pimp up your shell skills • Problem: Network? Disk? CPU? Memory? • Source: Web server? App server? DB? • Caching is not magic; it adds complexity • For the long run, consider monitoring; Zabbix, Cacti, Nagios, Munin... !"#$%&#'()
  • 7. Web server • Clean up your configuration (MPM, MaxClients, MaxRequestsPerChild, KeepAlive...) • Remove unnecessary modules • Consider switching to NGINX • Stress test (Apache Benchmark) • Scale horizontally; load balancer (HAproxy) !"#$%&#'()
  • 8. App server • Clean up your configurationand add slow logs if possible • Remove unnecessary modules • Consider switching to CGI; PHP-FPM or FastCGI • Add an opcode; XCache, eAccelerator or APC !"#$%&#'()
  • 9. Database server • Clean up your configuration and add slow logs • Add caching; Memcache • Switch from MyISAM to InnoDB • Scale horizontally; Master/Slave replication !"#$%&#'()
  • 10. What is Pressflow? • Patched version of Drupalfor performance purpose • Runs Drupal.org • Only works with PHP5 and MySQL • Supports M/S replication and reverse-proxy !"#$%&#'()
  • 11. Other optimizations... • Views caching • Block caching (Block Cache Alter module) • Reverse proxy (Varnish) or file caching (Boost) • Add a full text search engine; Solr, Sphinx, Elastic Search... Plenty of modules; Search API module, Searchlight... !"#$%&#'()
  • 12. And then some more • Authenticated caching; much more complex (AuthCache module) • More core patches; http:// tag1consulting.com/patches • Denormalize your tables (Materialized View API) if you’re on fire !"#$%&#'()
  • 13. Now the real big thing • The biggest bottleneck: the code • Too many modules (feature creep) • Poor code, slow queries • “Bad” modules usually results from “bad” engineering !"#$%&#'()
  • 14. Find out the culprit • Slow query logs (MySQL) • Slow script logs (PHP-FPM) • Code Profiling; XHProf, XDebug • Testingthe good old “disable and load the page” !"#$%&#'()
  • 15. Dealing with the situation • Buy some time: • Quick wins; Opcode, Memcache • Switch to NGINX+PHP-FPM • Cleanup your configuration • Cache anonymous traffic (Boost or Varnish) • Clean up the mess !"#$%&#'()
  • 16. Next step; front-end • Complete separate topic; • CSS/JS aggregation, • parallelization & CDN, • Gzip compression, • sprites & image optimization... • Code also matters here: optimize! !"#$%&#'()
  • 17. Questions? Go easy on me though, I’m sick today... !"#$%&#'()

Editor's Notes

  1. \n
  2. \n
  3. \n
  4. \n
  5. \n
  6. \n
  7. \n
  8. \n
  9. \n
  10. \n
  11. \n
  12. \n
  13. \n
  14. \n
  15. \n
  16. \n
  17. \n