SlideShare a Scribd company logo
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 (20)

PDF
About Caching
Weng Wei
 
PDF
PAC 2019 virtual Mark Tomlinson
Neotys
 
PDF
2013 - Igor Sysoev - NGINx: origen, evolución y futuro - PHP Conference Argen...
PHP Conference Argentina
 
PPTX
SenchaCon 2016: The Modern Toolchain - Ross Gerbasi
Sencha
 
PPTX
Bundling your front-end with Webpack
Danillo Corvalan
 
PPT
High Performance WordPress
Barry Abrahamson
 
PPT
ServerBeach and WordPress BlogWorldExpo 2007
Barry Abrahamson
 
PDF
Introduction to CQ5
Michele Mostarda
 
PDF
Cluster Fudge: Recipes for WordPress in the Cloud (WordCamp Austin 2014 Speaker)
Grant Norwood
 
PPTX
WordPress Development Environments
Josh Cummings
 
PDF
Speed Matters
Mark Stanton
 
PPTX
DotNet MVC and webpack + Babel + react
Chen-Tien Tsai
 
PDF
Back to the 90s' - Revenge of the static website
Yves Goeleven
 
KEY
Flash And Dom
Mike Wilcox
 
PDF
FITC - Here Be Dragons: Advanced JavaScript Debugging
Rami Sayar
 
PDF
WP-CLI Talk from WordCamp Montreal
Shawn Hooper
 
PPTX
A crash course in scaling wordpress
GovLoop
 
PPTX
Adobe CQ5 for Developers - Introduction
Tekno Point
 
PDF
Metarefresh
Aakash Bapna
 
PDF
Building Enterprise Grade Front-End Applications with JavaScript Frameworks
FITC
 
About Caching
Weng Wei
 
PAC 2019 virtual Mark Tomlinson
Neotys
 
2013 - Igor Sysoev - NGINx: origen, evolución y futuro - PHP Conference Argen...
PHP Conference Argentina
 
SenchaCon 2016: The Modern Toolchain - Ross Gerbasi
Sencha
 
Bundling your front-end with Webpack
Danillo Corvalan
 
High Performance WordPress
Barry Abrahamson
 
ServerBeach and WordPress BlogWorldExpo 2007
Barry Abrahamson
 
Introduction to CQ5
Michele Mostarda
 
Cluster Fudge: Recipes for WordPress in the Cloud (WordCamp Austin 2014 Speaker)
Grant Norwood
 
WordPress Development Environments
Josh Cummings
 
Speed Matters
Mark Stanton
 
DotNet MVC and webpack + Babel + react
Chen-Tien Tsai
 
Back to the 90s' - Revenge of the static website
Yves Goeleven
 
Flash And Dom
Mike Wilcox
 
FITC - Here Be Dragons: Advanced JavaScript Debugging
Rami Sayar
 
WP-CLI Talk from WordCamp Montreal
Shawn Hooper
 
A crash course in scaling wordpress
GovLoop
 
Adobe CQ5 for Developers - Introduction
Tekno Point
 
Metarefresh
Aakash Bapna
 
Building Enterprise Grade Front-End Applications with JavaScript Frameworks
FITC
 

Similar to Performance and scalability with drupal (20)

ODP
Speeding up your Drupal site
Ronan Berder
 
PDF
Scaling Drupal: Not IF... HOW
Treehouse Agency
 
PDF
Php go vrooom!
Elizabeth Smith
 
PPTX
Drupal performance
Piyuesh Kumar
 
PPT
Make Drupal Run Fast - increase page load speed
Andy Kucharski
 
PDF
Top ten-list
Brian DeShong
 
PPTX
BTV PHP - Building Fast Websites
Jonathan Klein
 
PDF
High Performance Drupal
Chapter Three
 
PDF
Drupal Performance : DrupalCamp North
Philip Norton
 
PPT
Make Drupal Run Fast - increase page load speed
Promet Source
 
PDF
23 Ways To Speed Up WordPress
Zero Point Development
 
PPTX
Joomla! Performance on Steroids
SiteGround.com
 
PDF
DrupalSouth 2015 - Performance: Not an Afterthought
Nick Santamaria
 
PDF
Dutch php conference_2010_opm
isnull
 
PDF
Beat the devil: towards a Drupal performance benchmark
Pedro González Serrano
 
PPT
Planning for-high-performance-web-application
Nguyễn Duy Nhân
 
PDF
My Site is slow - Drupal Camp London 2013
hernanibf
 
PPT
Performance and Scalability
Mediacurrent
 
PDF
DrupalCampLA 2011: Drupal backend-performance
Ashok Modi
 
PPTX
Web Performance, Scalability, and Testing Techniques - Boston PHP Meetup
Jonathan Klein
 
Speeding up your Drupal site
Ronan Berder
 
Scaling Drupal: Not IF... HOW
Treehouse Agency
 
Php go vrooom!
Elizabeth Smith
 
Drupal performance
Piyuesh Kumar
 
Make Drupal Run Fast - increase page load speed
Andy Kucharski
 
Top ten-list
Brian DeShong
 
BTV PHP - Building Fast Websites
Jonathan Klein
 
High Performance Drupal
Chapter Three
 
Drupal Performance : DrupalCamp North
Philip Norton
 
Make Drupal Run Fast - increase page load speed
Promet Source
 
23 Ways To Speed Up WordPress
Zero Point Development
 
Joomla! Performance on Steroids
SiteGround.com
 
DrupalSouth 2015 - Performance: Not an Afterthought
Nick Santamaria
 
Dutch php conference_2010_opm
isnull
 
Beat the devil: towards a Drupal performance benchmark
Pedro González Serrano
 
Planning for-high-performance-web-application
Nguyễn Duy Nhân
 
My Site is slow - Drupal Camp London 2013
hernanibf
 
Performance and Scalability
Mediacurrent
 
DrupalCampLA 2011: Drupal backend-performance
Ashok Modi
 
Web Performance, Scalability, and Testing Techniques - Boston PHP Meetup
Jonathan Klein
 
Ad

More from Ronan Berder (10)

PDF
UI/UX Conf - The future of design will be open
Ronan Berder
 
PDF
The revolution will be collaborative
Ronan Berder
 
PDF
Getting sh*t done with Jekyll
Ronan Berder
 
PPTX
13 steps to a faster jekyll website
Ronan Berder
 
PDF
Creatives are Bullsh*t - Engineering Creativity
Ronan Berder
 
PDF
13 steps to a faster jekyll website
Ronan Berder
 
PDF
Doing the right thing
Ronan Berder
 
PDF
JSON all the way
Ronan Berder
 
KEY
Views 3
Ronan Berder
 
PDF
Build Drupal Camp Shanghai with Drupal6
Ronan Berder
 
UI/UX Conf - The future of design will be open
Ronan Berder
 
The revolution will be collaborative
Ronan Berder
 
Getting sh*t done with Jekyll
Ronan Berder
 
13 steps to a faster jekyll website
Ronan Berder
 
Creatives are Bullsh*t - Engineering Creativity
Ronan Berder
 
13 steps to a faster jekyll website
Ronan Berder
 
Doing the right thing
Ronan Berder
 
JSON all the way
Ronan Berder
 
Views 3
Ronan Berder
 
Build Drupal Camp Shanghai with Drupal6
Ronan Berder
 
Ad

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