Whenever you’re ready... Performance & Scalability with Drupal                                     !"#$%&#()
Who the hell is this guy?• I run Wiredcraft (http://wiredcraft.com)• We build (serious) Web and mobile solutions  using Op...
What’s the deal?• Drupal is; • flexible & extensible • slow  as hell• We want to; • deliver the content quickly to the user...
How do we do that?• Analyze the bottleneck• Adapt the back-end and/or front-end• Test• Repeat                             ...
Now a few advices...• Add complexity incrementally• Scale vertically first• Focus on users not system administrators• Optim...
Analyze the bottleneck• Pimp up your shell skills• Problem: Network? Disk? CPU? Memory?• Source: Web server? App server? D...
Web server• Clean up your configuration (MPM,  MaxClients, MaxRequestsPerChild,  KeepAlive...)• Remove unnecessary modules•...
App server• Clean up your configurationand add slow logs if possible• Remove unnecessary modules• Consider switching to CGI...
Database server• Clean up your configuration   and add slow logs• Add caching; Memcache• Switch from MyISAM to InnoDB• Scal...
What is Pressflow?• Patched version of Drupalfor performance purpose• Runs Drupal.org• Only works with PHP5 and MySQL• Supp...
Other optimizations...• Views caching• Block caching (Block Cache Alter module)• Reverse proxy (Varnish) or file caching  (...
And then some more• Authenticated caching; much more complex  (AuthCache module)• More core patches; http://  tag1consulti...
Now the real big thing• The biggest bottleneck: the code• Too many modules (feature creep)• Poor code, slow queries• “Bad”...
Find out the culprit• Slow query logs (MySQL)• Slow script logs (PHP-FPM)• Code Profiling; XHProf, XDebug• Testingthe good ...
Dealing with the situation• Buy some time: • Quick wins; Opcode, Memcache • Switch to NGINX+PHP-FPM • Cleanup your configur...
Next step; front-end• Complete separate topic; • CSS/JS aggregation, • parallelization & CDN, • Gzip compression, • sprite...
Questions?Go easy on me though, I’m sick today...                                          !"#$%&#()
Upcoming SlideShare
Loading in...5
×

Performance and scalability with drupal

7,191

Published on

2 Comments
1 Like
Statistics
Notes
  • Thank you for material! BTW, have you tried Blazemeter Drupal Module? It allows to do performance testing from administration panel?
    What do you think about it?
    http://community.blazemeter.com/knowledgebase/articles/73566-blazemeter-drupal-module
       Reply 
    Are you sure you want to  Yes  No
    Your message goes here
  • I've created a module for front end performance. http://drupal.org/project/advagg Let me know if you've found a good option for image sprites in Drupal; I'll add in support for it in advagg.
       Reply 
    Are you sure you want to  Yes  No
    Your message goes here
No Downloads
Views
Total Views
7,191
On Slideshare
0
From Embeds
0
Number of Embeds
3
Actions
Shares
0
Downloads
36
Comments
2
Likes
1
Embeds 0
No embeds

No notes for slide
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • Performance and scalability with drupal

    1. 1. Whenever you’re ready... Performance & Scalability with Drupal !"#$%&#()
    2. 2. Who the hell is this guy?• I run Wiredcraft (http://wiredcraft.com)• We build (serious) Web and mobile solutions using Open Source technologies• We work with the United Nations, CNN, Nvidia... !"#$%&#()
    3. 3. What’s the deal?• Drupal is; • flexible & extensible • slow as hell• We want to; • deliver the content quickly to the user • optimize the use of backend resources !"#$%&#()
    4. 4. How do we do that?• Analyze the bottleneck• Adapt the back-end and/or front-end• Test• Repeat !"#$%&#()
    5. 5. Now a few advices...• Add complexity incrementally• Scale vertically first• Focus on users not system administrators• Optimizing your code is a huge part of the equation !"#$%&#()
    6. 6. Analyze the bottleneck• Pimp up your shell skills• Problem: Network? Disk? CPU? Memory?• Source: Web server? App server? DB?• Caching is not magic; it adds complexity• For the long run, consider monitoring; Zabbix, Cacti, Nagios, Munin... !"#$%&#()
    7. 7. Web server• Clean up your configuration (MPM, MaxClients, MaxRequestsPerChild, KeepAlive...)• Remove unnecessary modules• Consider switching to NGINX• Stress test (Apache Benchmark)• Scale horizontally; load balancer (HAproxy) !"#$%&#()
    8. 8. App server• Clean up your configurationand add slow logs if possible• Remove unnecessary modules• Consider switching to CGI; PHP-FPM or FastCGI• Add an opcode; XCache, eAccelerator or APC !"#$%&#()
    9. 9. Database server• Clean up your configuration and add slow logs• Add caching; Memcache• Switch from MyISAM to InnoDB• Scale horizontally; Master/Slave replication !"#$%&#()
    10. 10. What is Pressflow?• Patched version of Drupalfor performance purpose• Runs Drupal.org• Only works with PHP5 and MySQL• Supports M/S replication and reverse-proxy !"#$%&#()
    11. 11. Other optimizations...• Views caching• Block caching (Block Cache Alter module)• Reverse proxy (Varnish) or file caching (Boost)• Add a full text search engine; Solr, Sphinx, Elastic Search... Plenty of modules; Search API module, Searchlight... !"#$%&#()
    12. 12. And then some more• Authenticated caching; much more complex (AuthCache module)• More core patches; http:// tag1consulting.com/patches• Denormalize your tables (Materialized View API) if you’re on fire !"#$%&#()
    13. 13. Now the real big thing• The biggest bottleneck: the code• Too many modules (feature creep)• Poor code, slow queries• “Bad” modules usually results from “bad” engineering !"#$%&#()
    14. 14. Find out the culprit• Slow query logs (MySQL)• Slow script logs (PHP-FPM)• Code Profiling; XHProf, XDebug• Testingthe good old “disable and load the page” !"#$%&#()
    15. 15. Dealing with the situation• Buy some time: • Quick wins; Opcode, Memcache • Switch to NGINX+PHP-FPM • Cleanup your configuration • Cache anonymous traffic (Boost or Varnish)• Clean up the mess !"#$%&#()
    16. 16. Next step; front-end• Complete separate topic; • CSS/JS aggregation, • parallelization & CDN, • Gzip compression, • sprites & image optimization...• Code also matters here: optimize! !"#$%&#()
    17. 17. Questions?Go easy on me though, I’m sick today... !"#$%&#()
    1. A particular slide catching your eye?

      Clipping is a handy way to collect important slides you want to go back to later.

    ×