Your SlideShare is downloading. ×
0
Drupal performance
Drupal performance
Drupal performance
Drupal performance
Drupal performance
Drupal performance
Drupal performance
Drupal performance
Drupal performance
Drupal performance
Drupal performance
Drupal performance
Drupal performance
Drupal performance
Upcoming SlideShare
Loading in...5
×

Thanks for flagging this SlideShare!

Oops! An error has occurred.

×
Saving this for later? Get the SlideShare app to save on your phone or tablet. Read anywhere, anytime – even offline.
Text the download link to your phone
Standard text messaging rates apply

Drupal performance

622

Published on

Published in: Technology
0 Comments
5 Likes
Statistics
Notes
  • Be the first to comment

No Downloads
Views
Total Views
622
On Slideshare
0
From Embeds
0
Number of Embeds
1
Actions
Shares
0
Downloads
6
Comments
0
Likes
5
Embeds 0
No embeds

Report content
Flagged as inappropriate Flag as inappropriate
Flag as inappropriate

Select your reason for flagging this presentation as inappropriate.

Cancel
No notes for slide

Transcript

  • 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. http://drupalwatchdog.com/1/1/many-layers-caching-drupal
  • 4. Before We Begin...● Apache bench / Siege / Jmeter● Yslow & Firebug (FF extension)● Developer Tools (Chrome extension)● Pingdom.com● 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 mysqltuner.pl
  • 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.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
  • 14. Q&AThis presentation is collaborative work of:● Arradi Nur Rizal (arradi.nur.rizal@wunderkraut.com)● Joe Chin (joe@techknowjoe.com)● SJ (sj@pixelonion.com)

×