SlideShare a Scribd company logo
1 of 52
Drupal Performance and Optimization
By: Shafqat Hussain
http://speedup.co.id/
Basics of Web App Systems Architecture
• General Web Software Optimization
Strategies
• Defining a Goal for Performance
• Performance Metrics, tools
• Performance Debugging Techniques
• What Can You Control?
• What Is Caching?
• Optimizing Drupal
Overview
Me:
Shafqat Hussain
shafqat.1982@gmail.com
Why
.
.
http://goinswriter.com/frustrated-writer/
● According to surveys, nearly half of web users expect a site to load in
2 seconds or less, and they tend to abandon a site that isn’t loaded
within 3 seconds. 79% of web shoppers who have trouble with web
site performance say they won’t return to the site to buy again and
around 44% of them would tell a friend if they had a poor experience
shopping online.
● If an e-commerce site is making $100,000 per day, a 1 second page
delay could potentially cost you $2.5 million in lost sales every year
Facts and stats
Google Search ranking
Default Drupal
Large Drupal website without Performance
optimization
Our Mission
Planning
Web Architecture LAMP
● Move operations from devices with slower
access to devices with faster access
● Reduce disk I/O
● Reduce bandwidth
● Use memory more efficiently
● Increase parallelism
● Reducing CPU
● Keep Drupal and modules up to date.
● Keep monitoring
● Use of Ajax
General Strategies
● Performance optimization can become an
endless task without a goal
● What is your goal?
● – Page load time (4 seconds for blogs)
● – Requests/sec
● – Response time
● Performance metrics come first!
Defining a Goal
page loading …..
● Google Analytics Site Speed
● Yslow
● Page speed extension chrome/Firefox
● Chrome Developer tools
● Devel Module
● www.webpagetest.org
Tools
● Initial page load vs. loading assets
● What is Waiting?
Chrome Developer tools
Live Demo
Devel module demo
● Shared Hosting vs. VPS or Dedicated Server
● Shared server allows no:
● – Apache configuration
● – MySQL configuration
● – Memcached/APC for utilizing local memory
● – Consistent resources
● Despite these limitations, you still have a lot of
options even if on Shared Hosting
What Can you Control?
● Saving the results of computation to reuse at a later
date which saves time
● • Moving from slow disks to local memory
● • Reduce number of database queries
● • Reduce number of files to serve
● • Both server-side caching, and client-side caching
● • Disadvantages: stale data, duplication of data
What is Caching?
● Tuning strategies presented in the typical
priority that you should look at them.
● – Biggest improvement at lowest cost
(time or money)
● – First Shared Hosting
● – Then VPS/Dedicated Server-only
Drupal Performance Priority
● Output of many database queries that are
rendered into HTML to create an entire
page are saved as an entire object in
cache.
● Only works for Anonymous users
Page Caching
● Parallelism is limited by web browser and
web server.
● Reducing number and size of files
improves performance
Aggregate and Compress
CSS Files
● Parallelism is limited by web browser and web
server.
● Reducing number of files improves performance
● Compression has to be done outside of Drupal,
recommend YUI Compressor or Google Closure
compiler
Aggregate/Compress
Javascript Files
● To address performance for Authenticated
Users, look at enabling Views caching
● Set the time lengths for fine tuning your
caching strategy
● Views Content Cache (event based)
● Found under Advanced section when
Editing a View OR Demo
Turn Views Caching On
● Another way to address performance for
Authenticated Users
● Modules can define whether blocks can
be cached by user, by role
Turn Block Caching On
● Reduces the chain of hooks that need to be followed
● This further reduces database queries, CSS and
Javascript files
● Can you do it another way with core Drupal/ existing
module or small code snippet in template.php?
Disable Modules Not Used
● Moving static files (images, videos, CSS,
Javascript) to another server
● Reduces disk I/O and requests handled
by web server
● Increases parallelism due to client-side
limit
Move Static Files to a CDN
● Within your own modules, you can create
your own database cache tables
● Allows you to control what is cached and
how long it is kept
● Separate UI files in modules
● Disable modules UI parts in live sites.
● Link: Beginner’s Guide to Caching Data in
Drupal 7
Caching in Your Own Modules
● Just like CSS and Javascript aggregation,
● always good idea to reduce number and
sizes of images
● • Compression
● • Repeating backgrounds
● • CSS Image Sprites
Reduce Image Sizes and Number of
Images
VPS/DEDICATED SERVER-ONLY
PERFORMANCE OPTIMIZATIONS
● Determines how many requests you can handle in
parallel
● How to know:
MaxClients = Total RAM dedicated to the web server /
Max child process size
● HTTP keep-alive Timeout (also known as persistent
connections) is keeping the TCP socket open so that
another request can be made without setting up a
new connection.
Apache
● Great for saving small queries run on database
tables that never or rarely change
● • Doesn’t eliminate, just comes out of memory
● • Even just 8MB or 16MB of memory will do wonders
● • Link: http://dev.mysql.com/doc/refman/5.
1/en/query-cache.html
● MySQL Tuning https://drupal.org/node/51263
Enable MySQL Query Caching
Memcached Server for Caching
● An in-memory cache used to move
requests from disks to memory
● • Drupal cache tables run from
Memcached instead of cache database
table.
● https://drupal.org/project/memcache
● http://andrewdunkle.com/2012/how-to-
install-memcached-for-drupal-7.html
Varnish
Boost
Installation demo
https://drupal.org/node/1459690
http://beauteimparfaite.com/soyez-curieux/
● Search is resource intensive
● Consider Solr
● Google Custom search
Pressflow
● Instead of PHP being interpreted every
time, stores intermediate code (opcodes)
in memory
● Each site can take up 16M or more
Enable APC
Note: It is possible to destroy your
site by configuring incorrectly. Be
careful and back up configurations
before making changes. especially for
MySQL, Apache
● Boost
● Memcached
● Varnish
● Block Cache
● AuthCache
● CacheRouter
● Fast 404
● Entity Cache
Modules
● Database logging
● Statistics(consider Google Analytics)
● PHP filter
● Update Manager
Note: disable devel, UI modules
Bad Modules
● eg: ‘Add to cart’ change
● You might be able solve with views, or
other existing modules.
● Javascript/Jquery for small text changes.
Do you really need
module for that.
● Cache tags(to delete only related cache)
● P15N(Handling dynamic stuff for
anonymous, eg: last visited time).
Drupal 8
Spend Some $
● Separate MySQL server from Web Server
● Increase RAM
● Load Balance two web servers
● Buy a separate Memcached server
● Use Varnish or Squid (HTTP accelerators)
● Drupal specific hosting
Thank you for your patience!
By:Shafqat Hussain
Questions?
Answer:
www.google.com

More Related Content

What's hot

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 TrivandrumWordPress Trivandrum
 
Wordpress optimization
Wordpress optimizationWordpress optimization
Wordpress optimizationAlmog Baku
 
Introdcution to Adobe CQ
Introdcution to Adobe CQIntrodcution to Adobe CQ
Introdcution to Adobe CQRest West
 
ASP.NET Scalability - NxtGen Oxford
ASP.NET Scalability - NxtGen OxfordASP.NET Scalability - NxtGen Oxford
ASP.NET Scalability - NxtGen OxfordPhil Pursglove
 
Php & web server performace
Php & web server performacePhp & web server performace
Php & web server performaceTuyển Đoàn
 
Web Performance Part 3 "Server-side tips"
Web Performance Part 3  "Server-side tips"Web Performance Part 3  "Server-side tips"
Web Performance Part 3 "Server-side tips"Binary Studio
 
Client-side Website Optimization
Client-side Website OptimizationClient-side Website Optimization
Client-side Website OptimizationRadu Pintilie
 
EasyEngine - Command-Line tool to manage WordPress Sites on Nginx
EasyEngine - Command-Line tool to manage WordPress Sites on NginxEasyEngine - Command-Line tool to manage WordPress Sites on Nginx
EasyEngine - Command-Line tool to manage WordPress Sites on NginxrtCamp
 
Website performance optimization QA
Website performance optimization QAWebsite performance optimization QA
Website performance optimization QADenis Dudaev
 
Magento 2.2: It's Coming Right For You! | Colorado Magento Meetup
Magento 2.2: It's Coming Right For You! | Colorado Magento MeetupMagento 2.2: It's Coming Right For You! | Colorado Magento Meetup
Magento 2.2: It's Coming Right For You! | Colorado Magento MeetupKelly Mason
 
Scaling a Web Service
Scaling a Web ServiceScaling a Web Service
Scaling a Web ServiceLeon Ho
 
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.comSpodek 2.0
 
Scaling WordPress on DigitalOcean
Scaling WordPress on DigitalOceanScaling WordPress on DigitalOcean
Scaling WordPress on DigitalOceanServerGuy
 

What's hot (17)

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
 
Wordpress optimization
Wordpress optimizationWordpress optimization
Wordpress optimization
 
Introdcution to Adobe CQ
Introdcution to Adobe CQIntrodcution to Adobe CQ
Introdcution to Adobe CQ
 
ASP.NET Scalability - NxtGen Oxford
ASP.NET Scalability - NxtGen OxfordASP.NET Scalability - NxtGen Oxford
ASP.NET Scalability - NxtGen Oxford
 
WordCamp RVA
WordCamp RVAWordCamp RVA
WordCamp RVA
 
Php & web server performace
Php & web server performacePhp & web server performace
Php & web server performace
 
Web Performance Part 3 "Server-side tips"
Web Performance Part 3  "Server-side tips"Web Performance Part 3  "Server-side tips"
Web Performance Part 3 "Server-side tips"
 
Performance stack
Performance stackPerformance stack
Performance stack
 
Client-side Website Optimization
Client-side Website OptimizationClient-side Website Optimization
Client-side Website Optimization
 
EasyEngine - Command-Line tool to manage WordPress Sites on Nginx
EasyEngine - Command-Line tool to manage WordPress Sites on NginxEasyEngine - Command-Line tool to manage WordPress Sites on Nginx
EasyEngine - Command-Line tool to manage WordPress Sites on Nginx
 
Web performance Talk
Web performance TalkWeb performance Talk
Web performance Talk
 
Website performance optimization QA
Website performance optimization QAWebsite performance optimization QA
Website performance optimization QA
 
Magento 2.2: It's Coming Right For You! | Colorado Magento Meetup
Magento 2.2: It's Coming Right For You! | Colorado Magento MeetupMagento 2.2: It's Coming Right For You! | Colorado Magento Meetup
Magento 2.2: It's Coming Right For You! | Colorado Magento Meetup
 
Scaling a Web Service
Scaling a Web ServiceScaling a Web Service
Scaling a Web Service
 
Caching Strategies
Caching StrategiesCaching Strategies
Caching Strategies
 
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
 
Scaling WordPress on DigitalOcean
Scaling WordPress on DigitalOceanScaling WordPress on DigitalOcean
Scaling WordPress on DigitalOcean
 

Similar to Drupal 7 performance and optimization

Drupal performance and scalability
Drupal performance and scalabilityDrupal performance and scalability
Drupal performance and scalabilityTwinbit
 
Web performance optimization - MercadoLibre
Web performance optimization - MercadoLibreWeb performance optimization - MercadoLibre
Web performance optimization - MercadoLibrePablo Moretti
 
Optimizing Drupal Performance. Tips and Tricks
Optimizing Drupal Performance. Tips and TricksOptimizing Drupal Performance. Tips and Tricks
Optimizing Drupal Performance. Tips and TricksTimur Kamanin
 
Web performance mercadolibre - ECI 2013
Web performance   mercadolibre - ECI 2013Web performance   mercadolibre - ECI 2013
Web performance mercadolibre - ECI 2013Santiago Aimetta
 
20 tips for website performance
20 tips for website performance20 tips for website performance
20 tips for website performanceAndrew Siemer
 
Performance Optimization in Drupal 8
Performance Optimization in Drupal 8Performance Optimization in Drupal 8
Performance Optimization in Drupal 8valuebound
 
DrupalSouth 2015 - Performance: Not an Afterthought
DrupalSouth 2015 - Performance: Not an AfterthoughtDrupalSouth 2015 - Performance: Not an Afterthought
DrupalSouth 2015 - Performance: Not an AfterthoughtNick Santamaria
 
Improving Website Performance with Memecached Webinar | Achieve Internet
Improving Website Performance with Memecached Webinar | Achieve InternetImproving Website Performance with Memecached Webinar | Achieve Internet
Improving Website Performance with Memecached Webinar | Achieve InternetAchieve Internet
 
Improving Website Performance with Memecached Webinar | Achieve Internet
Improving Website Performance with Memecached Webinar | Achieve InternetImproving Website Performance with Memecached Webinar | Achieve Internet
Improving Website Performance with Memecached Webinar | Achieve InternetAchieve Internet
 
Make Drupal Run Fast - increase page load speed
Make Drupal Run Fast - increase page load speedMake Drupal Run Fast - increase page load speed
Make Drupal Run Fast - increase page load speedAndy Kucharski
 
Orlando DNN Usergroup Pres 12/06/11
Orlando DNN Usergroup Pres 12/06/11Orlando DNN Usergroup Pres 12/06/11
Orlando DNN Usergroup Pres 12/06/11Jess Coburn
 
How to Boost the performance of your Wordpress powered websites
How to Boost the performance of your Wordpress powered websitesHow to Boost the performance of your Wordpress powered websites
How to Boost the performance of your Wordpress powered websitesPratik Jagdishwala
 
kranonit S06E01 Игорь Цинько: High load
kranonit S06E01 Игорь Цинько: High loadkranonit S06E01 Игорь Цинько: High load
kranonit S06E01 Игорь Цинько: High loadKrivoy Rog IT Community
 
PyGrunn2013 High Performance Web Applications with TurboGears
PyGrunn2013  High Performance Web Applications with TurboGearsPyGrunn2013  High Performance Web Applications with TurboGears
PyGrunn2013 High Performance Web Applications with TurboGearsAlessandro Molina
 
Silverstripe at scale - design & architecture for silverstripe applications
Silverstripe at scale - design & architecture for silverstripe applicationsSilverstripe at scale - design & architecture for silverstripe applications
Silverstripe at scale - design & architecture for silverstripe applicationsBrettTasker
 
Imagine 2014: The Devil is in the Details How to Optimize Magento Hosting to ...
Imagine 2014: The Devil is in the Details How to Optimize Magento Hosting to ...Imagine 2014: The Devil is in the Details How to Optimize Magento Hosting to ...
Imagine 2014: The Devil is in the Details How to Optimize Magento Hosting to ...George White
 
Building faster websites: web performance with WordPress
Building faster websites: web performance with WordPressBuilding faster websites: web performance with WordPress
Building faster websites: web performance with WordPressJohannes Siipola
 
Memcache and Drupal - Vaibhav Jain
Memcache and Drupal - Vaibhav JainMemcache and Drupal - Vaibhav Jain
Memcache and Drupal - Vaibhav JainDrupal Camp Delhi
 

Similar to Drupal 7 performance and optimization (20)

Drupal performance and scalability
Drupal performance and scalabilityDrupal performance and scalability
Drupal performance and scalability
 
Web performance optimization - MercadoLibre
Web performance optimization - MercadoLibreWeb performance optimization - MercadoLibre
Web performance optimization - MercadoLibre
 
Optimizing Drupal Performance. Tips and Tricks
Optimizing Drupal Performance. Tips and TricksOptimizing Drupal Performance. Tips and Tricks
Optimizing Drupal Performance. Tips and Tricks
 
Web performance mercadolibre - ECI 2013
Web performance   mercadolibre - ECI 2013Web performance   mercadolibre - ECI 2013
Web performance mercadolibre - ECI 2013
 
20 tips for website performance
20 tips for website performance20 tips for website performance
20 tips for website performance
 
Performance Optimization in Drupal 8
Performance Optimization in Drupal 8Performance Optimization in Drupal 8
Performance Optimization in Drupal 8
 
DrupalSouth 2015 - Performance: Not an Afterthought
DrupalSouth 2015 - Performance: Not an AfterthoughtDrupalSouth 2015 - Performance: Not an Afterthought
DrupalSouth 2015 - Performance: Not an Afterthought
 
Improving Website Performance with Memecached Webinar | Achieve Internet
Improving Website Performance with Memecached Webinar | Achieve InternetImproving Website Performance with Memecached Webinar | Achieve Internet
Improving Website Performance with Memecached Webinar | Achieve Internet
 
Improving Website Performance with Memecached Webinar | Achieve Internet
Improving Website Performance with Memecached Webinar | Achieve InternetImproving Website Performance with Memecached Webinar | Achieve Internet
Improving Website Performance with Memecached Webinar | Achieve Internet
 
Drupal performance
Drupal performanceDrupal performance
Drupal performance
 
Make Drupal Run Fast - increase page load speed
Make Drupal Run Fast - increase page load speedMake Drupal Run Fast - increase page load speed
Make Drupal Run Fast - increase page load speed
 
Orlando DNN Usergroup Pres 12/06/11
Orlando DNN Usergroup Pres 12/06/11Orlando DNN Usergroup Pres 12/06/11
Orlando DNN Usergroup Pres 12/06/11
 
How to Boost the performance of your Wordpress powered websites
How to Boost the performance of your Wordpress powered websitesHow to Boost the performance of your Wordpress powered websites
How to Boost the performance of your Wordpress powered websites
 
kranonit S06E01 Игорь Цинько: High load
kranonit S06E01 Игорь Цинько: High loadkranonit S06E01 Игорь Цинько: High load
kranonit S06E01 Игорь Цинько: High load
 
PyGrunn2013 High Performance Web Applications with TurboGears
PyGrunn2013  High Performance Web Applications with TurboGearsPyGrunn2013  High Performance Web Applications with TurboGears
PyGrunn2013 High Performance Web Applications with TurboGears
 
Drupal performance
Drupal performanceDrupal performance
Drupal performance
 
Silverstripe at scale - design & architecture for silverstripe applications
Silverstripe at scale - design & architecture for silverstripe applicationsSilverstripe at scale - design & architecture for silverstripe applications
Silverstripe at scale - design & architecture for silverstripe applications
 
Imagine 2014: The Devil is in the Details How to Optimize Magento Hosting to ...
Imagine 2014: The Devil is in the Details How to Optimize Magento Hosting to ...Imagine 2014: The Devil is in the Details How to Optimize Magento Hosting to ...
Imagine 2014: The Devil is in the Details How to Optimize Magento Hosting to ...
 
Building faster websites: web performance with WordPress
Building faster websites: web performance with WordPressBuilding faster websites: web performance with WordPress
Building faster websites: web performance with WordPress
 
Memcache and Drupal - Vaibhav Jain
Memcache and Drupal - Vaibhav JainMemcache and Drupal - Vaibhav Jain
Memcache and Drupal - Vaibhav Jain
 

Recently uploaded

Maximizing Board Effectiveness 2024 Webinar.pptx
Maximizing Board Effectiveness 2024 Webinar.pptxMaximizing Board Effectiveness 2024 Webinar.pptx
Maximizing Board Effectiveness 2024 Webinar.pptxOnBoard
 
SIEMENS: RAPUNZEL – A Tale About Knowledge Graph
SIEMENS: RAPUNZEL – A Tale About Knowledge GraphSIEMENS: RAPUNZEL – A Tale About Knowledge Graph
SIEMENS: RAPUNZEL – A Tale About Knowledge GraphNeo4j
 
Azure Monitor & Application Insight to monitor Infrastructure & Application
Azure Monitor & Application Insight to monitor Infrastructure & ApplicationAzure Monitor & Application Insight to monitor Infrastructure & Application
Azure Monitor & Application Insight to monitor Infrastructure & ApplicationAndikSusilo4
 
Injustice - Developers Among Us (SciFiDevCon 2024)
Injustice - Developers Among Us (SciFiDevCon 2024)Injustice - Developers Among Us (SciFiDevCon 2024)
Injustice - Developers Among Us (SciFiDevCon 2024)Allon Mureinik
 
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...Patryk Bandurski
 
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024BookNet Canada
 
Human Factors of XR: Using Human Factors to Design XR Systems
Human Factors of XR: Using Human Factors to Design XR SystemsHuman Factors of XR: Using Human Factors to Design XR Systems
Human Factors of XR: Using Human Factors to Design XR SystemsMark Billinghurst
 
Understanding the Laravel MVC Architecture
Understanding the Laravel MVC ArchitectureUnderstanding the Laravel MVC Architecture
Understanding the Laravel MVC ArchitecturePixlogix Infotech
 
Key Features Of Token Development (1).pptx
Key  Features Of Token  Development (1).pptxKey  Features Of Token  Development (1).pptx
Key Features Of Token Development (1).pptxLBM Solutions
 
SQL Database Design For Developers at php[tek] 2024
SQL Database Design For Developers at php[tek] 2024SQL Database Design For Developers at php[tek] 2024
SQL Database Design For Developers at php[tek] 2024Scott Keck-Warren
 
Advanced Test Driven-Development @ php[tek] 2024
Advanced Test Driven-Development @ php[tek] 2024Advanced Test Driven-Development @ php[tek] 2024
Advanced Test Driven-Development @ php[tek] 2024Scott Keck-Warren
 
Enhancing Worker Digital Experience: A Hands-on Workshop for Partners
Enhancing Worker Digital Experience: A Hands-on Workshop for PartnersEnhancing Worker Digital Experience: A Hands-on Workshop for Partners
Enhancing Worker Digital Experience: A Hands-on Workshop for PartnersThousandEyes
 
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmaticsKotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmaticscarlostorres15106
 
Presentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreterPresentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreternaman860154
 
How to convert PDF to text with Nanonets
How to convert PDF to text with NanonetsHow to convert PDF to text with Nanonets
How to convert PDF to text with Nanonetsnaman860154
 
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking MenDelhi Call girls
 
08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking MenDelhi Call girls
 
Swan(sea) Song – personal research during my six years at Swansea ... and bey...
Swan(sea) Song – personal research during my six years at Swansea ... and bey...Swan(sea) Song – personal research during my six years at Swansea ... and bey...
Swan(sea) Song – personal research during my six years at Swansea ... and bey...Alan Dix
 
Making_way_through_DLL_hollowing_inspite_of_CFG_by_Debjeet Banerjee.pptx
Making_way_through_DLL_hollowing_inspite_of_CFG_by_Debjeet Banerjee.pptxMaking_way_through_DLL_hollowing_inspite_of_CFG_by_Debjeet Banerjee.pptx
Making_way_through_DLL_hollowing_inspite_of_CFG_by_Debjeet Banerjee.pptxnull - The Open Security Community
 

Recently uploaded (20)

Maximizing Board Effectiveness 2024 Webinar.pptx
Maximizing Board Effectiveness 2024 Webinar.pptxMaximizing Board Effectiveness 2024 Webinar.pptx
Maximizing Board Effectiveness 2024 Webinar.pptx
 
SIEMENS: RAPUNZEL – A Tale About Knowledge Graph
SIEMENS: RAPUNZEL – A Tale About Knowledge GraphSIEMENS: RAPUNZEL – A Tale About Knowledge Graph
SIEMENS: RAPUNZEL – A Tale About Knowledge Graph
 
Azure Monitor & Application Insight to monitor Infrastructure & Application
Azure Monitor & Application Insight to monitor Infrastructure & ApplicationAzure Monitor & Application Insight to monitor Infrastructure & Application
Azure Monitor & Application Insight to monitor Infrastructure & Application
 
Injustice - Developers Among Us (SciFiDevCon 2024)
Injustice - Developers Among Us (SciFiDevCon 2024)Injustice - Developers Among Us (SciFiDevCon 2024)
Injustice - Developers Among Us (SciFiDevCon 2024)
 
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
 
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
 
Human Factors of XR: Using Human Factors to Design XR Systems
Human Factors of XR: Using Human Factors to Design XR SystemsHuman Factors of XR: Using Human Factors to Design XR Systems
Human Factors of XR: Using Human Factors to Design XR Systems
 
Understanding the Laravel MVC Architecture
Understanding the Laravel MVC ArchitectureUnderstanding the Laravel MVC Architecture
Understanding the Laravel MVC Architecture
 
Key Features Of Token Development (1).pptx
Key  Features Of Token  Development (1).pptxKey  Features Of Token  Development (1).pptx
Key Features Of Token Development (1).pptx
 
SQL Database Design For Developers at php[tek] 2024
SQL Database Design For Developers at php[tek] 2024SQL Database Design For Developers at php[tek] 2024
SQL Database Design For Developers at php[tek] 2024
 
Advanced Test Driven-Development @ php[tek] 2024
Advanced Test Driven-Development @ php[tek] 2024Advanced Test Driven-Development @ php[tek] 2024
Advanced Test Driven-Development @ php[tek] 2024
 
Enhancing Worker Digital Experience: A Hands-on Workshop for Partners
Enhancing Worker Digital Experience: A Hands-on Workshop for PartnersEnhancing Worker Digital Experience: A Hands-on Workshop for Partners
Enhancing Worker Digital Experience: A Hands-on Workshop for Partners
 
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmaticsKotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
 
Presentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreterPresentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreter
 
How to convert PDF to text with Nanonets
How to convert PDF to text with NanonetsHow to convert PDF to text with Nanonets
How to convert PDF to text with Nanonets
 
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
 
E-Vehicle_Hacking_by_Parul Sharma_null_owasp.pptx
E-Vehicle_Hacking_by_Parul Sharma_null_owasp.pptxE-Vehicle_Hacking_by_Parul Sharma_null_owasp.pptx
E-Vehicle_Hacking_by_Parul Sharma_null_owasp.pptx
 
08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men
 
Swan(sea) Song – personal research during my six years at Swansea ... and bey...
Swan(sea) Song – personal research during my six years at Swansea ... and bey...Swan(sea) Song – personal research during my six years at Swansea ... and bey...
Swan(sea) Song – personal research during my six years at Swansea ... and bey...
 
Making_way_through_DLL_hollowing_inspite_of_CFG_by_Debjeet Banerjee.pptx
Making_way_through_DLL_hollowing_inspite_of_CFG_by_Debjeet Banerjee.pptxMaking_way_through_DLL_hollowing_inspite_of_CFG_by_Debjeet Banerjee.pptx
Making_way_through_DLL_hollowing_inspite_of_CFG_by_Debjeet Banerjee.pptx
 

Drupal 7 performance and optimization

  • 1. Drupal Performance and Optimization By: Shafqat Hussain http://speedup.co.id/
  • 2. Basics of Web App Systems Architecture • General Web Software Optimization Strategies • Defining a Goal for Performance • Performance Metrics, tools • Performance Debugging Techniques • What Can You Control? • What Is Caching? • Optimizing Drupal Overview
  • 4.
  • 5.
  • 6.
  • 7. Why
  • 9. ● According to surveys, nearly half of web users expect a site to load in 2 seconds or less, and they tend to abandon a site that isn’t loaded within 3 seconds. 79% of web shoppers who have trouble with web site performance say they won’t return to the site to buy again and around 44% of them would tell a friend if they had a poor experience shopping online. ● If an e-commerce site is making $100,000 per day, a 1 second page delay could potentially cost you $2.5 million in lost sales every year Facts and stats
  • 12. Large Drupal website without Performance optimization
  • 16. ● Move operations from devices with slower access to devices with faster access ● Reduce disk I/O ● Reduce bandwidth ● Use memory more efficiently ● Increase parallelism ● Reducing CPU ● Keep Drupal and modules up to date. ● Keep monitoring ● Use of Ajax General Strategies
  • 17. ● Performance optimization can become an endless task without a goal ● What is your goal? ● – Page load time (4 seconds for blogs) ● – Requests/sec ● – Response time ● Performance metrics come first! Defining a Goal
  • 19. ● Google Analytics Site Speed ● Yslow ● Page speed extension chrome/Firefox ● Chrome Developer tools ● Devel Module ● www.webpagetest.org Tools
  • 20. ● Initial page load vs. loading assets ● What is Waiting? Chrome Developer tools Live Demo
  • 22. ● Shared Hosting vs. VPS or Dedicated Server ● Shared server allows no: ● – Apache configuration ● – MySQL configuration ● – Memcached/APC for utilizing local memory ● – Consistent resources ● Despite these limitations, you still have a lot of options even if on Shared Hosting What Can you Control?
  • 23. ● Saving the results of computation to reuse at a later date which saves time ● • Moving from slow disks to local memory ● • Reduce number of database queries ● • Reduce number of files to serve ● • Both server-side caching, and client-side caching ● • Disadvantages: stale data, duplication of data What is Caching?
  • 24. ● Tuning strategies presented in the typical priority that you should look at them. ● – Biggest improvement at lowest cost (time or money) ● – First Shared Hosting ● – Then VPS/Dedicated Server-only Drupal Performance Priority
  • 25. ● Output of many database queries that are rendered into HTML to create an entire page are saved as an entire object in cache. ● Only works for Anonymous users Page Caching
  • 26. ● Parallelism is limited by web browser and web server. ● Reducing number and size of files improves performance Aggregate and Compress CSS Files
  • 27. ● Parallelism is limited by web browser and web server. ● Reducing number of files improves performance ● Compression has to be done outside of Drupal, recommend YUI Compressor or Google Closure compiler Aggregate/Compress Javascript Files
  • 28. ● To address performance for Authenticated Users, look at enabling Views caching ● Set the time lengths for fine tuning your caching strategy ● Views Content Cache (event based) ● Found under Advanced section when Editing a View OR Demo Turn Views Caching On
  • 29. ● Another way to address performance for Authenticated Users ● Modules can define whether blocks can be cached by user, by role Turn Block Caching On
  • 30. ● Reduces the chain of hooks that need to be followed ● This further reduces database queries, CSS and Javascript files ● Can you do it another way with core Drupal/ existing module or small code snippet in template.php? Disable Modules Not Used
  • 31. ● Moving static files (images, videos, CSS, Javascript) to another server ● Reduces disk I/O and requests handled by web server ● Increases parallelism due to client-side limit Move Static Files to a CDN
  • 32. ● Within your own modules, you can create your own database cache tables ● Allows you to control what is cached and how long it is kept ● Separate UI files in modules ● Disable modules UI parts in live sites. ● Link: Beginner’s Guide to Caching Data in Drupal 7 Caching in Your Own Modules
  • 33. ● Just like CSS and Javascript aggregation, ● always good idea to reduce number and sizes of images ● • Compression ● • Repeating backgrounds ● • CSS Image Sprites Reduce Image Sizes and Number of Images
  • 35. ● Determines how many requests you can handle in parallel ● How to know: MaxClients = Total RAM dedicated to the web server / Max child process size ● HTTP keep-alive Timeout (also known as persistent connections) is keeping the TCP socket open so that another request can be made without setting up a new connection. Apache
  • 36. ● Great for saving small queries run on database tables that never or rarely change ● • Doesn’t eliminate, just comes out of memory ● • Even just 8MB or 16MB of memory will do wonders ● • Link: http://dev.mysql.com/doc/refman/5. 1/en/query-cache.html ● MySQL Tuning https://drupal.org/node/51263 Enable MySQL Query Caching
  • 37. Memcached Server for Caching ● An in-memory cache used to move requests from disks to memory ● • Drupal cache tables run from Memcached instead of cache database table. ● https://drupal.org/project/memcache ● http://andrewdunkle.com/2012/how-to- install-memcached-for-drupal-7.html
  • 40. ● Search is resource intensive ● Consider Solr ● Google Custom search
  • 42. ● Instead of PHP being interpreted every time, stores intermediate code (opcodes) in memory ● Each site can take up 16M or more Enable APC
  • 43. Note: It is possible to destroy your site by configuring incorrectly. Be careful and back up configurations before making changes. especially for MySQL, Apache
  • 44. ● Boost ● Memcached ● Varnish ● Block Cache ● AuthCache ● CacheRouter ● Fast 404 ● Entity Cache Modules
  • 45. ● Database logging ● Statistics(consider Google Analytics) ● PHP filter ● Update Manager Note: disable devel, UI modules Bad Modules
  • 46. ● eg: ‘Add to cart’ change ● You might be able solve with views, or other existing modules. ● Javascript/Jquery for small text changes. Do you really need module for that.
  • 47.
  • 48. ● Cache tags(to delete only related cache) ● P15N(Handling dynamic stuff for anonymous, eg: last visited time). Drupal 8
  • 49. Spend Some $ ● Separate MySQL server from Web Server ● Increase RAM ● Load Balance two web servers ● Buy a separate Memcached server ● Use Varnish or Squid (HTTP accelerators) ● Drupal specific hosting
  • 50. Thank you for your patience! By:Shafqat Hussain