SlideShare a Scribd company logo
1 of 37
Download to read offline
High Performance Drupal
Jeff Geerling
Technical Architect, Acqia
geerlingguy
• Hosted Apache Solr
• Server Check.in
• Ansible for DevOps
• Technical Architect
"Drupal is SLOW!"
"Drupal is SLOW!"
"It's actually hard to intentionally make Drupal slow."
- Me, when creating this presentation
Agenda
1. Process for performance improvement
2. Easy Wins for Drupal performance
3. Live site performance improvement demo
Process
• Have a plan:
• "Front page should load in < 2 seconds for
anonymous users."
• "Time to first byte should be < 500ms for
anonymous users."
Process
• Have a plan:
• "Front page should load in < 2 seconds for
anonymous users."
• "Time to first byte should be < 500ms for
anonymous users."
Process
• Run benchmarks:
• TTFB, Full page load, DOM complete, etc.
Process
hard
low
high
easy
Performance
Improvement
Difficulty
Process
hard
low
high
easy
Performance
Improvement
Difficulty
Good
Process
hard
low
high
easy
Performance
Improvement
Difficulty
Good
Bad
Process
hard
low
high
easy
Performance
Improvement
Difficulty
Good
Bad
"m
eh"
Process
hard
low
high
easy
Performance
Improvement
Difficulty
Good
Bad
"m
eh"
Focus on this area
Useful Tools
• Chrome Developer Tools
• Devel, drush
• XHProf (and sometimes XDebug)
• WebPagetest.org
• GTmetrix
• Pingdom Website Speed Test
• ab / wrk / jmeter
Focus on ROI
Focus on fixes that produce order-of-magnitude gains first!
Easy Wins - Drupal
• General
• KISS: Remove modules, simplify layouts... be ruthless!
• Use Boost (if no Varnish/Nginx static cache)
• Disable dblog module
Easy Wins - Drupal
• Caching
• Enable anonymous page cache (default in D8)
• Views: use views caching (+ Views cache bully... but not
needed in D8!), use Litepager
• Use panels, block, entity caching
• Watch for cache-breaking elements (e.g. login block +
Honeypot, etc.)
Easy Wins - Drupal
• On the edge of 'easy'
• Use drupal_fast_404() + Fast 404
• Avoid redirects inside Drupal (convenience tradeoff)
• Use drush for cron, use Elysia Cron
Easy Wins - Backend
• Apache / Nginx
• "Use PHP-FPM instead of Apache mod_php"
• Not really this simple; more about smart
resource allocation
• More CPU cores, more RAM
Easy Wins - Backend
• PHP
• Run version 5.5+
• Make sure OpCache can hold all your code

(opcache_get_status())
• MySQL
• innodb_buffer_size - database in RAM
• slow_query_log - watch it!
Easy Wins - Front End
• Optimize images (smaller sizes w/ styles, fewer
images per page, lazy loading)
• Enable CSS/JS Aggregation, consider advagg
• Use CloudFlare or another CDN
• YSlow/PageSpeed - Fix easy configuration
changes (expires, etags, etc.)
• Remove external / social widgets and embeds
Easy Wins - Front End
• External service integrations are often the #1
or #2 performance burden for front-end page
load times.
• Social widgets
• Embedded media
• Ads, tracking
• iframe content
Let's Do This Thing!
1. Plan
2. Benchmark
3. Adjust
4. Benchmark again
1. Plan
• Home page should load in <1s for anonymous
users over a local network connection
• Home page should load in <2s for authenticated
users over a local network connection
• Assumptions:
• Site has mostly anonymous traffic
• Site serves a single geographical region, mostly
desktop users
1. Plan
• Home page should load in <1s for anonymous
users over a local network connection
• Home page should load in <2s for authenticated
users over a local network connection
• Assumptions:
• Site has mostly anonymous traffic
• Site serves a single geographical region, mostly
desktop users
Important!
Demo site: http://hp-drupal.dev/
(running on Drupal VM)
2. Benchmark
Chrome Dev Tools:
• View > Developer >

Developer Tools
• Option + ⌘ + I (Mac)
• Ctrl + Shift + C (Win/Linux)
Network tab
DOMContentLoaded
Load (total time)
2. Benchmark
$ time drush @alias php-eval '
$path="front";
menu_set_active_item($path);
menu_execute_active_handler($path, TRUE);' > /dev/null
$ wrk -t2 -c4 -d30s http://www.example.com/
$ ab -n 50 -c 2 http://www.example.com/
Test PHP/Drupal alone:
Test Backend alone:
2. Benchmark
Benchmark Before After
DOMContentLoaded ~1.6s ?
Load (Full) ~4.0s ?
drush (backend) ~2.0s ?
wrk (load test) ~1.75 req/s ?
3. Adjust
Symptom Indication
Large BE/FE Δ Slow-loading FE resources
Long TTFB* (> 1s) Backend response slow
~2 req/s capacity Site will scale... poorly
*TTFB = Time To First Byte
3. Adjust
• Add Caching
• Beware lipstick on a pig!
• Caches should make what's good, better
• Stop the bleeding first
• Easy Wins, then harder things like slow queries
and code fixes
4. Benchmark again
Benchmark Before After
DOMContentLoaded ~1.6s ~0.2s
Load (Full) ~4.0s ~0.2s
drush (backend) ~2.0s ~0.8s
wrk (load test) ~1.75 req/s ~437 req/s
Bonus Round
4. Benchmark again
Benchmark Before After + VARNISH
DOMContentLoaded ~1.6s ~0.1s
Load (Full) ~4.0s ~0.1s
drush (backend) ~2.0s ~
wrk (load test) ~1.75 req/s ~4,000 req/s
Other Considerations
• Monitoring:
• Uptime (Pingdom, Server Check.in, etc.)
• Performance (AppNeta, NewRelic)
• Resource usage (Munin, Cacti, Icinga)
• Infrastructure - HA, Scalability
• UX and performance
Other Resources
• High Performance Drupal (O'Reilly)
• Drupal VM (optimized LAMP stack)
• Ansible for DevOps (infrastructure focus)

More Related Content

What's hot

Drupal VM for Drupal 8 Dev - Drupal Camp STL 2017
Drupal VM for Drupal 8 Dev - Drupal Camp STL 2017Drupal VM for Drupal 8 Dev - Drupal Camp STL 2017
Drupal VM for Drupal 8 Dev - Drupal Camp STL 2017Jeff Geerling
 
Stress Free Deployment - Confoo 2011
Stress Free Deployment  - Confoo 2011Stress Free Deployment  - Confoo 2011
Stress Free Deployment - Confoo 2011Bachkoutou Toutou
 
How Ansible Makes Automation Easy
How Ansible Makes Automation EasyHow Ansible Makes Automation Easy
How Ansible Makes Automation EasyPeter Sankauskas
 
Using Ansible at Scale to Manage a Public Cloud
Using Ansible at Scale to Manage a Public CloudUsing Ansible at Scale to Manage a Public Cloud
Using Ansible at Scale to Manage a Public CloudJesse Keating
 
Continuous Testing with Molecule, Ansible, and GitHub Actions
Continuous Testing with Molecule, Ansible, and GitHub ActionsContinuous Testing with Molecule, Ansible, and GitHub Actions
Continuous Testing with Molecule, Ansible, and GitHub ActionsJeff Geerling
 
Extending Ansible - Ansible Benelux meetup - Amsterdam 11-02-2016
Extending Ansible - Ansible Benelux meetup - Amsterdam 11-02-2016Extending Ansible - Ansible Benelux meetup - Amsterdam 11-02-2016
Extending Ansible - Ansible Benelux meetup - Amsterdam 11-02-2016Pavel Chunyayev
 
Performance and scalability with drupal
Performance and scalability with drupalPerformance and scalability with drupal
Performance and scalability with drupalRonan Berder
 
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
 
WordPress and The Command Line
WordPress and The Command LineWordPress and The Command Line
WordPress and The Command LineKelly Dwan
 
Automated Deployment and Configuration Engines. Ansible
Automated Deployment and Configuration Engines. AnsibleAutomated Deployment and Configuration Engines. Ansible
Automated Deployment and Configuration Engines. AnsibleAlberto Molina Coballes
 
CommandBox REPL, CLI, and Package Manager
CommandBox REPL, CLI, and Package ManagerCommandBox REPL, CLI, and Package Manager
CommandBox REPL, CLI, and Package Managerbdw429s
 
Putting the 'ctions' in Azure Fun-ctions
Putting the 'ctions' in Azure Fun-ctionsPutting the 'ctions' in Azure Fun-ctions
Putting the 'ctions' in Azure Fun-ctionsNullOps
 
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
 
Introduction to Chef
Introduction to ChefIntroduction to Chef
Introduction to ChefKnoldus Inc.
 
Pure Speed Drupal 4 Gov talk
Pure Speed Drupal 4 Gov talkPure Speed Drupal 4 Gov talk
Pure Speed Drupal 4 Gov talkBryan Ollendyke
 
Put a Button on It: Removing Barriers to Going Fast
Put a Button on It: Removing Barriers to Going FastPut a Button on It: Removing Barriers to Going Fast
Put a Button on It: Removing Barriers to Going FastOSCON Byrum
 
Chef Fundamentals Training Series Module 2: Workstation Setup
Chef Fundamentals Training Series Module 2: Workstation SetupChef Fundamentals Training Series Module 2: Workstation Setup
Chef Fundamentals Training Series Module 2: Workstation SetupChef Software, Inc.
 
Agiles Peru 2019 - Infrastructure As Code
Agiles Peru 2019 - Infrastructure As CodeAgiles Peru 2019 - Infrastructure As Code
Agiles Peru 2019 - Infrastructure As CodeMario IC
 
03 ansible towerbestpractices-nicholas
03 ansible towerbestpractices-nicholas03 ansible towerbestpractices-nicholas
03 ansible towerbestpractices-nicholasKhairul Zebua
 

What's hot (20)

Drupal VM for Drupal 8 Dev - Drupal Camp STL 2017
Drupal VM for Drupal 8 Dev - Drupal Camp STL 2017Drupal VM for Drupal 8 Dev - Drupal Camp STL 2017
Drupal VM for Drupal 8 Dev - Drupal Camp STL 2017
 
Stress Free Deployment - Confoo 2011
Stress Free Deployment  - Confoo 2011Stress Free Deployment  - Confoo 2011
Stress Free Deployment - Confoo 2011
 
How Ansible Makes Automation Easy
How Ansible Makes Automation EasyHow Ansible Makes Automation Easy
How Ansible Makes Automation Easy
 
Using Ansible at Scale to Manage a Public Cloud
Using Ansible at Scale to Manage a Public CloudUsing Ansible at Scale to Manage a Public Cloud
Using Ansible at Scale to Manage a Public Cloud
 
Continuous Testing with Molecule, Ansible, and GitHub Actions
Continuous Testing with Molecule, Ansible, and GitHub ActionsContinuous Testing with Molecule, Ansible, and GitHub Actions
Continuous Testing with Molecule, Ansible, and GitHub Actions
 
Extending Ansible - Ansible Benelux meetup - Amsterdam 11-02-2016
Extending Ansible - Ansible Benelux meetup - Amsterdam 11-02-2016Extending Ansible - Ansible Benelux meetup - Amsterdam 11-02-2016
Extending Ansible - Ansible Benelux meetup - Amsterdam 11-02-2016
 
Performance and scalability with drupal
Performance and scalability with drupalPerformance and scalability with drupal
Performance and scalability with drupal
 
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
 
WordPress and The Command Line
WordPress and The Command LineWordPress and The Command Line
WordPress and The Command Line
 
Extending ansible
Extending ansibleExtending ansible
Extending ansible
 
Automated Deployment and Configuration Engines. Ansible
Automated Deployment and Configuration Engines. AnsibleAutomated Deployment and Configuration Engines. Ansible
Automated Deployment and Configuration Engines. Ansible
 
CommandBox REPL, CLI, and Package Manager
CommandBox REPL, CLI, and Package ManagerCommandBox REPL, CLI, and Package Manager
CommandBox REPL, CLI, and Package Manager
 
Putting the 'ctions' in Azure Fun-ctions
Putting the 'ctions' in Azure Fun-ctionsPutting the 'ctions' in Azure Fun-ctions
Putting the 'ctions' in Azure Fun-ctions
 
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
 
Introduction to Chef
Introduction to ChefIntroduction to Chef
Introduction to Chef
 
Pure Speed Drupal 4 Gov talk
Pure Speed Drupal 4 Gov talkPure Speed Drupal 4 Gov talk
Pure Speed Drupal 4 Gov talk
 
Put a Button on It: Removing Barriers to Going Fast
Put a Button on It: Removing Barriers to Going FastPut a Button on It: Removing Barriers to Going Fast
Put a Button on It: Removing Barriers to Going Fast
 
Chef Fundamentals Training Series Module 2: Workstation Setup
Chef Fundamentals Training Series Module 2: Workstation SetupChef Fundamentals Training Series Module 2: Workstation Setup
Chef Fundamentals Training Series Module 2: Workstation Setup
 
Agiles Peru 2019 - Infrastructure As Code
Agiles Peru 2019 - Infrastructure As CodeAgiles Peru 2019 - Infrastructure As Code
Agiles Peru 2019 - Infrastructure As Code
 
03 ansible towerbestpractices-nicholas
03 ansible towerbestpractices-nicholas03 ansible towerbestpractices-nicholas
03 ansible towerbestpractices-nicholas
 

Viewers also liked

ProTips for Staying Sane while Working from Home
ProTips for Staying Sane while Working from Home ProTips for Staying Sane while Working from Home
ProTips for Staying Sane while Working from Home Jeff Geerling
 
Ansible 2 and Ansible Galaxy 2
Ansible 2 and Ansible Galaxy 2Ansible 2 and Ansible Galaxy 2
Ansible 2 and Ansible Galaxy 2Jeff Geerling
 
Ansible + Drupal: A Fortuitous DevOps Match
Ansible + Drupal: A Fortuitous DevOps MatchAnsible + Drupal: A Fortuitous DevOps Match
Ansible + Drupal: A Fortuitous DevOps MatchJeff Geerling
 
Drupal Performance and Scaling
Drupal Performance and ScalingDrupal Performance and Scaling
Drupal Performance and ScalingGerald Villorente
 
Drupal Performance Audit and Optimization
Drupal Performance Audit and OptimizationDrupal Performance Audit and Optimization
Drupal Performance Audit and OptimizationZyxware Technologies
 
Improving Drupal Performances
Improving Drupal PerformancesImproving Drupal Performances
Improving Drupal PerformancesVladimir Ilic
 
Scaling Drupal on Amazon Web Services (DrupalCamp Brighton)
Scaling Drupal on Amazon Web Services (DrupalCamp Brighton)Scaling Drupal on Amazon Web Services (DrupalCamp Brighton)
Scaling Drupal on Amazon Web Services (DrupalCamp Brighton)Cogapp
 
Scaling drupal horizontally and in cloud
Scaling drupal horizontally and in cloudScaling drupal horizontally and in cloud
Scaling drupal horizontally and in cloudVladimir Ilic
 
Simplify Migration with RISC Network’s Complete App Analysis
Simplify Migration with RISC Network’s Complete App AnalysisSimplify Migration with RISC Network’s Complete App Analysis
Simplify Migration with RISC Network’s Complete App AnalysisAmazon Web Services
 
How Discovery Migrated 80% of Their IT to AWS with Cloudreach
How Discovery Migrated 80% of Their IT to AWS with CloudreachHow Discovery Migrated 80% of Their IT to AWS with Cloudreach
How Discovery Migrated 80% of Their IT to AWS with CloudreachAmazon Web Services
 
Drupal 8 - A Brief Introduction
Drupal 8 - A Brief IntroductionDrupal 8 - A Brief Introduction
Drupal 8 - A Brief IntroductionJeff Geerling
 
Amazon CloudWatch Logs and AWS Lambda
Amazon CloudWatch Logs and AWS LambdaAmazon CloudWatch Logs and AWS Lambda
Amazon CloudWatch Logs and AWS LambdaAmazon Web Services
 
DevOps for Humans - Ansible for Drupal Deployment Victory!
DevOps for Humans - Ansible for Drupal Deployment Victory!DevOps for Humans - Ansible for Drupal Deployment Victory!
DevOps for Humans - Ansible for Drupal Deployment Victory!Jeff Geerling
 
Active Archiving with Amazon S3 and Tiering to Amazon Glacier - March 2017 AW...
Active Archiving with Amazon S3 and Tiering to Amazon Glacier - March 2017 AW...Active Archiving with Amazon S3 and Tiering to Amazon Glacier - March 2017 AW...
Active Archiving with Amazon S3 and Tiering to Amazon Glacier - March 2017 AW...Amazon Web Services
 
How to Scale Your Architecture and DevOps Practices for Big Data Applications
How to Scale Your Architecture and DevOps Practices for Big Data ApplicationsHow to Scale Your Architecture and DevOps Practices for Big Data Applications
How to Scale Your Architecture and DevOps Practices for Big Data ApplicationsAmazon Web Services
 
Large-Scale AWS Migrations with CSC
Large-Scale AWS Migrations with CSCLarge-Scale AWS Migrations with CSC
Large-Scale AWS Migrations with CSCAmazon Web Services
 
Building a Development Workflow for Serverless Applications - March 2017 AWS ...
Building a Development Workflow for Serverless Applications - March 2017 AWS ...Building a Development Workflow for Serverless Applications - March 2017 AWS ...
Building a Development Workflow for Serverless Applications - March 2017 AWS ...Amazon Web Services
 
Getting the Most Out of the New Amazon EC2 Reserved Instances Enhancements - ...
Getting the Most Out of the New Amazon EC2 Reserved Instances Enhancements - ...Getting the Most Out of the New Amazon EC2 Reserved Instances Enhancements - ...
Getting the Most Out of the New Amazon EC2 Reserved Instances Enhancements - ...Amazon Web Services
 

Viewers also liked (20)

ProTips for Staying Sane while Working from Home
ProTips for Staying Sane while Working from Home ProTips for Staying Sane while Working from Home
ProTips for Staying Sane while Working from Home
 
Ansible 2 and Ansible Galaxy 2
Ansible 2 and Ansible Galaxy 2Ansible 2 and Ansible Galaxy 2
Ansible 2 and Ansible Galaxy 2
 
Ansible + Drupal: A Fortuitous DevOps Match
Ansible + Drupal: A Fortuitous DevOps MatchAnsible + Drupal: A Fortuitous DevOps Match
Ansible + Drupal: A Fortuitous DevOps Match
 
Drupal Performance and Scaling
Drupal Performance and ScalingDrupal Performance and Scaling
Drupal Performance and Scaling
 
Drupal Performance Audit and Optimization
Drupal Performance Audit and OptimizationDrupal Performance Audit and Optimization
Drupal Performance Audit and Optimization
 
Improving Drupal Performances
Improving Drupal PerformancesImproving Drupal Performances
Improving Drupal Performances
 
Scaling Drupal on Amazon Web Services (DrupalCamp Brighton)
Scaling Drupal on Amazon Web Services (DrupalCamp Brighton)Scaling Drupal on Amazon Web Services (DrupalCamp Brighton)
Scaling Drupal on Amazon Web Services (DrupalCamp Brighton)
 
Scaling drupal horizontally and in cloud
Scaling drupal horizontally and in cloudScaling drupal horizontally and in cloud
Scaling drupal horizontally and in cloud
 
Simplify Migration with RISC Network’s Complete App Analysis
Simplify Migration with RISC Network’s Complete App AnalysisSimplify Migration with RISC Network’s Complete App Analysis
Simplify Migration with RISC Network’s Complete App Analysis
 
How Discovery Migrated 80% of Their IT to AWS with Cloudreach
How Discovery Migrated 80% of Their IT to AWS with CloudreachHow Discovery Migrated 80% of Their IT to AWS with Cloudreach
How Discovery Migrated 80% of Their IT to AWS with Cloudreach
 
Drupal 8 - A Brief Introduction
Drupal 8 - A Brief IntroductionDrupal 8 - A Brief Introduction
Drupal 8 - A Brief Introduction
 
Introduction to AWS X-Ray
Introduction to AWS X-RayIntroduction to AWS X-Ray
Introduction to AWS X-Ray
 
Amazon CloudWatch Logs and AWS Lambda
Amazon CloudWatch Logs and AWS LambdaAmazon CloudWatch Logs and AWS Lambda
Amazon CloudWatch Logs and AWS Lambda
 
DevOps for Humans - Ansible for Drupal Deployment Victory!
DevOps for Humans - Ansible for Drupal Deployment Victory!DevOps for Humans - Ansible for Drupal Deployment Victory!
DevOps for Humans - Ansible for Drupal Deployment Victory!
 
Active Archiving with Amazon S3 and Tiering to Amazon Glacier - March 2017 AW...
Active Archiving with Amazon S3 and Tiering to Amazon Glacier - March 2017 AW...Active Archiving with Amazon S3 and Tiering to Amazon Glacier - March 2017 AW...
Active Archiving with Amazon S3 and Tiering to Amazon Glacier - March 2017 AW...
 
How to Scale Your Architecture and DevOps Practices for Big Data Applications
How to Scale Your Architecture and DevOps Practices for Big Data ApplicationsHow to Scale Your Architecture and DevOps Practices for Big Data Applications
How to Scale Your Architecture and DevOps Practices for Big Data Applications
 
CloudFormation Best Practices
CloudFormation Best PracticesCloudFormation Best Practices
CloudFormation Best Practices
 
Large-Scale AWS Migrations with CSC
Large-Scale AWS Migrations with CSCLarge-Scale AWS Migrations with CSC
Large-Scale AWS Migrations with CSC
 
Building a Development Workflow for Serverless Applications - March 2017 AWS ...
Building a Development Workflow for Serverless Applications - March 2017 AWS ...Building a Development Workflow for Serverless Applications - March 2017 AWS ...
Building a Development Workflow for Serverless Applications - March 2017 AWS ...
 
Getting the Most Out of the New Amazon EC2 Reserved Instances Enhancements - ...
Getting the Most Out of the New Amazon EC2 Reserved Instances Enhancements - ...Getting the Most Out of the New Amazon EC2 Reserved Instances Enhancements - ...
Getting the Most Out of the New Amazon EC2 Reserved Instances Enhancements - ...
 

Similar to High Performance Drupal

DrupalCampLA 2014 - Drupal backend performance and scalability
DrupalCampLA 2014 - Drupal backend performance and scalabilityDrupalCampLA 2014 - Drupal backend performance and scalability
DrupalCampLA 2014 - Drupal backend performance and scalabilitycherryhillco
 
Django dev-env-my-way
Django dev-env-my-wayDjango dev-env-my-way
Django dev-env-my-wayRobert Lujo
 
Continuous Integration with Open Source Tools - PHPUgFfm 2014-11-20
Continuous Integration with Open Source Tools - PHPUgFfm 2014-11-20Continuous Integration with Open Source Tools - PHPUgFfm 2014-11-20
Continuous Integration with Open Source Tools - PHPUgFfm 2014-11-20Michael Lihs
 
Fundamentals of performance tuning PHP on IBM i
Fundamentals of performance tuning PHP on IBM i  Fundamentals of performance tuning PHP on IBM i
Fundamentals of performance tuning PHP on IBM i Zend by Rogue Wave Software
 
SenchaCon 2016: Develop, Test & Deploy with Docker - Jonas Schwabe
SenchaCon 2016: Develop, Test & Deploy with Docker - Jonas Schwabe SenchaCon 2016: Develop, Test & Deploy with Docker - Jonas Schwabe
SenchaCon 2016: Develop, Test & Deploy with Docker - Jonas Schwabe Sencha
 
From Zero to Performance Hero in Minutes - Agile Testing Days 2014 Potsdam
From Zero to Performance Hero in Minutes - Agile Testing Days 2014 PotsdamFrom Zero to Performance Hero in Minutes - Agile Testing Days 2014 Potsdam
From Zero to Performance Hero in Minutes - Agile Testing Days 2014 PotsdamAndreas Grabner
 
JavaScript Performance Patterns
JavaScript Performance PatternsJavaScript Performance Patterns
JavaScript Performance PatternsStoyan Stefanov
 
Developing High Performance Web Apps - CodeMash 2011
Developing High Performance Web Apps - CodeMash 2011Developing High Performance Web Apps - CodeMash 2011
Developing High Performance Web Apps - CodeMash 2011Timothy Fisher
 
Advanced Web Technology.pptx
Advanced Web Technology.pptxAdvanced Web Technology.pptx
Advanced Web Technology.pptxssuser35fdf2
 
introduction to node.js
introduction to node.jsintroduction to node.js
introduction to node.jsorkaplan
 
BTV PHP - Building Fast Websites
BTV PHP - Building Fast WebsitesBTV PHP - Building Fast Websites
BTV PHP - Building Fast WebsitesJonathan Klein
 
Automating Complex Setups with Puppet
Automating Complex Setups with PuppetAutomating Complex Setups with Puppet
Automating Complex Setups with PuppetKris Buytaert
 
Profiling and Tuning a Web Application - The Dirty Details
Profiling and Tuning a Web Application - The Dirty DetailsProfiling and Tuning a Web Application - The Dirty Details
Profiling and Tuning a Web Application - The Dirty DetailsAchievers Tech
 
12-Step Program for Scaling Web Applications on PostgreSQL
12-Step Program for Scaling Web Applications on PostgreSQL12-Step Program for Scaling Web Applications on PostgreSQL
12-Step Program for Scaling Web Applications on PostgreSQLKonstantin Gredeskoul
 
Using MAMP for Web Development
Using MAMP for Web DevelopmentUsing MAMP for Web Development
Using MAMP for Web DevelopmentEric Greene
 
DrupalCamp LA 2014 - A Perfect Launch, Every Time
DrupalCamp LA 2014 - A Perfect Launch, Every TimeDrupalCamp LA 2014 - A Perfect Launch, Every Time
DrupalCamp LA 2014 - A Perfect Launch, Every TimeSuzanne Aldrich
 
PAC 2019 virtual Mark Tomlinson
PAC 2019 virtual Mark TomlinsonPAC 2019 virtual Mark Tomlinson
PAC 2019 virtual Mark TomlinsonNeotys
 

Similar to High Performance Drupal (20)

DrupalCampLA 2014 - Drupal backend performance and scalability
DrupalCampLA 2014 - Drupal backend performance and scalabilityDrupalCampLA 2014 - Drupal backend performance and scalability
DrupalCampLA 2014 - Drupal backend performance and scalability
 
Drupal performance
Drupal performanceDrupal performance
Drupal performance
 
Django dev-env-my-way
Django dev-env-my-wayDjango dev-env-my-way
Django dev-env-my-way
 
Continuous Integration with Open Source Tools - PHPUgFfm 2014-11-20
Continuous Integration with Open Source Tools - PHPUgFfm 2014-11-20Continuous Integration with Open Source Tools - PHPUgFfm 2014-11-20
Continuous Integration with Open Source Tools - PHPUgFfm 2014-11-20
 
Fundamentals of performance tuning PHP on IBM i
Fundamentals of performance tuning PHP on IBM i  Fundamentals of performance tuning PHP on IBM i
Fundamentals of performance tuning PHP on IBM i
 
SenchaCon 2016: Develop, Test & Deploy with Docker - Jonas Schwabe
SenchaCon 2016: Develop, Test & Deploy with Docker - Jonas Schwabe SenchaCon 2016: Develop, Test & Deploy with Docker - Jonas Schwabe
SenchaCon 2016: Develop, Test & Deploy with Docker - Jonas Schwabe
 
From Zero to Performance Hero in Minutes - Agile Testing Days 2014 Potsdam
From Zero to Performance Hero in Minutes - Agile Testing Days 2014 PotsdamFrom Zero to Performance Hero in Minutes - Agile Testing Days 2014 Potsdam
From Zero to Performance Hero in Minutes - Agile Testing Days 2014 Potsdam
 
JavaScript Performance Patterns
JavaScript Performance PatternsJavaScript Performance Patterns
JavaScript Performance Patterns
 
Developing High Performance Web Apps - CodeMash 2011
Developing High Performance Web Apps - CodeMash 2011Developing High Performance Web Apps - CodeMash 2011
Developing High Performance Web Apps - CodeMash 2011
 
Advanced Web Technology.pptx
Advanced Web Technology.pptxAdvanced Web Technology.pptx
Advanced Web Technology.pptx
 
introduction to node.js
introduction to node.jsintroduction to node.js
introduction to node.js
 
BTV PHP - Building Fast Websites
BTV PHP - Building Fast WebsitesBTV PHP - Building Fast Websites
BTV PHP - Building Fast Websites
 
Php go vrooom!
Php go vrooom!Php go vrooom!
Php go vrooom!
 
Automating Complex Setups with Puppet
Automating Complex Setups with PuppetAutomating Complex Setups with Puppet
Automating Complex Setups with Puppet
 
Profiling and Tuning a Web Application - The Dirty Details
Profiling and Tuning a Web Application - The Dirty DetailsProfiling and Tuning a Web Application - The Dirty Details
Profiling and Tuning a Web Application - The Dirty Details
 
12-Step Program for Scaling Web Applications on PostgreSQL
12-Step Program for Scaling Web Applications on PostgreSQL12-Step Program for Scaling Web Applications on PostgreSQL
12-Step Program for Scaling Web Applications on PostgreSQL
 
Using MAMP for Web Development
Using MAMP for Web DevelopmentUsing MAMP for Web Development
Using MAMP for Web Development
 
DrupalCamp LA 2014 - A Perfect Launch, Every Time
DrupalCamp LA 2014 - A Perfect Launch, Every TimeDrupalCamp LA 2014 - A Perfect Launch, Every Time
DrupalCamp LA 2014 - A Perfect Launch, Every Time
 
PAC 2019 virtual Mark Tomlinson
PAC 2019 virtual Mark TomlinsonPAC 2019 virtual Mark Tomlinson
PAC 2019 virtual Mark Tomlinson
 
Building JavaScript
Building JavaScriptBuilding JavaScript
Building JavaScript
 

More from Jeff Geerling

2020 Drupal Local Development Tools Survey - CMS Philly
2020 Drupal Local Development Tools Survey - CMS Philly2020 Drupal Local Development Tools Survey - CMS Philly
2020 Drupal Local Development Tools Survey - CMS PhillyJeff Geerling
 
There's a role for that! (AnsibleFest 2019)
There's a role for that! (AnsibleFest 2019)There's a role for that! (AnsibleFest 2019)
There's a role for that! (AnsibleFest 2019)Jeff Geerling
 
Everything I know about Kubernetes I learned from a Raspberry Pi cluster
Everything I know about Kubernetes I learned from a Raspberry Pi clusterEverything I know about Kubernetes I learned from a Raspberry Pi cluster
Everything I know about Kubernetes I learned from a Raspberry Pi clusterJeff Geerling
 
Real World DevOps - Jeff Geerling's NEDCamp 2018 Keynote
Real World DevOps - Jeff Geerling's NEDCamp 2018 KeynoteReal World DevOps - Jeff Geerling's NEDCamp 2018 Keynote
Real World DevOps - Jeff Geerling's NEDCamp 2018 KeynoteJeff Geerling
 
Make your Ansible playbooks maintainable, flexible, and scalable
Make your Ansible playbooks maintainable, flexible, and scalableMake your Ansible playbooks maintainable, flexible, and scalable
Make your Ansible playbooks maintainable, flexible, and scalableJeff Geerling
 
Ansible and Kubernetes
Ansible and KubernetesAnsible and Kubernetes
Ansible and KubernetesJeff Geerling
 
Local Dev on Virtual Machines - Vagrant, VirtualBox and Ansible
Local Dev on Virtual Machines - Vagrant, VirtualBox and AnsibleLocal Dev on Virtual Machines - Vagrant, VirtualBox and Ansible
Local Dev on Virtual Machines - Vagrant, VirtualBox and AnsibleJeff Geerling
 
Florissant TIF - Cross Keys Redevelopment
Florissant TIF - Cross Keys RedevelopmentFlorissant TIF - Cross Keys Redevelopment
Florissant TIF - Cross Keys RedevelopmentJeff Geerling
 
How to Build a Drupal Module
How to Build a Drupal ModuleHow to Build a Drupal Module
How to Build a Drupal ModuleJeff Geerling
 

More from Jeff Geerling (10)

2020 Drupal Local Development Tools Survey - CMS Philly
2020 Drupal Local Development Tools Survey - CMS Philly2020 Drupal Local Development Tools Survey - CMS Philly
2020 Drupal Local Development Tools Survey - CMS Philly
 
There's a role for that! (AnsibleFest 2019)
There's a role for that! (AnsibleFest 2019)There's a role for that! (AnsibleFest 2019)
There's a role for that! (AnsibleFest 2019)
 
Everything I know about Kubernetes I learned from a Raspberry Pi cluster
Everything I know about Kubernetes I learned from a Raspberry Pi clusterEverything I know about Kubernetes I learned from a Raspberry Pi cluster
Everything I know about Kubernetes I learned from a Raspberry Pi cluster
 
Real World DevOps - Jeff Geerling's NEDCamp 2018 Keynote
Real World DevOps - Jeff Geerling's NEDCamp 2018 KeynoteReal World DevOps - Jeff Geerling's NEDCamp 2018 Keynote
Real World DevOps - Jeff Geerling's NEDCamp 2018 Keynote
 
Make your Ansible playbooks maintainable, flexible, and scalable
Make your Ansible playbooks maintainable, flexible, and scalableMake your Ansible playbooks maintainable, flexible, and scalable
Make your Ansible playbooks maintainable, flexible, and scalable
 
Ansible and Kubernetes
Ansible and KubernetesAnsible and Kubernetes
Ansible and Kubernetes
 
HTTPS and Ansible
HTTPS and AnsibleHTTPS and Ansible
HTTPS and Ansible
 
Local Dev on Virtual Machines - Vagrant, VirtualBox and Ansible
Local Dev on Virtual Machines - Vagrant, VirtualBox and AnsibleLocal Dev on Virtual Machines - Vagrant, VirtualBox and Ansible
Local Dev on Virtual Machines - Vagrant, VirtualBox and Ansible
 
Florissant TIF - Cross Keys Redevelopment
Florissant TIF - Cross Keys RedevelopmentFlorissant TIF - Cross Keys Redevelopment
Florissant TIF - Cross Keys Redevelopment
 
How to Build a Drupal Module
How to Build a Drupal ModuleHow to Build a Drupal Module
How to Build a Drupal Module
 

Recently uploaded

What is Advanced Excel and what are some best practices for designing and cre...
What is Advanced Excel and what are some best practices for designing and cre...What is Advanced Excel and what are some best practices for designing and cre...
What is Advanced Excel and what are some best practices for designing and cre...Technogeeks
 
Unveiling the Future: Sylius 2.0 New Features
Unveiling the Future: Sylius 2.0 New FeaturesUnveiling the Future: Sylius 2.0 New Features
Unveiling the Future: Sylius 2.0 New FeaturesŁukasz Chruściel
 
Tech Tuesday - Mastering Time Management Unlock the Power of OnePlan's Timesh...
Tech Tuesday - Mastering Time Management Unlock the Power of OnePlan's Timesh...Tech Tuesday - Mastering Time Management Unlock the Power of OnePlan's Timesh...
Tech Tuesday - Mastering Time Management Unlock the Power of OnePlan's Timesh...OnePlan Solutions
 
CRM Contender Series: HubSpot vs. Salesforce
CRM Contender Series: HubSpot vs. SalesforceCRM Contender Series: HubSpot vs. Salesforce
CRM Contender Series: HubSpot vs. SalesforceBrainSell Technologies
 
Open Source Summit NA 2024: Open Source Cloud Costs - OpenCost's Impact on En...
Open Source Summit NA 2024: Open Source Cloud Costs - OpenCost's Impact on En...Open Source Summit NA 2024: Open Source Cloud Costs - OpenCost's Impact on En...
Open Source Summit NA 2024: Open Source Cloud Costs - OpenCost's Impact on En...Matt Ray
 
VK Business Profile - provides IT solutions and Web Development
VK Business Profile - provides IT solutions and Web DevelopmentVK Business Profile - provides IT solutions and Web Development
VK Business Profile - provides IT solutions and Web Developmentvyaparkranti
 
Simplifying Microservices & Apps - The art of effortless development - Meetup...
Simplifying Microservices & Apps - The art of effortless development - Meetup...Simplifying Microservices & Apps - The art of effortless development - Meetup...
Simplifying Microservices & Apps - The art of effortless development - Meetup...Rob Geurden
 
Comparing Linux OS Image Update Models - EOSS 2024.pdf
Comparing Linux OS Image Update Models - EOSS 2024.pdfComparing Linux OS Image Update Models - EOSS 2024.pdf
Comparing Linux OS Image Update Models - EOSS 2024.pdfDrew Moseley
 
SpotFlow: Tracking Method Calls and States at Runtime
SpotFlow: Tracking Method Calls and States at RuntimeSpotFlow: Tracking Method Calls and States at Runtime
SpotFlow: Tracking Method Calls and States at Runtimeandrehoraa
 
Powering Real-Time Decisions with Continuous Data Streams
Powering Real-Time Decisions with Continuous Data StreamsPowering Real-Time Decisions with Continuous Data Streams
Powering Real-Time Decisions with Continuous Data StreamsSafe Software
 
Machine Learning Software Engineering Patterns and Their Engineering
Machine Learning Software Engineering Patterns and Their EngineeringMachine Learning Software Engineering Patterns and Their Engineering
Machine Learning Software Engineering Patterns and Their EngineeringHironori Washizaki
 
Xen Safety Embedded OSS Summit April 2024 v4.pdf
Xen Safety Embedded OSS Summit April 2024 v4.pdfXen Safety Embedded OSS Summit April 2024 v4.pdf
Xen Safety Embedded OSS Summit April 2024 v4.pdfStefano Stabellini
 
Maximizing Efficiency and Profitability with OnePlan’s Professional Service A...
Maximizing Efficiency and Profitability with OnePlan’s Professional Service A...Maximizing Efficiency and Profitability with OnePlan’s Professional Service A...
Maximizing Efficiency and Profitability with OnePlan’s Professional Service A...OnePlan Solutions
 
Introduction Computer Science - Software Design.pdf
Introduction Computer Science - Software Design.pdfIntroduction Computer Science - Software Design.pdf
Introduction Computer Science - Software Design.pdfFerryKemperman
 
Balasore Best It Company|| Top 10 IT Company || Balasore Software company Odisha
Balasore Best It Company|| Top 10 IT Company || Balasore Software company OdishaBalasore Best It Company|| Top 10 IT Company || Balasore Software company Odisha
Balasore Best It Company|| Top 10 IT Company || Balasore Software company Odishasmiwainfosol
 
20240415 [Container Plumbing Days] Usernetes Gen2 - Kubernetes in Rootless Do...
20240415 [Container Plumbing Days] Usernetes Gen2 - Kubernetes in Rootless Do...20240415 [Container Plumbing Days] Usernetes Gen2 - Kubernetes in Rootless Do...
20240415 [Container Plumbing Days] Usernetes Gen2 - Kubernetes in Rootless Do...Akihiro Suda
 
MYjobs Presentation Django-based project
MYjobs Presentation Django-based projectMYjobs Presentation Django-based project
MYjobs Presentation Django-based projectAnoyGreter
 
Odoo 14 - eLearning Module In Odoo 14 Enterprise
Odoo 14 - eLearning Module In Odoo 14 EnterpriseOdoo 14 - eLearning Module In Odoo 14 Enterprise
Odoo 14 - eLearning Module In Odoo 14 Enterprisepreethippts
 

Recently uploaded (20)

Advantages of Odoo ERP 17 for Your Business
Advantages of Odoo ERP 17 for Your BusinessAdvantages of Odoo ERP 17 for Your Business
Advantages of Odoo ERP 17 for Your Business
 
What is Advanced Excel and what are some best practices for designing and cre...
What is Advanced Excel and what are some best practices for designing and cre...What is Advanced Excel and what are some best practices for designing and cre...
What is Advanced Excel and what are some best practices for designing and cre...
 
Unveiling the Future: Sylius 2.0 New Features
Unveiling the Future: Sylius 2.0 New FeaturesUnveiling the Future: Sylius 2.0 New Features
Unveiling the Future: Sylius 2.0 New Features
 
Tech Tuesday - Mastering Time Management Unlock the Power of OnePlan's Timesh...
Tech Tuesday - Mastering Time Management Unlock the Power of OnePlan's Timesh...Tech Tuesday - Mastering Time Management Unlock the Power of OnePlan's Timesh...
Tech Tuesday - Mastering Time Management Unlock the Power of OnePlan's Timesh...
 
CRM Contender Series: HubSpot vs. Salesforce
CRM Contender Series: HubSpot vs. SalesforceCRM Contender Series: HubSpot vs. Salesforce
CRM Contender Series: HubSpot vs. Salesforce
 
Open Source Summit NA 2024: Open Source Cloud Costs - OpenCost's Impact on En...
Open Source Summit NA 2024: Open Source Cloud Costs - OpenCost's Impact on En...Open Source Summit NA 2024: Open Source Cloud Costs - OpenCost's Impact on En...
Open Source Summit NA 2024: Open Source Cloud Costs - OpenCost's Impact on En...
 
VK Business Profile - provides IT solutions and Web Development
VK Business Profile - provides IT solutions and Web DevelopmentVK Business Profile - provides IT solutions and Web Development
VK Business Profile - provides IT solutions and Web Development
 
Simplifying Microservices & Apps - The art of effortless development - Meetup...
Simplifying Microservices & Apps - The art of effortless development - Meetup...Simplifying Microservices & Apps - The art of effortless development - Meetup...
Simplifying Microservices & Apps - The art of effortless development - Meetup...
 
Hot Sexy call girls in Patel Nagar🔝 9953056974 🔝 escort Service
Hot Sexy call girls in Patel Nagar🔝 9953056974 🔝 escort ServiceHot Sexy call girls in Patel Nagar🔝 9953056974 🔝 escort Service
Hot Sexy call girls in Patel Nagar🔝 9953056974 🔝 escort Service
 
Comparing Linux OS Image Update Models - EOSS 2024.pdf
Comparing Linux OS Image Update Models - EOSS 2024.pdfComparing Linux OS Image Update Models - EOSS 2024.pdf
Comparing Linux OS Image Update Models - EOSS 2024.pdf
 
SpotFlow: Tracking Method Calls and States at Runtime
SpotFlow: Tracking Method Calls and States at RuntimeSpotFlow: Tracking Method Calls and States at Runtime
SpotFlow: Tracking Method Calls and States at Runtime
 
Powering Real-Time Decisions with Continuous Data Streams
Powering Real-Time Decisions with Continuous Data StreamsPowering Real-Time Decisions with Continuous Data Streams
Powering Real-Time Decisions with Continuous Data Streams
 
Machine Learning Software Engineering Patterns and Their Engineering
Machine Learning Software Engineering Patterns and Their EngineeringMachine Learning Software Engineering Patterns and Their Engineering
Machine Learning Software Engineering Patterns and Their Engineering
 
Xen Safety Embedded OSS Summit April 2024 v4.pdf
Xen Safety Embedded OSS Summit April 2024 v4.pdfXen Safety Embedded OSS Summit April 2024 v4.pdf
Xen Safety Embedded OSS Summit April 2024 v4.pdf
 
Maximizing Efficiency and Profitability with OnePlan’s Professional Service A...
Maximizing Efficiency and Profitability with OnePlan’s Professional Service A...Maximizing Efficiency and Profitability with OnePlan’s Professional Service A...
Maximizing Efficiency and Profitability with OnePlan’s Professional Service A...
 
Introduction Computer Science - Software Design.pdf
Introduction Computer Science - Software Design.pdfIntroduction Computer Science - Software Design.pdf
Introduction Computer Science - Software Design.pdf
 
Balasore Best It Company|| Top 10 IT Company || Balasore Software company Odisha
Balasore Best It Company|| Top 10 IT Company || Balasore Software company OdishaBalasore Best It Company|| Top 10 IT Company || Balasore Software company Odisha
Balasore Best It Company|| Top 10 IT Company || Balasore Software company Odisha
 
20240415 [Container Plumbing Days] Usernetes Gen2 - Kubernetes in Rootless Do...
20240415 [Container Plumbing Days] Usernetes Gen2 - Kubernetes in Rootless Do...20240415 [Container Plumbing Days] Usernetes Gen2 - Kubernetes in Rootless Do...
20240415 [Container Plumbing Days] Usernetes Gen2 - Kubernetes in Rootless Do...
 
MYjobs Presentation Django-based project
MYjobs Presentation Django-based projectMYjobs Presentation Django-based project
MYjobs Presentation Django-based project
 
Odoo 14 - eLearning Module In Odoo 14 Enterprise
Odoo 14 - eLearning Module In Odoo 14 EnterpriseOdoo 14 - eLearning Module In Odoo 14 Enterprise
Odoo 14 - eLearning Module In Odoo 14 Enterprise
 

High Performance Drupal

  • 1. High Performance Drupal Jeff Geerling Technical Architect, Acqia
  • 2. geerlingguy • Hosted Apache Solr • Server Check.in • Ansible for DevOps • Technical Architect
  • 5. "It's actually hard to intentionally make Drupal slow." - Me, when creating this presentation
  • 6. Agenda 1. Process for performance improvement 2. Easy Wins for Drupal performance 3. Live site performance improvement demo
  • 7. Process • Have a plan: • "Front page should load in < 2 seconds for anonymous users." • "Time to first byte should be < 500ms for anonymous users."
  • 8. Process • Have a plan: • "Front page should load in < 2 seconds for anonymous users." • "Time to first byte should be < 500ms for anonymous users."
  • 9. Process • Run benchmarks: • TTFB, Full page load, DOM complete, etc.
  • 15. Useful Tools • Chrome Developer Tools • Devel, drush • XHProf (and sometimes XDebug) • WebPagetest.org • GTmetrix • Pingdom Website Speed Test • ab / wrk / jmeter
  • 16. Focus on ROI Focus on fixes that produce order-of-magnitude gains first!
  • 17. Easy Wins - Drupal • General • KISS: Remove modules, simplify layouts... be ruthless! • Use Boost (if no Varnish/Nginx static cache) • Disable dblog module
  • 18. Easy Wins - Drupal • Caching • Enable anonymous page cache (default in D8) • Views: use views caching (+ Views cache bully... but not needed in D8!), use Litepager • Use panels, block, entity caching • Watch for cache-breaking elements (e.g. login block + Honeypot, etc.)
  • 19. Easy Wins - Drupal • On the edge of 'easy' • Use drupal_fast_404() + Fast 404 • Avoid redirects inside Drupal (convenience tradeoff) • Use drush for cron, use Elysia Cron
  • 20. Easy Wins - Backend • Apache / Nginx • "Use PHP-FPM instead of Apache mod_php" • Not really this simple; more about smart resource allocation • More CPU cores, more RAM
  • 21. Easy Wins - Backend • PHP • Run version 5.5+ • Make sure OpCache can hold all your code
 (opcache_get_status()) • MySQL • innodb_buffer_size - database in RAM • slow_query_log - watch it!
  • 22. Easy Wins - Front End • Optimize images (smaller sizes w/ styles, fewer images per page, lazy loading) • Enable CSS/JS Aggregation, consider advagg • Use CloudFlare or another CDN • YSlow/PageSpeed - Fix easy configuration changes (expires, etags, etc.) • Remove external / social widgets and embeds
  • 23. Easy Wins - Front End • External service integrations are often the #1 or #2 performance burden for front-end page load times. • Social widgets • Embedded media • Ads, tracking • iframe content
  • 24. Let's Do This Thing! 1. Plan 2. Benchmark 3. Adjust 4. Benchmark again
  • 25. 1. Plan • Home page should load in <1s for anonymous users over a local network connection • Home page should load in <2s for authenticated users over a local network connection • Assumptions: • Site has mostly anonymous traffic • Site serves a single geographical region, mostly desktop users
  • 26. 1. Plan • Home page should load in <1s for anonymous users over a local network connection • Home page should load in <2s for authenticated users over a local network connection • Assumptions: • Site has mostly anonymous traffic • Site serves a single geographical region, mostly desktop users Important!
  • 28. 2. Benchmark Chrome Dev Tools: • View > Developer >
 Developer Tools • Option + ⌘ + I (Mac) • Ctrl + Shift + C (Win/Linux) Network tab DOMContentLoaded Load (total time)
  • 29. 2. Benchmark $ time drush @alias php-eval ' $path="front"; menu_set_active_item($path); menu_execute_active_handler($path, TRUE);' > /dev/null $ wrk -t2 -c4 -d30s http://www.example.com/ $ ab -n 50 -c 2 http://www.example.com/ Test PHP/Drupal alone: Test Backend alone:
  • 30. 2. Benchmark Benchmark Before After DOMContentLoaded ~1.6s ? Load (Full) ~4.0s ? drush (backend) ~2.0s ? wrk (load test) ~1.75 req/s ?
  • 31. 3. Adjust Symptom Indication Large BE/FE Δ Slow-loading FE resources Long TTFB* (> 1s) Backend response slow ~2 req/s capacity Site will scale... poorly *TTFB = Time To First Byte
  • 32. 3. Adjust • Add Caching • Beware lipstick on a pig! • Caches should make what's good, better • Stop the bleeding first • Easy Wins, then harder things like slow queries and code fixes
  • 33. 4. Benchmark again Benchmark Before After DOMContentLoaded ~1.6s ~0.2s Load (Full) ~4.0s ~0.2s drush (backend) ~2.0s ~0.8s wrk (load test) ~1.75 req/s ~437 req/s
  • 35. 4. Benchmark again Benchmark Before After + VARNISH DOMContentLoaded ~1.6s ~0.1s Load (Full) ~4.0s ~0.1s drush (backend) ~2.0s ~ wrk (load test) ~1.75 req/s ~4,000 req/s
  • 36. Other Considerations • Monitoring: • Uptime (Pingdom, Server Check.in, etc.) • Performance (AppNeta, NewRelic) • Resource usage (Munin, Cacti, Icinga) • Infrastructure - HA, Scalability • UX and performance
  • 37. Other Resources • High Performance Drupal (O'Reilly) • Drupal VM (optimized LAMP stack) • Ansible for DevOps (infrastructure focus)