SlideShare a Scribd company logo
1 of 36
Download to read offline
High Performance Drupal
     Making Your Site Fast Fast Fast
Drupal Is Powerful
Drupal is Slow
Databases are Slow
PHP Is Slow
Consumer-Grade Networks Are
           Slow
Increasing Speed Means Diving
  Less Deeply Into The Stack
Fast Is Making Fewer Requests
     From Faster Sources
The Life Of A Pageload

•   Browser Request

•   Browser Cache?

•   Network Request

•   Server Response

•   Associated Assets (back to top)
Optimizing For The Browser

•   Make Your HTML/CSS Images Efficient

•   Use CSS/JS Aggregation

•   Use a CDN

•   Yslow is good for profiling this
Optimizing Server Response


•   Reverse Proxy/Drupal Page Cache

•   PHP OpCode Cache

•   Drupal System Cache
Reverse-Proxies Are Very Fast
Faster Than Apache
Much Faster Than Drupal
Don’t Bother Your Power Tools
      With Simple Tasks
Implementing Varnish

•   Use Pressflow

•   Implement A Simple VCL Based On Sessions

•   Enable Aggressive Caching

•   Enjoy, Experiment, Excel
OpCode Caching Keeps Drupal
    Loaded In Memory
Don’t Touch The Disk
Don’t Load Up Apache Threads
   With Copies of Drupal
Implementing APC

•   The Biggest/Cheapest Win

•   Install via apt-get, yum, or pecl

•   Monitor with apc.php

•   Lots of modules? Bump the SHM size

•   Enable apc.stat=0 with caution
Drupal Freezes It’s Code Before
            Launch
Most Real-World Scaling
Information Comes After Release
Drupal Supports A Crazy Array Of
           Use Cases
$5/month Shared Hosting Is Not
      High Performance
Pressflow
•   “Pressflow Makes Drupal Scale”

•   Drop-in Replacement For Core

•   Backports many Drupal 7 features

•   PHP 5.x/MySQL 5.x Required

•   Enables robust reverse-proxy, mysql replication and more

•   Runs drupal.org and many other high-performance sites
Drupal Has A Cache And That Is
            Good
But... Drupal’s Cache Is In The
           Database
And Serialized.
That Works Anywhere, But Is Both
      Slow and Expensive
CacheRouter

•   Use settings.php to plug in cacherouter instead of /includes/cache.inc

•   Pick your poison: APC, XCache, Memcached, Filesystem, or classic db
    caching.

•   Change caches per table.

•   Vital for high-speed logged-in pageloads.
Coming Soon: Advcache

•   Cache Nodes, Users, Taxonomy Terms and other common objects via
    cacherouter.

•   Extends the notion of drupal’s static cache to whole objects.

•   Still in development, but if you’re into writing patches...
Other Tips

•   Search is among the slowest and most expensive queries. Use Solr
    instead.

•   InnoDB can help with locking in MySQL

•   Hardware is faster and often more cost effective than code cleanup.

•   Monitor load and scale ahead of problems.
Benchmarking/Profiling


•   Cachegrind to profile code.

•   Jmeter to simulate load.

•   Slow Query logs, cactai, etc.
Vertical/Horizntal Scaling

•   Start with all services you need.

•   Separate services into layers.

•   Add more servers at each layer as needed.

•   Shameless plug: Project Mercury: http://getpantheon.com
More Resources

•   http://groups.drupal.org/high-performance

•   http://pressflow.org

•   http://tag1consulting.com

•   http://2bits.com

•   http://getpantheon.com

More Related Content

What's hot

Drupal caching
Drupal cachingDrupal caching
Drupal caching
Exove
 
Drupalcamp Estonia - High Performance Sites
Drupalcamp Estonia - High Performance SitesDrupalcamp Estonia - High Performance Sites
Drupalcamp Estonia - High Performance Sites
drupalcampest
 
Website performance optimization QA
Website performance optimization QAWebsite performance optimization QA
Website performance optimization QA
Denis Dudaev
 

What's hot (17)

Web performance Talk
Web performance TalkWeb performance Talk
Web performance Talk
 
Drupal performance
Drupal performanceDrupal performance
Drupal performance
 
WordPress Hosting Best Practices - Do's and Don't s | WordPress Trivandrum
WordPress Hosting Best Practices - Do's and Don't s  | WordPress TrivandrumWordPress Hosting Best Practices - Do's and Don't s  | WordPress Trivandrum
WordPress Hosting Best Practices - Do's and Don't s | WordPress Trivandrum
 
Drupal caching
Drupal cachingDrupal caching
Drupal caching
 
RESTful Web services in Drupal 8
RESTful Web services in Drupal 8RESTful Web services in Drupal 8
RESTful Web services in Drupal 8
 
World Wide Web Caching
World Wide Web CachingWorld Wide Web Caching
World Wide Web Caching
 
Артем Сильчук - Respond in 60ms. Extremal optimization with reinventing a wheel
Артем Сильчук - Respond in 60ms. Extremal optimization with reinventing a wheelАртем Сильчук - Respond in 60ms. Extremal optimization with reinventing a wheel
Артем Сильчук - Respond in 60ms. Extremal optimization with reinventing a wheel
 
Understanding Web Cache
Understanding Web CacheUnderstanding Web Cache
Understanding Web Cache
 
Skalowalna architektura na przykładzie soccerway.com
Skalowalna architektura na przykładzie soccerway.comSkalowalna architektura na przykładzie soccerway.com
Skalowalna architektura na przykładzie soccerway.com
 
WordCamp RVA
WordCamp RVAWordCamp RVA
WordCamp RVA
 
Configuring Apache Servers for Better Web Perormance
Configuring Apache Servers for Better Web PerormanceConfiguring Apache Servers for Better Web Perormance
Configuring Apache Servers for Better Web Perormance
 
23 Ways To Speed Up WordPress
23 Ways To Speed Up WordPress23 Ways To Speed Up WordPress
23 Ways To Speed Up WordPress
 
Optimize drupal
Optimize drupalOptimize drupal
Optimize drupal
 
Drupalcamp Estonia - High Performance Sites
Drupalcamp Estonia - High Performance SitesDrupalcamp Estonia - High Performance Sites
Drupalcamp Estonia - High Performance Sites
 
Web Optimization Level: Paranoid
Web Optimization Level: ParanoidWeb Optimization Level: Paranoid
Web Optimization Level: Paranoid
 
Website performance optimization QA
Website performance optimization QAWebsite performance optimization QA
Website performance optimization QA
 
Caching Strategies
Caching StrategiesCaching Strategies
Caching Strategies
 

Viewers also liked

Drupal High Availability High Performance 2012
Drupal High Availability High Performance 2012Drupal High Availability High Performance 2012
Drupal High Availability High Performance 2012
Amazee Labs
 
опыт использования схемы Drupal+varnish+nginx руслан исай
опыт использования схемы Drupal+varnish+nginx руслан исайопыт использования схемы Drupal+varnish+nginx руслан исай
опыт использования схемы Drupal+varnish+nginx руслан исай
drupalconf
 

Viewers also liked (15)

High Performance on Drupal 7
High Performance on Drupal 7High Performance on Drupal 7
High Performance on Drupal 7
 
Drupal High Availability High Performance 2012
Drupal High Availability High Performance 2012Drupal High Availability High Performance 2012
Drupal High Availability High Performance 2012
 
How we build a startup with Drupal
How we build a startup with DrupalHow we build a startup with Drupal
How we build a startup with Drupal
 
Scaling Microsites for the Enterprise with Drupal Gardens
Scaling Microsites for the Enterprise with Drupal GardensScaling Microsites for the Enterprise with Drupal Gardens
Scaling Microsites for the Enterprise with Drupal Gardens
 
Information Architecture for Drupal
Information Architecture for DrupalInformation Architecture for Drupal
Information Architecture for Drupal
 
Turbinando Drupal com Redis
Turbinando Drupal com RedisTurbinando Drupal com Redis
Turbinando Drupal com Redis
 
Drupal In The Cloud
Drupal In The CloudDrupal In The Cloud
Drupal In The Cloud
 
Building enterprise high availability application with drupal
Building enterprise high availability application with drupalBuilding enterprise high availability application with drupal
Building enterprise high availability application with drupal
 
Highly available Drupal on a Raspberry Pi cluster
Highly available Drupal on a Raspberry Pi clusterHighly available Drupal on a Raspberry Pi cluster
Highly available Drupal on a Raspberry Pi cluster
 
Enterprise Drupal Application & Hosting Infrastructure Level Monitoring
Enterprise Drupal Application & Hosting Infrastructure Level MonitoringEnterprise Drupal Application & Hosting Infrastructure Level Monitoring
Enterprise Drupal Application & Hosting Infrastructure Level Monitoring
 
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 + Drupal: A Fortuitous DevOps Match
Ansible + Drupal: A Fortuitous DevOps MatchAnsible + Drupal: A Fortuitous DevOps Match
Ansible + Drupal: A Fortuitous DevOps Match
 
Amazon Web Services Building Blocks for Drupal Applications and Hosting
Amazon Web Services Building Blocks for Drupal Applications and HostingAmazon Web Services Building Blocks for Drupal Applications and Hosting
Amazon Web Services Building Blocks for Drupal Applications and Hosting
 
опыт использования схемы Drupal+varnish+nginx руслан исай
опыт использования схемы Drupal+varnish+nginx руслан исайопыт использования схемы Drupal+varnish+nginx руслан исай
опыт использования схемы Drupal+varnish+nginx руслан исай
 
Growth Hacking
Growth HackingGrowth Hacking
Growth Hacking
 

Similar to High Performance Drupal

Performance_Out.pptx
Performance_Out.pptxPerformance_Out.pptx
Performance_Out.pptx
sanjanabal
 
Performance out
Performance outPerformance out
Performance out
Jack Huang
 
Performance out
Performance outPerformance out
Performance out
Jack Huang
 
Performance out
Performance outPerformance out
Performance out
Jack Huang
 
Performance out
Performance outPerformance out
Performance out
Jack Huang
 

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
 
Pure Speed Drupal 4 Gov talk
Pure Speed Drupal 4 Gov talkPure Speed Drupal 4 Gov talk
Pure Speed Drupal 4 Gov talk
 
Midwest PHP - Scaling Magento
Midwest PHP - Scaling MagentoMidwest PHP - Scaling Magento
Midwest PHP - Scaling Magento
 
Performance out
Performance outPerformance out
Performance out
 
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
 
DrupalSouth 2015 - Performance: Not an Afterthought
DrupalSouth 2015 - Performance: Not an AfterthoughtDrupalSouth 2015 - Performance: Not an Afterthought
DrupalSouth 2015 - Performance: Not an Afterthought
 
Caching strategies with lucee
Caching strategies with luceeCaching strategies with lucee
Caching strategies with lucee
 
Performance_Out.pptx
Performance_Out.pptxPerformance_Out.pptx
Performance_Out.pptx
 
2 7
2 72 7
2 7
 
title
titletitle
title
 
Performance out
Performance outPerformance out
Performance out
 
Performance out
Performance outPerformance out
Performance out
 
Performance out
Performance outPerformance out
Performance out
 
Performance out
Performance outPerformance out
Performance out
 
Performance out
Performance outPerformance out
Performance out
 
Performance out
Performance outPerformance out
Performance out
 
Performance out
Performance outPerformance out
Performance out
 
Performance out
Performance outPerformance out
Performance out
 
Performance out
Performance outPerformance out
Performance out
 
Speeding Up The Snail
Speeding Up The SnailSpeeding Up The Snail
Speeding Up The Snail
 

More from Chapter Three (6)

Drupal as a winning Web Platform
Drupal as a winning Web PlatformDrupal as a winning Web Platform
Drupal as a winning Web Platform
 
Pantheon @ Drupal Down Under
Pantheon @ Drupal Down UnderPantheon @ Drupal Down Under
Pantheon @ Drupal Down Under
 
Enterprise Drupal
Enterprise DrupalEnterprise Drupal
Enterprise Drupal
 
A Match Made In The Cloud
A Match Made In The CloudA Match Made In The Cloud
A Match Made In The Cloud
 
Panels 3.0: The Powers Of Chaos Magic
Panels 3.0: The Powers Of Chaos MagicPanels 3.0: The Powers Of Chaos Magic
Panels 3.0: The Powers Of Chaos Magic
 
Drupal In The Cloud
Drupal In The CloudDrupal In The Cloud
Drupal In The Cloud
 

Recently uploaded

Structuring Teams and Portfolios for Success
Structuring Teams and Portfolios for SuccessStructuring Teams and Portfolios for Success
Structuring Teams and Portfolios for Success
UXDXConf
 

Recently uploaded (20)

AI revolution and Salesforce, Jiří Karpíšek
AI revolution and Salesforce, Jiří KarpíšekAI revolution and Salesforce, Jiří Karpíšek
AI revolution and Salesforce, Jiří Karpíšek
 
Integrating Telephony Systems with Salesforce: Insights and Considerations, B...
Integrating Telephony Systems with Salesforce: Insights and Considerations, B...Integrating Telephony Systems with Salesforce: Insights and Considerations, B...
Integrating Telephony Systems with Salesforce: Insights and Considerations, B...
 
A Business-Centric Approach to Design System Strategy
A Business-Centric Approach to Design System StrategyA Business-Centric Approach to Design System Strategy
A Business-Centric Approach to Design System Strategy
 
Simplified FDO Manufacturing Flow with TPMs _ Liam at Infineon.pdf
Simplified FDO Manufacturing Flow with TPMs _ Liam at Infineon.pdfSimplified FDO Manufacturing Flow with TPMs _ Liam at Infineon.pdf
Simplified FDO Manufacturing Flow with TPMs _ Liam at Infineon.pdf
 
Structuring Teams and Portfolios for Success
Structuring Teams and Portfolios for SuccessStructuring Teams and Portfolios for Success
Structuring Teams and Portfolios for Success
 
Custom Approval Process: A New Perspective, Pavel Hrbacek & Anindya Halder
Custom Approval Process: A New Perspective, Pavel Hrbacek & Anindya HalderCustom Approval Process: A New Perspective, Pavel Hrbacek & Anindya Halder
Custom Approval Process: A New Perspective, Pavel Hrbacek & Anindya Halder
 
Top 10 Symfony Development Companies 2024
Top 10 Symfony Development Companies 2024Top 10 Symfony Development Companies 2024
Top 10 Symfony Development Companies 2024
 
Powerful Start- the Key to Project Success, Barbara Laskowska
Powerful Start- the Key to Project Success, Barbara LaskowskaPowerful Start- the Key to Project Success, Barbara Laskowska
Powerful Start- the Key to Project Success, Barbara Laskowska
 
The UX of Automation by AJ King, Senior UX Researcher, Ocado
The UX of Automation by AJ King, Senior UX Researcher, OcadoThe UX of Automation by AJ King, Senior UX Researcher, Ocado
The UX of Automation by AJ King, Senior UX Researcher, Ocado
 
Secure Zero Touch enabled Edge compute with Dell NativeEdge via FDO _ Brad at...
Secure Zero Touch enabled Edge compute with Dell NativeEdge via FDO _ Brad at...Secure Zero Touch enabled Edge compute with Dell NativeEdge via FDO _ Brad at...
Secure Zero Touch enabled Edge compute with Dell NativeEdge via FDO _ Brad at...
 
Enterprise Knowledge Graphs - Data Summit 2024
Enterprise Knowledge Graphs - Data Summit 2024Enterprise Knowledge Graphs - Data Summit 2024
Enterprise Knowledge Graphs - Data Summit 2024
 
Behind the Scenes From the Manager's Chair: Decoding the Secrets of Successfu...
Behind the Scenes From the Manager's Chair: Decoding the Secrets of Successfu...Behind the Scenes From the Manager's Chair: Decoding the Secrets of Successfu...
Behind the Scenes From the Manager's Chair: Decoding the Secrets of Successfu...
 
TEST BANK For, Information Technology Project Management 9th Edition Kathy Sc...
TEST BANK For, Information Technology Project Management 9th Edition Kathy Sc...TEST BANK For, Information Technology Project Management 9th Edition Kathy Sc...
TEST BANK For, Information Technology Project Management 9th Edition Kathy Sc...
 
Speed Wins: From Kafka to APIs in Minutes
Speed Wins: From Kafka to APIs in MinutesSpeed Wins: From Kafka to APIs in Minutes
Speed Wins: From Kafka to APIs in Minutes
 
Linux Foundation Edge _ Overview of FDO Software Components _ Randy at Intel.pdf
Linux Foundation Edge _ Overview of FDO Software Components _ Randy at Intel.pdfLinux Foundation Edge _ Overview of FDO Software Components _ Randy at Intel.pdf
Linux Foundation Edge _ Overview of FDO Software Components _ Randy at Intel.pdf
 
Connecting the Dots in Product Design at KAYAK
Connecting the Dots in Product Design at KAYAKConnecting the Dots in Product Design at KAYAK
Connecting the Dots in Product Design at KAYAK
 
How we scaled to 80K users by doing nothing!.pdf
How we scaled to 80K users by doing nothing!.pdfHow we scaled to 80K users by doing nothing!.pdf
How we scaled to 80K users by doing nothing!.pdf
 
IESVE for Early Stage Design and Planning
IESVE for Early Stage Design and PlanningIESVE for Early Stage Design and Planning
IESVE for Early Stage Design and Planning
 
Demystifying gRPC in .Net by John Staveley
Demystifying gRPC in .Net by John StaveleyDemystifying gRPC in .Net by John Staveley
Demystifying gRPC in .Net by John Staveley
 
Introduction to FDO and How It works Applications _ Richard at FIDO Alliance.pdf
Introduction to FDO and How It works Applications _ Richard at FIDO Alliance.pdfIntroduction to FDO and How It works Applications _ Richard at FIDO Alliance.pdf
Introduction to FDO and How It works Applications _ Richard at FIDO Alliance.pdf
 

High Performance Drupal