High Performance Drupal

13,902
-1

Published on

Presentation from BADCamp 2009 on high performance Drupal: how to make your website fast and scalable.

Published in: Technology
1 Comment
17 Likes
Statistics
Notes
  • This resource will be useful for those who are dealing with Drupal performance and optimization tasks: http://drupalperformanceblog.com
       Reply 
    Are you sure you want to  Yes  No
    Your message goes here
No Downloads
Views
Total Views
13,902
On Slideshare
0
From Embeds
0
Number of Embeds
6
Actions
Shares
0
Downloads
220
Comments
1
Likes
17
Embeds 0
No embeds

No notes for slide

High Performance Drupal

  1. 1. High Performance Drupal Making Your Site Fast Fast Fast
  2. 2. Drupal Is Powerful
  3. 3. Drupal is Slow
  4. 4. Databases are Slow
  5. 5. PHP Is Slow
  6. 6. Consumer-Grade Networks Are Slow
  7. 7. Increasing Speed Means Diving Less Deeply Into The Stack
  8. 8. Fast Is Making Fewer Requests From Faster Sources
  9. 9. The Life Of A Pageload • Browser Request • Browser Cache? • Network Request • Server Response • Associated Assets (back to top)
  10. 10. Optimizing For The Browser • Make Your HTML/CSS Images Efficient • Use CSS/JS Aggregation • Use a CDN • Yslow is good for profiling this
  11. 11. Optimizing Server Response • Reverse Proxy/Drupal Page Cache • PHP OpCode Cache • Drupal System Cache
  12. 12. Reverse-Proxies Are Very Fast
  13. 13. Faster Than Apache
  14. 14. Much Faster Than Drupal
  15. 15. Don’t Bother Your Power Tools With Simple Tasks
  16. 16. Implementing Varnish • Use Pressflow • Implement A Simple VCL Based On Sessions • Enable Aggressive Caching • Enjoy, Experiment, Excel
  17. 17. OpCode Caching Keeps Drupal Loaded In Memory
  18. 18. Don’t Touch The Disk
  19. 19. Don’t Load Up Apache Threads With Copies of Drupal
  20. 20. Implementing APC • The Biggest/Cheapest Win • Install via apt-get, yum, or pecl • Monitor with apc.php • Lots of modules? Bump the SHM size • Enable apc.stat=0 with caution
  21. 21. Drupal Freezes It’s Code Before Launch
  22. 22. Most Real-World Scaling Information Comes After Release
  23. 23. Drupal Supports A Crazy Array Of Use Cases
  24. 24. $5/month Shared Hosting Is Not High Performance
  25. 25. Pressflow • “Pressflow Makes Drupal Scale” • Drop-in Replacement For Core • Backports many Drupal 7 features • PHP 5.x/MySQL 5.x Required • Enables robust reverse-proxy, mysql replication and more • Runs drupal.org and many other high-performance sites
  26. 26. Drupal Has A Cache And That Is Good
  27. 27. But... Drupal’s Cache Is In The Database
  28. 28. And Serialized.
  29. 29. That Works Anywhere, But Is Both Slow and Expensive
  30. 30. CacheRouter • Use settings.php to plug in cacherouter instead of /includes/cache.inc • Pick your poison: APC, XCache, Memcached, Filesystem, or classic db caching. • Change caches per table. • Vital for high-speed logged-in pageloads.
  31. 31. Coming Soon: Advcache • Cache Nodes, Users, Taxonomy Terms and other common objects via cacherouter. • Extends the notion of drupal’s static cache to whole objects. • Still in development, but if you’re into writing patches...
  32. 32. Other Tips • Search is among the slowest and most expensive queries. Use Solr instead. • InnoDB can help with locking in MySQL • Hardware is faster and often more cost effective than code cleanup. • Monitor load and scale ahead of problems.
  33. 33. Benchmarking/Profiling • Cachegrind to profile code. • Jmeter to simulate load. • Slow Query logs, cactai, etc.
  34. 34. Vertical/Horizntal Scaling • Start with all services you need. • Separate services into layers. • Add more servers at each layer as needed. • Shameless plug: Project Mercury: http://getpantheon.com
  35. 35. More Resources • http://groups.drupal.org/high-performance • http://pressflow.org • http://tag1consulting.com • http://2bits.com • http://getpantheon.com
  1. A particular slide catching your eye?

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

×