Your SlideShare is downloading. ×
  • Like
  • Save
Drupal performance
Upcoming SlideShare
Loading in...5

Thanks for flagging this SlideShare!

Oops! An error has occurred.


Now you can save presentations on your phone or tablet

Available for both IPhone and Android

Text the download link to your phone

Standard text messaging rates apply

Drupal performance



Published in Technology
  • Full Name Full Name Comment goes here.
    Are you sure you want to
    Your message goes here
    Be the first to comment
No Downloads


Total Views
On SlideShare
From Embeds
Number of Embeds



Embeds 0

No embeds

Report content

Flagged as inappropriate Flag as inappropriate
Flag as inappropriate

Select your reason for flagging this presentation as inappropriate.

    No notes for slide


  • 1. Drupal PerformanceTools & Measurement (Arradi Nur Rizal) Joe Chin SJ 19 February 2013, Singapore
  • 2. Quick Overview● Drupal as CMS, CMF● What this meetup is about ○ Birds eye vs detailed? ○ Best practices ○ Measurement tools● Open discussion, share & interrupt anytime
  • 3.
  • 4. Before We Begin...● Apache bench / Siege / Jmeter● Yslow & Firebug (FF extension)● Developer Tools (Chrome extension)●● XHProf / devel module● New Relic
  • 5. 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
  • 6. 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
  • 7. 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
  • 8. 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
  • 9. 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
  • 10. Real Advance Stuff!● Separating services ○ web, database, file, search, reverse proxy● Load balancing ○ Web cluster ○ Database master/slave● Database sharding
  • 11. Demo 1 - Benchmarking● Create a worksheet● Measure baseline● Single change, measure, repeat
  • 12. Demo 2 - XHProf● Inclusive - include sub-functions● Exclusive - exclude sub-functions● Sort by Exclusive wall time first
  • 13. Additional Resources●● Drupal 7 books (dev) 5D=38414&version%5B%5D=120&version% 5B%5D=20236&audience%5B%5D=1756● Lullabot / performance-scalability-series
  • 14. Q&AThis presentation is collaborative work of:● Arradi Nur Rizal (● Joe Chin (● SJ (