SlideShare une entreprise Scribd logo
1  sur  36
Télécharger pour lire hors ligne
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

Contenu connexe

Tendances

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
 

Tendances (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
 

En vedette

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
 

En vedette (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
 

Similaire à 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
 

Similaire à 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
 
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
 
title
titletitle
title
 
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
 

Plus de 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
 

Dernier

Finding Java's Hidden Performance Traps @ DevoxxUK 2024
Finding Java's Hidden Performance Traps @ DevoxxUK 2024Finding Java's Hidden Performance Traps @ DevoxxUK 2024
Finding Java's Hidden Performance Traps @ DevoxxUK 2024
Victor Rentea
 
Architecting Cloud Native Applications
Architecting Cloud Native ApplicationsArchitecting Cloud Native Applications
Architecting Cloud Native Applications
WSO2
 

Dernier (20)

Six Myths about Ontologies: The Basics of Formal Ontology
Six Myths about Ontologies: The Basics of Formal OntologySix Myths about Ontologies: The Basics of Formal Ontology
Six Myths about Ontologies: The Basics of Formal Ontology
 
MINDCTI Revenue Release Quarter One 2024
MINDCTI Revenue Release Quarter One 2024MINDCTI Revenue Release Quarter One 2024
MINDCTI Revenue Release Quarter One 2024
 
Understanding the FAA Part 107 License ..
Understanding the FAA Part 107 License ..Understanding the FAA Part 107 License ..
Understanding the FAA Part 107 License ..
 
"I see eyes in my soup": How Delivery Hero implemented the safety system for ...
"I see eyes in my soup": How Delivery Hero implemented the safety system for ..."I see eyes in my soup": How Delivery Hero implemented the safety system for ...
"I see eyes in my soup": How Delivery Hero implemented the safety system for ...
 
Biography Of Angeliki Cooney | Senior Vice President Life Sciences | Albany, ...
Biography Of Angeliki Cooney | Senior Vice President Life Sciences | Albany, ...Biography Of Angeliki Cooney | Senior Vice President Life Sciences | Albany, ...
Biography Of Angeliki Cooney | Senior Vice President Life Sciences | Albany, ...
 
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot TakeoffStrategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
 
Finding Java's Hidden Performance Traps @ DevoxxUK 2024
Finding Java's Hidden Performance Traps @ DevoxxUK 2024Finding Java's Hidden Performance Traps @ DevoxxUK 2024
Finding Java's Hidden Performance Traps @ DevoxxUK 2024
 
Boost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfBoost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdf
 
[BuildWithAI] Introduction to Gemini.pdf
[BuildWithAI] Introduction to Gemini.pdf[BuildWithAI] Introduction to Gemini.pdf
[BuildWithAI] Introduction to Gemini.pdf
 
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemkeProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
 
MS Copilot expands with MS Graph connectors
MS Copilot expands with MS Graph connectorsMS Copilot expands with MS Graph connectors
MS Copilot expands with MS Graph connectors
 
DBX First Quarter 2024 Investor Presentation
DBX First Quarter 2024 Investor PresentationDBX First Quarter 2024 Investor Presentation
DBX First Quarter 2024 Investor Presentation
 
DEV meet-up UiPath Document Understanding May 7 2024 Amsterdam
DEV meet-up UiPath Document Understanding May 7 2024 AmsterdamDEV meet-up UiPath Document Understanding May 7 2024 Amsterdam
DEV meet-up UiPath Document Understanding May 7 2024 Amsterdam
 
Navigating the Deluge_ Dubai Floods and the Resilience of Dubai International...
Navigating the Deluge_ Dubai Floods and the Resilience of Dubai International...Navigating the Deluge_ Dubai Floods and the Resilience of Dubai International...
Navigating the Deluge_ Dubai Floods and the Resilience of Dubai International...
 
Strategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a FresherStrategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a Fresher
 
Rising Above_ Dubai Floods and the Fortitude of Dubai International Airport.pdf
Rising Above_ Dubai Floods and the Fortitude of Dubai International Airport.pdfRising Above_ Dubai Floods and the Fortitude of Dubai International Airport.pdf
Rising Above_ Dubai Floods and the Fortitude of Dubai International Airport.pdf
 
Mcleodganj Call Girls 🥰 8617370543 Service Offer VIP Hot Model
Mcleodganj Call Girls 🥰 8617370543 Service Offer VIP Hot ModelMcleodganj Call Girls 🥰 8617370543 Service Offer VIP Hot Model
Mcleodganj Call Girls 🥰 8617370543 Service Offer VIP Hot Model
 
Artificial Intelligence Chap.5 : Uncertainty
Artificial Intelligence Chap.5 : UncertaintyArtificial Intelligence Chap.5 : Uncertainty
Artificial Intelligence Chap.5 : Uncertainty
 
Architecting Cloud Native Applications
Architecting Cloud Native ApplicationsArchitecting Cloud Native Applications
Architecting Cloud Native Applications
 
Platformless Horizons for Digital Adaptability
Platformless Horizons for Digital AdaptabilityPlatformless Horizons for Digital Adaptability
Platformless Horizons for Digital Adaptability
 

High Performance Drupal