SlideShare uma empresa Scribd logo
1 de 32
#PureSpeed
elmsln.org
@btopro
Come get sticker like this one
In dribs and drabs
we will change the world
Project Lead
ELMS Initiative
Instructional Systems Architect
E-Learning Institute
College of Arts & Architecture
Penn State University
@btopro (aka Bryan Ollendyke)
https://github.com/elmsln/elmsln
https://elmsln.org
Star, Follow and Fork!
#purespeed
• Tools to identify problems / needs
• General Server Optimization
• Drupal 7/8 Optimization
• Fixing common front-end delivery issues
Free / Local digging
• Drupal.org/project/devel
• Enable and set to display results of queries / memory usage
• Hack Core
• Throw a dpm() into module_invoke_all (includes/module.inc in D7)
• https://drupal.psu.edu/blog/post/memory-profiling-hooks
• XH-Prof
• https://www.drupal.org/project/xhprof
• Stand alone php profiler w/ drupal integration
Big Data
• Ability to trace errors deeply
• Drupal specific breakdowns
• Example
• https://www.drupal.org/node/2370309#comment-10368929
Server: Apache FPM
• Switch from mod_php processing to FPM
• yum install php5-fpm
• Obviously more to it then that but worth exploring
• https://github.com/bradallenfisher/php56-fpm-centos7-mysql56
Server: PHP
• PHP -- /etc/php.ini or /etc/php5/fpm/php.ini
• Zend Opcache -- /etc/php.d/opcache.ini or /etc/php5/mods-available/opcache.ini
• APC/u - /etc/php.d/apc.ini or /etc/php5/mods-available/apcu.ini
• https://drupal.psu.edu/blog/post/purespeed-php-tuning
• Cache code files in memory
• Otherwise memory used to deliver insane!
• PHP 5.5+ use Zend OpCache
• APCu if you want as cache backend
• PHP < 5.4 use APC
• user bin for backend builtin
• Biggest deal in mcarper’s opinion
• realpath_cache_size = 1M
• realpath_cache_ttl = 3600
Server: MySQL
• MySQL - /etc/my.cnf
• Most common issue:
• max-allowed-packet = 32M
• Disable caching engine (counter intuitive but Drupal makes this worthless)
• Ensure innodb table encoding, and tuned
• Drupal Contrib:
• APDQC – drupal.org/project/apdqc
• Replacement for Core mysql cache bin engine
• Eliminates deadlocks
• Gives report on how to further optimize your server
• Use other alternate cache backends (so mysql does less)
Drupal: Cache bin management
• Cache Bin Management
• https://drupal.psu.edu/blog/post/purespeed-cache-bin-backends
• Popular options
• Apc user bin – great for things that don’t change
• Fast, cheap and easy for anyone (don’t push page cache here!)
• Filecache – writ to file system for cache data
• Great, cheap and easy if on SSD
• Memcache –popular in distributed / complex setups
• Reddis – similar to memcache, newer and more popular now
• Both great but usually you want this on its own server / more complicated
• Apdqc – replacement for mysql core cache bin mechanism
• Run on any site
Drupal: Cache bin WARNING
• Make sure file paths are correct!
• WSOD
• cache_form CAN NOT live in bins
• All page form submission breaks
• APC fragmentation
• Restart apache on interval
• APDQC recommendations
• Some involve mysql upgrades
• Semephor / session replacements
can cause issues
Drupal / Server
• httprl_spider - https://www.drupal.org/project/httprl_spider
• xmlrpc_page_load - https://www.drupal.org/project/xmlrpc_page_load
• Usage:
• drush @site hss node (request all nodes on site, as anonymous)
• drush @site hss node –xmlrpcuid=1 (all nodes on site, “as user 1”)
• Great for seeding anonymous/auth’ed user page caches
• Stuff in a crontab nightly after cron (so caches are cleared out)
• vi /etc/crontab
* 4 * * * root drush @mysite cron
15 4 * * * root drush @mysite hss
Server: Varnish
• Varnish - /etc/varnish/default.vcl
• yum install varnish
• Reverse Proxy that sits in front of apache
• Listen on 80; move apache to port 8080
• must have for anonymous traffic / high scale
• Can’t handle HTTPS (without 4.x + plugin)
• Nginx
• More performant then stock apache but leess support
• useful reverse proxy for HTTPS if not running outright
Drupal 7 - entitycache
• https://www.drupal.org/project/entitycache
• Core in drupal 8.x.x!
• Caches entity / object definitions (basically required for field collections)
• Turn it on, that’s it!
Drupal 7 - APDQC
• Covered earlier
• Install, read README and status page
• Fix issues it reports
• Faster site with less time spent in mysql calls
Drupal 7 & 8 - advagg
• Drupal.org/project/advagg
• Covered earlier
• Should be on every site you do
• Biggest gains in compression, bundler, async font loader and pushing js to footer
• Great for improving perception of page load
• Beware of bricking JS though
Drupal - HTTPRL
• Drupal.org/project/httprl
• Threading capable
• Allows for queuing background threads and non-blocking calls
• Similar to Guzzle (D8 core)
• Makes certain projects faster (like advagg)
• *Can be a bit of a troublemaker
• https://drupal.psu.edu/blog/post/bench-marking-non-blocking-httprl-vs-
drupalhttprequest
• https://drupal.psu.edu/blog/post/core-caching-and-drupalstatic-make-cached-
drupalhttprequests
Drupal - APC
• drupal.org/project/apc -Exposes APC user bin as a cache backend
• Beware of fragmentation
• Can’t be used in a distributed / clustered deployment (use memecache / reddis)
$conf['cache_backends'][] = 'sites/all/modules/apc/drupal_apc_cache.inc';
$conf['cache_class_cache'] = 'DrupalAPCCache';
$conf['cache_class_cache_admin_menu'] = 'DrupalAPCCache';
$conf['cache_class_cache_block'] = 'DrupalAPCCache';
$conf['cache_class_cache_bootstrap'] = 'DrupalAPCCache';
$conf['cache_class_cache_entity_file'] = 'DrupalAPCCache';
$conf['cache_class_cache_field'] = 'DrupalAPCCache';
$conf['cache_class_cache_menu'] = 'DrupalAPCCache';
$conf['cache_class_cache_libraries'] = 'DrupalAPCCache';
$conf['cache_class_cache_token'] = 'DrupalAPCCache';
$conf['cache_class_cache_views'] = 'DrupalAPCCache';
$conf['cache_class_cache_path_breadcrumbs'] = 'DrupalAPCCache';
$conf['cache_class_cache_path'] = 'DrupalAPCCache';
$conf['cache_class_cache_book'] = 'DrupalAPCCache’;
Drupal 7 - Authcache
• drupal.org/project/authcache
• Aggressive caching methods for authenticated users
• Great when granularity of access is per role
• Caches per combination of roles (handles anonymous too)
• Can cache admin, not recommended
• Need to modify settings.php / authcache.php in Drupal root
• https://github.com/elmsln/elmsln/blob/master/core/dslmcode/shared/drupal-
7.x/modules/ulmus/authcache/modules/authcache_p13n/safe_frontcontroller/au
thcache.php
Drupal 8 - BigPipe
• Core in 8.1.x+
• Delivers parts of the page that take
more time by loading the static stuff
by itself, to load SOMETHING
• Then additional JS based calls inject
the slower parts of the page build
Drupal 8 - Refreshless
• https://www.drupal.org/project/refreshless
• Similar to the Turbo Links, a technique from Rails
• Page never actually reloads, it just calls in the background for parts of page
• Similar to loading items on github.com (click between links and see!)
The dreaded inherited site
• ELMSLN stack
• Someone screwed stuff up!
• Identify issues
• Win
Front end performance
Front end performance
• Yslow
• Firefox / Chrome plugin by Yahoo
Front end performance
• PageSpeed
• Chrome, right click -> inspect element -> Audits
• Select Reload page and Audit on Load -> Run
Front end performance
• Webpagetest.org
Asset Delivery
• Deliver assets logically
• Etags that make sense
• Expire headers that make sense (far in the future for static assets)
• Logical headers = less requests on future page loads
• Which makes Apache happy
• Your users happy!
Server: Apache
• Compression – send less w/ the same result
• Etags – strip off so validation of resource match happens
• Expires headers – ensure static assets are kept far into the future
• Keep Alive – create less apache workers by keeping them open longer
• MaxClients – set appropriately or server will die
• memory per page / (RAM – other services) = MaxClients
• Cheating – zzz_performance.conf
• Drop in performance gain for almost any drupal / apache site
• https://github.com/elmsln/elmsln/blob/master/scripts/server/zzz_performance.conf
JS / CSS blocking
• AdvAgg
• https://www.drupal.org/project/advagg
• Turn on modify and bundler sub-modules
• Push for 2 groupings of css / js on bundler settings page
• Modifier
• Basically check everything that doesn’t sound evil
• Use modify to push js into the bottom of the page
• Careful, JS needs to be well formed!
• Experimental!
• Use javascript to load CSS
• It’s in the bottom of the advagg modifier settings
Fixing CDN category
• All systems complain about CDN till you define what CDN is!
• Ways to fix
• Buy a legit CDN and pay a lot of money
• Install https://www.drupal.org/project/cdn (illegitimate CDN)
• Use settings in jquery_update module to deliver from Google / Microsoft
• If on bootstrap, select CDN for code source
• Use https://www.google.com/fonts for custom font CSS instead of local
Make less requests
• AdvAgg / aggregate CSS/JS files can help
• https://www.drupal.org/project/advagg
• Convert small images to sprites or “data” objects
• https://www.drupal.org/project/css_emimage
• Good luck though..
• You’re using a modular CMS / framework!
Questions
@btopro
elmsln.org

Mais conteúdo relacionado

Mais procurados

Server Check.in case study - Drupal and Node.js
Server Check.in case study - Drupal and Node.jsServer Check.in case study - Drupal and Node.js
Server Check.in case study - Drupal and Node.jsJeff Geerling
 
Drupal feature proposal: two new stream-wrappers
Drupal feature proposal: two new stream-wrappersDrupal feature proposal: two new stream-wrappers
Drupal feature proposal: two new stream-wrappersMarcus Deglos
 
Memcached: What is it and what does it do?
Memcached: What is it and what does it do?Memcached: What is it and what does it do?
Memcached: What is it and what does it do?Brian Moon
 
DrupalCampLA 2011: Drupal backend-performance
DrupalCampLA 2011: Drupal backend-performanceDrupalCampLA 2011: Drupal backend-performance
DrupalCampLA 2011: Drupal backend-performanceAshok Modi
 
Ansible v2 and Beyond (Ansible Hawai'i Meetup)
Ansible v2 and Beyond (Ansible Hawai'i Meetup)Ansible v2 and Beyond (Ansible Hawai'i Meetup)
Ansible v2 and Beyond (Ansible Hawai'i Meetup)Timothy Appnel
 
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
 
Roy foubister (hosting high traffic sites on a tight budget)
Roy foubister (hosting high traffic sites on a tight budget)Roy foubister (hosting high traffic sites on a tight budget)
Roy foubister (hosting high traffic sites on a tight budget)WordCamp Cape Town
 
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
 
Apache Performance Tuning: Scaling Up
Apache Performance Tuning: Scaling UpApache Performance Tuning: Scaling Up
Apache Performance Tuning: Scaling UpSander Temme
 
Ansible: How to Get More Sleep and Require Less Coffee
Ansible: How to Get More Sleep and Require Less CoffeeAnsible: How to Get More Sleep and Require Less Coffee
Ansible: How to Get More Sleep and Require Less CoffeeSarah Z
 
Staging Drupal 8 31 09 1 3
Staging Drupal 8 31 09 1 3Staging Drupal 8 31 09 1 3
Staging Drupal 8 31 09 1 3Drupalcon Paris
 
Drupal VM for Drupal 8 Dev - MidCamp 2017
Drupal VM for Drupal 8 Dev - MidCamp 2017Drupal VM for Drupal 8 Dev - MidCamp 2017
Drupal VM for Drupal 8 Dev - MidCamp 2017Jeff Geerling
 
London devops logging
London devops loggingLondon devops logging
London devops loggingTomas Doran
 
Memcached: What is it and what does it do? (PHP Version)
Memcached: What is it and what does it do? (PHP Version)Memcached: What is it and what does it do? (PHP Version)
Memcached: What is it and what does it do? (PHP Version)Brian Moon
 
Memcached Code Camp 2009
Memcached Code Camp 2009Memcached Code Camp 2009
Memcached Code Camp 2009NorthScale
 
Single page apps with drupal 7
Single page apps with drupal 7Single page apps with drupal 7
Single page apps with drupal 7Chris Tankersley
 

Mais procurados (20)

Server Check.in case study - Drupal and Node.js
Server Check.in case study - Drupal and Node.jsServer Check.in case study - Drupal and Node.js
Server Check.in case study - Drupal and Node.js
 
Top ten-list
Top ten-listTop ten-list
Top ten-list
 
Drupal feature proposal: two new stream-wrappers
Drupal feature proposal: two new stream-wrappersDrupal feature proposal: two new stream-wrappers
Drupal feature proposal: two new stream-wrappers
 
Memcached: What is it and what does it do?
Memcached: What is it and what does it do?Memcached: What is it and what does it do?
Memcached: What is it and what does it do?
 
DrupalCampLA 2011: Drupal backend-performance
DrupalCampLA 2011: Drupal backend-performanceDrupalCampLA 2011: Drupal backend-performance
DrupalCampLA 2011: Drupal backend-performance
 
Ansible v2 and Beyond (Ansible Hawai'i Meetup)
Ansible v2 and Beyond (Ansible Hawai'i Meetup)Ansible v2 and Beyond (Ansible Hawai'i Meetup)
Ansible v2 and Beyond (Ansible Hawai'i Meetup)
 
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
 
Roy foubister (hosting high traffic sites on a tight budget)
Roy foubister (hosting high traffic sites on a tight budget)Roy foubister (hosting high traffic sites on a tight budget)
Roy foubister (hosting high traffic sites on a tight budget)
 
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
 
Apache Performance Tuning: Scaling Up
Apache Performance Tuning: Scaling UpApache Performance Tuning: Scaling Up
Apache Performance Tuning: Scaling Up
 
Ansible: How to Get More Sleep and Require Less Coffee
Ansible: How to Get More Sleep and Require Less CoffeeAnsible: How to Get More Sleep and Require Less Coffee
Ansible: How to Get More Sleep and Require Less Coffee
 
Ansible
AnsibleAnsible
Ansible
 
Varnish bof
Varnish bofVarnish bof
Varnish bof
 
Staging Drupal 8 31 09 1 3
Staging Drupal 8 31 09 1 3Staging Drupal 8 31 09 1 3
Staging Drupal 8 31 09 1 3
 
Drupal VM for Drupal 8 Dev - MidCamp 2017
Drupal VM for Drupal 8 Dev - MidCamp 2017Drupal VM for Drupal 8 Dev - MidCamp 2017
Drupal VM for Drupal 8 Dev - MidCamp 2017
 
Varnish intro
Varnish introVarnish intro
Varnish intro
 
London devops logging
London devops loggingLondon devops logging
London devops logging
 
Memcached: What is it and what does it do? (PHP Version)
Memcached: What is it and what does it do? (PHP Version)Memcached: What is it and what does it do? (PHP Version)
Memcached: What is it and what does it do? (PHP Version)
 
Memcached Code Camp 2009
Memcached Code Camp 2009Memcached Code Camp 2009
Memcached Code Camp 2009
 
Single page apps with drupal 7
Single page apps with drupal 7Single page apps with drupal 7
Single page apps with drupal 7
 

Semelhante a Pure Speed Drupal 4 Gov talk

High Performance Drupal
High Performance DrupalHigh Performance Drupal
High Performance DrupalChapter Three
 
PostgreSQL High Availability in a Containerized World
PostgreSQL High Availability in a Containerized WorldPostgreSQL High Availability in a Containerized World
PostgreSQL High Availability in a Containerized WorldJignesh Shah
 
Caching strategies with lucee
Caching strategies with luceeCaching strategies with lucee
Caching strategies with luceeGert Franz
 
Drupal: an Overview
Drupal: an OverviewDrupal: an Overview
Drupal: an OverviewMatt Weaver
 
DrupalSouth 2015 - Performance: Not an Afterthought
DrupalSouth 2015 - Performance: Not an AfterthoughtDrupalSouth 2015 - Performance: Not an Afterthought
DrupalSouth 2015 - Performance: Not an AfterthoughtNick Santamaria
 
Drupalcamp Estonia - High Performance Sites
Drupalcamp Estonia - High Performance SitesDrupalcamp Estonia - High Performance Sites
Drupalcamp Estonia - High Performance SitesExove
 
Drupalcamp Estonia - High Performance Sites
Drupalcamp Estonia - High Performance SitesDrupalcamp Estonia - High Performance Sites
Drupalcamp Estonia - High Performance Sitesdrupalcampest
 
Plain english guide to drupal 8 criticals
Plain english guide to drupal 8 criticalsPlain english guide to drupal 8 criticals
Plain english guide to drupal 8 criticalsAngela Byron
 
Anthony Somerset - Site Speed = Success!
Anthony Somerset - Site Speed = Success!Anthony Somerset - Site Speed = Success!
Anthony Somerset - Site Speed = Success!WordCamp Cape Town
 
Escalando php e drupal- performance ao infinito e além! - DrupalCamp SP 2015
Escalando php e drupal- performance ao infinito e além! - DrupalCamp SP 2015Escalando php e drupal- performance ao infinito e além! - DrupalCamp SP 2015
Escalando php e drupal- performance ao infinito e além! - DrupalCamp SP 2015Handrus Nogueira
 
DrupalCamp SP 2015 - Escalando PHP e Drupal- Performance ao infinito e além!
DrupalCamp SP 2015 -  Escalando PHP e Drupal- Performance ao infinito e além!DrupalCamp SP 2015 -  Escalando PHP e Drupal- Performance ao infinito e além!
DrupalCamp SP 2015 - Escalando PHP e Drupal- Performance ao infinito e além!Taller Negócio Digitais
 
Escalando php e drupal- performance ao infinito e além! - Drupal camp sp 2015
Escalando php e drupal- performance ao infinito e além! - Drupal camp sp 2015Escalando php e drupal- performance ao infinito e além! - Drupal camp sp 2015
Escalando php e drupal- performance ao infinito e além! - Drupal camp sp 2015Handrus Nogueira
 
Drupal performance and scalability
Drupal performance and scalabilityDrupal performance and scalability
Drupal performance and scalabilityTwinbit
 
Introduction to memcached
Introduction to memcachedIntroduction to memcached
Introduction to memcachedJurriaan Persyn
 
Performance and Scalability
Performance and ScalabilityPerformance and Scalability
Performance and ScalabilityMediacurrent
 
Escalando PHP e Drupal: performance ao infinito e além! - DrupalCamp SP 2015
Escalando PHP e Drupal: performance ao infinito e além! - DrupalCamp SP 2015Escalando PHP e Drupal: performance ao infinito e além! - DrupalCamp SP 2015
Escalando PHP e Drupal: performance ao infinito e além! - DrupalCamp SP 2015Lucas Arruda
 
Drupal Performance - SerBenfiquista.com Case Study
Drupal Performance - SerBenfiquista.com Case StudyDrupal Performance - SerBenfiquista.com Case Study
Drupal Performance - SerBenfiquista.com Case Studyhernanibf
 

Semelhante a Pure Speed Drupal 4 Gov talk (20)

High Performance Drupal
High Performance DrupalHigh Performance Drupal
High Performance Drupal
 
Drupal performance
Drupal performanceDrupal performance
Drupal performance
 
PostgreSQL High Availability in a Containerized World
PostgreSQL High Availability in a Containerized WorldPostgreSQL High Availability in a Containerized World
PostgreSQL High Availability in a Containerized World
 
Caching strategies with lucee
Caching strategies with luceeCaching strategies with lucee
Caching strategies with lucee
 
Drupal: an Overview
Drupal: an OverviewDrupal: an Overview
Drupal: an Overview
 
DrupalSouth 2015 - Performance: Not an Afterthought
DrupalSouth 2015 - Performance: Not an AfterthoughtDrupalSouth 2015 - Performance: Not an Afterthought
DrupalSouth 2015 - Performance: Not an Afterthought
 
Drupalcamp Estonia - High Performance Sites
Drupalcamp Estonia - High Performance SitesDrupalcamp Estonia - High Performance Sites
Drupalcamp Estonia - High Performance Sites
 
Drupalcamp Estonia - High Performance Sites
Drupalcamp Estonia - High Performance SitesDrupalcamp Estonia - High Performance Sites
Drupalcamp Estonia - High Performance Sites
 
Plain english guide to drupal 8 criticals
Plain english guide to drupal 8 criticalsPlain english guide to drupal 8 criticals
Plain english guide to drupal 8 criticals
 
Anthony Somerset - Site Speed = Success!
Anthony Somerset - Site Speed = Success!Anthony Somerset - Site Speed = Success!
Anthony Somerset - Site Speed = Success!
 
Escalando php e drupal- performance ao infinito e além! - DrupalCamp SP 2015
Escalando php e drupal- performance ao infinito e além! - DrupalCamp SP 2015Escalando php e drupal- performance ao infinito e além! - DrupalCamp SP 2015
Escalando php e drupal- performance ao infinito e além! - DrupalCamp SP 2015
 
DrupalCamp SP 2015 - Escalando PHP e Drupal- Performance ao infinito e além!
DrupalCamp SP 2015 -  Escalando PHP e Drupal- Performance ao infinito e além!DrupalCamp SP 2015 -  Escalando PHP e Drupal- Performance ao infinito e além!
DrupalCamp SP 2015 - Escalando PHP e Drupal- Performance ao infinito e além!
 
Escalando php e drupal- performance ao infinito e além! - Drupal camp sp 2015
Escalando php e drupal- performance ao infinito e além! - Drupal camp sp 2015Escalando php e drupal- performance ao infinito e além! - Drupal camp sp 2015
Escalando php e drupal- performance ao infinito e além! - Drupal camp sp 2015
 
Drupal performance and scalability
Drupal performance and scalabilityDrupal performance and scalability
Drupal performance and scalability
 
Introduction to memcached
Introduction to memcachedIntroduction to memcached
Introduction to memcached
 
performance.ppt
performance.pptperformance.ppt
performance.ppt
 
Performance and Scalability
Performance and ScalabilityPerformance and Scalability
Performance and Scalability
 
Escalando PHP e Drupal: performance ao infinito e além! - DrupalCamp SP 2015
Escalando PHP e Drupal: performance ao infinito e além! - DrupalCamp SP 2015Escalando PHP e Drupal: performance ao infinito e além! - DrupalCamp SP 2015
Escalando PHP e Drupal: performance ao infinito e além! - DrupalCamp SP 2015
 
Drupal Performance - SerBenfiquista.com Case Study
Drupal Performance - SerBenfiquista.com Case StudyDrupal Performance - SerBenfiquista.com Case Study
Drupal Performance - SerBenfiquista.com Case Study
 
Scaling PHP apps
Scaling PHP appsScaling PHP apps
Scaling PHP apps
 

Mais de Bryan Ollendyke

Lecture 14 - OER final project
Lecture 14 - OER final projectLecture 14 - OER final project
Lecture 14 - OER final projectBryan Ollendyke
 
Lecture 11 - Web components
Lecture 11 - Web componentsLecture 11 - Web components
Lecture 11 - Web componentsBryan Ollendyke
 
EdTechJoker Spring 2020 - Lecture 10 HAXTheWeb
EdTechJoker Spring 2020 - Lecture 10 HAXTheWebEdTechJoker Spring 2020 - Lecture 10 HAXTheWeb
EdTechJoker Spring 2020 - Lecture 10 HAXTheWebBryan Ollendyke
 
EdTechJoker Spring 2020 - Lecture 8 Drupal again
EdTechJoker Spring 2020 - Lecture 8 Drupal againEdTechJoker Spring 2020 - Lecture 8 Drupal again
EdTechJoker Spring 2020 - Lecture 8 Drupal againBryan Ollendyke
 
EdTechJoker Spring 2020 - Lecture 7 Drupal intro
EdTechJoker Spring 2020 - Lecture 7 Drupal introEdTechJoker Spring 2020 - Lecture 7 Drupal intro
EdTechJoker Spring 2020 - Lecture 7 Drupal introBryan Ollendyke
 
EdTechJoker Spring 2020 - Lecture 6 - WordPress
EdTechJoker Spring 2020 - Lecture 6 -   WordPressEdTechJoker Spring 2020 - Lecture 6 -   WordPress
EdTechJoker Spring 2020 - Lecture 6 - WordPressBryan Ollendyke
 
EdTechJoker Spring 2020 - Lecture 5 grav cms
EdTechJoker Spring 2020 - Lecture 5 grav cmsEdTechJoker Spring 2020 - Lecture 5 grav cms
EdTechJoker Spring 2020 - Lecture 5 grav cmsBryan Ollendyke
 
EdTechJoker Spring 2020 - Lecture 4 - HTML
EdTechJoker Spring 2020 - Lecture 4 - HTMLEdTechJoker Spring 2020 - Lecture 4 - HTML
EdTechJoker Spring 2020 - Lecture 4 - HTMLBryan Ollendyke
 
EdTechJoker Spring 2020 - Lecture 2 - Git
EdTechJoker Spring 2020 - Lecture 2 - GitEdTechJoker Spring 2020 - Lecture 2 - Git
EdTechJoker Spring 2020 - Lecture 2 - GitBryan Ollendyke
 
EdTechJoker Spring 2020 - Lecture 1 - Welcome
EdTechJoker Spring 2020 - Lecture 1 - WelcomeEdTechJoker Spring 2020 - Lecture 1 - Welcome
EdTechJoker Spring 2020 - Lecture 1 - WelcomeBryan Ollendyke
 
Apereo 2018 - NGDLE, OER, Cost reduction, accessibility and decentralization
Apereo 2018 - NGDLE, OER, Cost reduction, accessibility and decentralizationApereo 2018 - NGDLE, OER, Cost reduction, accessibility and decentralization
Apereo 2018 - NGDLE, OER, Cost reduction, accessibility and decentralizationBryan Ollendyke
 
Apereo 2018 - Webcomponents and building a unified authoring experience for a...
Apereo 2018 - Webcomponents and building a unified authoring experience for a...Apereo 2018 - Webcomponents and building a unified authoring experience for a...
Apereo 2018 - Webcomponents and building a unified authoring experience for a...Bryan Ollendyke
 
Apereo 2018 - HAX lightning talk
Apereo 2018 - HAX lightning talkApereo 2018 - HAX lightning talk
Apereo 2018 - HAX lightning talkBryan Ollendyke
 
Apereo 2018 - NGDLE efforts
Apereo 2018 - NGDLE effortsApereo 2018 - NGDLE efforts
Apereo 2018 - NGDLE effortsBryan Ollendyke
 
Apereo 2018 - Polymer training
Apereo 2018 - Polymer trainingApereo 2018 - Polymer training
Apereo 2018 - Polymer trainingBryan Ollendyke
 
Building and Envisioning a Next Generation Digital Learning Environment
Building and Envisioning a Next Generation Digital Learning EnvironmentBuilding and Envisioning a Next Generation Digital Learning Environment
Building and Envisioning a Next Generation Digital Learning EnvironmentBryan Ollendyke
 
History of the web as a platform from 1996 to 2017
History of the web as a platform from 1996 to 2017History of the web as a platform from 1996 to 2017
History of the web as a platform from 1996 to 2017Bryan Ollendyke
 
Rethinking system design
Rethinking system designRethinking system design
Rethinking system designBryan Ollendyke
 

Mais de Bryan Ollendyke (20)

Lecture 14 - OER final project
Lecture 14 - OER final projectLecture 14 - OER final project
Lecture 14 - OER final project
 
Lecture 12 - Docker
Lecture 12 - DockerLecture 12 - Docker
Lecture 12 - Docker
 
Lecture 11 - Web components
Lecture 11 - Web componentsLecture 11 - Web components
Lecture 11 - Web components
 
EdTechJoker Spring 2020 - Lecture 10 HAXTheWeb
EdTechJoker Spring 2020 - Lecture 10 HAXTheWebEdTechJoker Spring 2020 - Lecture 10 HAXTheWeb
EdTechJoker Spring 2020 - Lecture 10 HAXTheWeb
 
EdTechJoker Spring 2020 - Lecture 8 Drupal again
EdTechJoker Spring 2020 - Lecture 8 Drupal againEdTechJoker Spring 2020 - Lecture 8 Drupal again
EdTechJoker Spring 2020 - Lecture 8 Drupal again
 
EdTechJoker Spring 2020 - Lecture 7 Drupal intro
EdTechJoker Spring 2020 - Lecture 7 Drupal introEdTechJoker Spring 2020 - Lecture 7 Drupal intro
EdTechJoker Spring 2020 - Lecture 7 Drupal intro
 
EdTechJoker Spring 2020 - Lecture 6 - WordPress
EdTechJoker Spring 2020 - Lecture 6 -   WordPressEdTechJoker Spring 2020 - Lecture 6 -   WordPress
EdTechJoker Spring 2020 - Lecture 6 - WordPress
 
EdTechJoker Spring 2020 - Lecture 5 grav cms
EdTechJoker Spring 2020 - Lecture 5 grav cmsEdTechJoker Spring 2020 - Lecture 5 grav cms
EdTechJoker Spring 2020 - Lecture 5 grav cms
 
EdTechJoker Spring 2020 - Lecture 4 - HTML
EdTechJoker Spring 2020 - Lecture 4 - HTMLEdTechJoker Spring 2020 - Lecture 4 - HTML
EdTechJoker Spring 2020 - Lecture 4 - HTML
 
EdTechJoker Spring 2020 - Lecture 2 - Git
EdTechJoker Spring 2020 - Lecture 2 - GitEdTechJoker Spring 2020 - Lecture 2 - Git
EdTechJoker Spring 2020 - Lecture 2 - Git
 
EdTechJoker Spring 2020 - Lecture 1 - Welcome
EdTechJoker Spring 2020 - Lecture 1 - WelcomeEdTechJoker Spring 2020 - Lecture 1 - Welcome
EdTechJoker Spring 2020 - Lecture 1 - Welcome
 
Apereo 2018 - NGDLE, OER, Cost reduction, accessibility and decentralization
Apereo 2018 - NGDLE, OER, Cost reduction, accessibility and decentralizationApereo 2018 - NGDLE, OER, Cost reduction, accessibility and decentralization
Apereo 2018 - NGDLE, OER, Cost reduction, accessibility and decentralization
 
Apereo 2018 - Webcomponents and building a unified authoring experience for a...
Apereo 2018 - Webcomponents and building a unified authoring experience for a...Apereo 2018 - Webcomponents and building a unified authoring experience for a...
Apereo 2018 - Webcomponents and building a unified authoring experience for a...
 
Apereo 2018 - HAX lightning talk
Apereo 2018 - HAX lightning talkApereo 2018 - HAX lightning talk
Apereo 2018 - HAX lightning talk
 
Apereo 2018 - NGDLE efforts
Apereo 2018 - NGDLE effortsApereo 2018 - NGDLE efforts
Apereo 2018 - NGDLE efforts
 
Apereo 2018 - Polymer training
Apereo 2018 - Polymer trainingApereo 2018 - Polymer training
Apereo 2018 - Polymer training
 
Building and Envisioning a Next Generation Digital Learning Environment
Building and Envisioning a Next Generation Digital Learning EnvironmentBuilding and Envisioning a Next Generation Digital Learning Environment
Building and Envisioning a Next Generation Digital Learning Environment
 
History of the web as a platform from 1996 to 2017
History of the web as a platform from 1996 to 2017History of the web as a platform from 1996 to 2017
History of the web as a platform from 1996 to 2017
 
NGDLE (2016 version)
NGDLE (2016 version)NGDLE (2016 version)
NGDLE (2016 version)
 
Rethinking system design
Rethinking system designRethinking system design
Rethinking system design
 

Último

Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Miguel Araújo
 
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
 
Breaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path MountBreaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path MountPuma Security, LLC
 
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...Igalia
 
Automating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps ScriptAutomating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps Scriptwesley chun
 
Real Time Object Detection Using Open CV
Real Time Object Detection Using Open CVReal Time Object Detection Using Open CV
Real Time Object Detection Using Open CVKhem
 
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationFrom Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationSafe Software
 
08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking MenDelhi Call girls
 
A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)Gabriella Davis
 
Understanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdfUnderstanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdfUK Journal
 
[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdfhans926745
 
GenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationGenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationMichael W. Hawkins
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerThousandEyes
 
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
 
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking MenDelhi Call girls
 
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdfThe Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdfEnterprise Knowledge
 
Scaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationScaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationRadu Cotescu
 
The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024Rafal Los
 
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law DevelopmentsTrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law DevelopmentsTrustArc
 
🐬 The future of MySQL is Postgres 🐘
🐬  The future of MySQL is Postgres   🐘🐬  The future of MySQL is Postgres   🐘
🐬 The future of MySQL is Postgres 🐘RTylerCroy
 

Último (20)

Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
 
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
 
Breaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path MountBreaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path Mount
 
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
 
Automating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps ScriptAutomating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps Script
 
Real Time Object Detection Using Open CV
Real Time Object Detection Using Open CVReal Time Object Detection Using Open CV
Real Time Object Detection Using Open CV
 
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationFrom Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
 
08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men
 
A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)
 
Understanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdfUnderstanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdf
 
[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf
 
GenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationGenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day Presentation
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected Worker
 
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
 
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
 
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdfThe Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
 
Scaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationScaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organization
 
The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024
 
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law DevelopmentsTrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
 
🐬 The future of MySQL is Postgres 🐘
🐬  The future of MySQL is Postgres   🐘🐬  The future of MySQL is Postgres   🐘
🐬 The future of MySQL is Postgres 🐘
 

Pure Speed Drupal 4 Gov talk

  • 1. #PureSpeed elmsln.org @btopro Come get sticker like this one In dribs and drabs we will change the world
  • 2. Project Lead ELMS Initiative Instructional Systems Architect E-Learning Institute College of Arts & Architecture Penn State University @btopro (aka Bryan Ollendyke)
  • 4. #purespeed • Tools to identify problems / needs • General Server Optimization • Drupal 7/8 Optimization • Fixing common front-end delivery issues
  • 5. Free / Local digging • Drupal.org/project/devel • Enable and set to display results of queries / memory usage • Hack Core • Throw a dpm() into module_invoke_all (includes/module.inc in D7) • https://drupal.psu.edu/blog/post/memory-profiling-hooks • XH-Prof • https://www.drupal.org/project/xhprof • Stand alone php profiler w/ drupal integration
  • 6. Big Data • Ability to trace errors deeply • Drupal specific breakdowns • Example • https://www.drupal.org/node/2370309#comment-10368929
  • 7. Server: Apache FPM • Switch from mod_php processing to FPM • yum install php5-fpm • Obviously more to it then that but worth exploring • https://github.com/bradallenfisher/php56-fpm-centos7-mysql56
  • 8. Server: PHP • PHP -- /etc/php.ini or /etc/php5/fpm/php.ini • Zend Opcache -- /etc/php.d/opcache.ini or /etc/php5/mods-available/opcache.ini • APC/u - /etc/php.d/apc.ini or /etc/php5/mods-available/apcu.ini • https://drupal.psu.edu/blog/post/purespeed-php-tuning • Cache code files in memory • Otherwise memory used to deliver insane! • PHP 5.5+ use Zend OpCache • APCu if you want as cache backend • PHP < 5.4 use APC • user bin for backend builtin • Biggest deal in mcarper’s opinion • realpath_cache_size = 1M • realpath_cache_ttl = 3600
  • 9. Server: MySQL • MySQL - /etc/my.cnf • Most common issue: • max-allowed-packet = 32M • Disable caching engine (counter intuitive but Drupal makes this worthless) • Ensure innodb table encoding, and tuned • Drupal Contrib: • APDQC – drupal.org/project/apdqc • Replacement for Core mysql cache bin engine • Eliminates deadlocks • Gives report on how to further optimize your server • Use other alternate cache backends (so mysql does less)
  • 10. Drupal: Cache bin management • Cache Bin Management • https://drupal.psu.edu/blog/post/purespeed-cache-bin-backends • Popular options • Apc user bin – great for things that don’t change • Fast, cheap and easy for anyone (don’t push page cache here!) • Filecache – writ to file system for cache data • Great, cheap and easy if on SSD • Memcache –popular in distributed / complex setups • Reddis – similar to memcache, newer and more popular now • Both great but usually you want this on its own server / more complicated • Apdqc – replacement for mysql core cache bin mechanism • Run on any site
  • 11. Drupal: Cache bin WARNING • Make sure file paths are correct! • WSOD • cache_form CAN NOT live in bins • All page form submission breaks • APC fragmentation • Restart apache on interval • APDQC recommendations • Some involve mysql upgrades • Semephor / session replacements can cause issues
  • 12. Drupal / Server • httprl_spider - https://www.drupal.org/project/httprl_spider • xmlrpc_page_load - https://www.drupal.org/project/xmlrpc_page_load • Usage: • drush @site hss node (request all nodes on site, as anonymous) • drush @site hss node –xmlrpcuid=1 (all nodes on site, “as user 1”) • Great for seeding anonymous/auth’ed user page caches • Stuff in a crontab nightly after cron (so caches are cleared out) • vi /etc/crontab * 4 * * * root drush @mysite cron 15 4 * * * root drush @mysite hss
  • 13. Server: Varnish • Varnish - /etc/varnish/default.vcl • yum install varnish • Reverse Proxy that sits in front of apache • Listen on 80; move apache to port 8080 • must have for anonymous traffic / high scale • Can’t handle HTTPS (without 4.x + plugin) • Nginx • More performant then stock apache but leess support • useful reverse proxy for HTTPS if not running outright
  • 14. Drupal 7 - entitycache • https://www.drupal.org/project/entitycache • Core in drupal 8.x.x! • Caches entity / object definitions (basically required for field collections) • Turn it on, that’s it!
  • 15. Drupal 7 - APDQC • Covered earlier • Install, read README and status page • Fix issues it reports • Faster site with less time spent in mysql calls
  • 16. Drupal 7 & 8 - advagg • Drupal.org/project/advagg • Covered earlier • Should be on every site you do • Biggest gains in compression, bundler, async font loader and pushing js to footer • Great for improving perception of page load • Beware of bricking JS though
  • 17. Drupal - HTTPRL • Drupal.org/project/httprl • Threading capable • Allows for queuing background threads and non-blocking calls • Similar to Guzzle (D8 core) • Makes certain projects faster (like advagg) • *Can be a bit of a troublemaker • https://drupal.psu.edu/blog/post/bench-marking-non-blocking-httprl-vs- drupalhttprequest • https://drupal.psu.edu/blog/post/core-caching-and-drupalstatic-make-cached- drupalhttprequests
  • 18. Drupal - APC • drupal.org/project/apc -Exposes APC user bin as a cache backend • Beware of fragmentation • Can’t be used in a distributed / clustered deployment (use memecache / reddis) $conf['cache_backends'][] = 'sites/all/modules/apc/drupal_apc_cache.inc'; $conf['cache_class_cache'] = 'DrupalAPCCache'; $conf['cache_class_cache_admin_menu'] = 'DrupalAPCCache'; $conf['cache_class_cache_block'] = 'DrupalAPCCache'; $conf['cache_class_cache_bootstrap'] = 'DrupalAPCCache'; $conf['cache_class_cache_entity_file'] = 'DrupalAPCCache'; $conf['cache_class_cache_field'] = 'DrupalAPCCache'; $conf['cache_class_cache_menu'] = 'DrupalAPCCache'; $conf['cache_class_cache_libraries'] = 'DrupalAPCCache'; $conf['cache_class_cache_token'] = 'DrupalAPCCache'; $conf['cache_class_cache_views'] = 'DrupalAPCCache'; $conf['cache_class_cache_path_breadcrumbs'] = 'DrupalAPCCache'; $conf['cache_class_cache_path'] = 'DrupalAPCCache'; $conf['cache_class_cache_book'] = 'DrupalAPCCache’;
  • 19. Drupal 7 - Authcache • drupal.org/project/authcache • Aggressive caching methods for authenticated users • Great when granularity of access is per role • Caches per combination of roles (handles anonymous too) • Can cache admin, not recommended • Need to modify settings.php / authcache.php in Drupal root • https://github.com/elmsln/elmsln/blob/master/core/dslmcode/shared/drupal- 7.x/modules/ulmus/authcache/modules/authcache_p13n/safe_frontcontroller/au thcache.php
  • 20. Drupal 8 - BigPipe • Core in 8.1.x+ • Delivers parts of the page that take more time by loading the static stuff by itself, to load SOMETHING • Then additional JS based calls inject the slower parts of the page build
  • 21. Drupal 8 - Refreshless • https://www.drupal.org/project/refreshless • Similar to the Turbo Links, a technique from Rails • Page never actually reloads, it just calls in the background for parts of page • Similar to loading items on github.com (click between links and see!)
  • 22. The dreaded inherited site • ELMSLN stack • Someone screwed stuff up! • Identify issues • Win
  • 24. Front end performance • Yslow • Firefox / Chrome plugin by Yahoo
  • 25. Front end performance • PageSpeed • Chrome, right click -> inspect element -> Audits • Select Reload page and Audit on Load -> Run
  • 26. Front end performance • Webpagetest.org
  • 27. Asset Delivery • Deliver assets logically • Etags that make sense • Expire headers that make sense (far in the future for static assets) • Logical headers = less requests on future page loads • Which makes Apache happy • Your users happy!
  • 28. Server: Apache • Compression – send less w/ the same result • Etags – strip off so validation of resource match happens • Expires headers – ensure static assets are kept far into the future • Keep Alive – create less apache workers by keeping them open longer • MaxClients – set appropriately or server will die • memory per page / (RAM – other services) = MaxClients • Cheating – zzz_performance.conf • Drop in performance gain for almost any drupal / apache site • https://github.com/elmsln/elmsln/blob/master/scripts/server/zzz_performance.conf
  • 29. JS / CSS blocking • AdvAgg • https://www.drupal.org/project/advagg • Turn on modify and bundler sub-modules • Push for 2 groupings of css / js on bundler settings page • Modifier • Basically check everything that doesn’t sound evil • Use modify to push js into the bottom of the page • Careful, JS needs to be well formed! • Experimental! • Use javascript to load CSS • It’s in the bottom of the advagg modifier settings
  • 30. Fixing CDN category • All systems complain about CDN till you define what CDN is! • Ways to fix • Buy a legit CDN and pay a lot of money • Install https://www.drupal.org/project/cdn (illegitimate CDN) • Use settings in jquery_update module to deliver from Google / Microsoft • If on bootstrap, select CDN for code source • Use https://www.google.com/fonts for custom font CSS instead of local
  • 31. Make less requests • AdvAgg / aggregate CSS/JS files can help • https://www.drupal.org/project/advagg • Convert small images to sprites or “data” objects • https://www.drupal.org/project/css_emimage • Good luck though.. • You’re using a modular CMS / framework!