• Save
Drupal performance
Upcoming SlideShare
Loading in...5
×
 

Drupal performance

on

  • 679 views

 

Statistics

Views

Total Views
679
Views on SlideShare
678
Embed Views
1

Actions

Likes
3
Downloads
6
Comments
0

1 Embed 1

https://twitter.com 1

Accessibility

Categories

Upload Details

Uploaded via as Adobe PDF

Usage Rights

© All Rights Reserved

Report content

Flagged as inappropriate Flag as inappropriate
Flag as inappropriate

Select your reason for flagging this presentation as inappropriate.

Cancel
  • Full Name Full Name Comment goes here.
    Are you sure you want to
    Your message goes here
    Processing…
Post Comment
Edit your comment

Drupal performance Drupal performance Presentation Transcript

  • Drupal PerformanceTools & Measurement (Arradi Nur Rizal) Joe Chin SJ 19 February 2013, Singapore
  • Quick Overview● Drupal as CMS, CMF● What this meetup is about ○ Birds eye vs detailed? ○ Best practices ○ Measurement tools● Open discussion, share & interrupt anytime
  • http://drupalwatchdog.com/1/1/many-layers-caching-drupal
  • Before We Begin...● Apache bench / Siege / Jmeter● Yslow & Firebug (FF extension)● Developer Tools (Chrome extension)● Pingdom.com● XHProf / devel module● New Relic
  • IA / Site Building● might affect performance, but no studies● 3rd party webservices● taxonomy (indexed) vs list fields (text)?● contrib module selection ○ domain_taxonomy, term_reference_tree ○ how to choose?● coding best practices in custom modules (use hook instead of core/contrib hacks, making use of proper caching: drupal_static, ctools caching, proper theming)● target users: anon vs authenticated
  • Easy Peasy Lemon Squeezy!● optimize / compress files locally (images)● aggregate CSS & JS● enable page cache & block cache● disable unnecessary modules (unused or heavy UI: views_ui, ds_ui)● syslog—or no log—instead of dblog● boost (access to .htaccess, or vhosts file)● storage_api, CDN
  • Apache Configurations● Enable mod_expires, mod_deflate● Move directives from .htaccess to host configuration and set AllowOverride None● Set timeout from 300 to 30● Set StartServers, MinSpareServers, MaxSpareServers, MaxClients and MaxRequestsPerChild values● Disable unused modules ie. mod_cgi, mod_ldap
  • MySQL Configurations● Set in my.cnf ○ query_cache_type = 1 ○ query_cache_size = 128M ○ query_cache_limit = 2M● Review with: show status like Qcache_%; ○ Qcache_hits - bigger is better ○ Qcache_lowmem_prunes - smaller is better● Run mysqltuner.pl
  • Additional Services/Modules● Always use OpCode caching - APC● Reverse Proxy - Varnish, Squid, Nginx● Cache storage - Memcache, Redis, Filecache● NoSQL DB - MongoDB● Offload searching to Apache Solr● Substitute Apache for Nginx
  • Real Advance Stuff!● Separating services ○ web, database, file, search, reverse proxy● Load balancing ○ Web cluster ○ Database master/slave● Database sharding
  • Demo 1 - Benchmarking● Create a worksheet● Measure baseline● Single change, measure, repeat
  • Demo 2 - XHProf● Inclusive - include sub-functions● Exclusive - exclude sub-functions● Sort by Exclusive wall time first
  • Additional Resources● drupal.org● Drupal 7 books (dev) http://drupal.org/books?availability%5B% 5D=38414&version%5B%5D=120&version% 5B%5D=20236&audience%5B%5D=1756● Lullabot / drupalize.me http://drupalize.me/series/drupal- performance-scalability-series
  • Q&AThis presentation is collaborative work of:● Arradi Nur Rizal (arradi.nur.rizal@wunderkraut.com)● Joe Chin (joe@techknowjoe.com)● SJ (sj@pixelonion.com)