Your SlideShare is downloading. ×
Speeding up your Drupal site
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

Speeding up your Drupal site

2,196
views

Published on

Presentation given on August 15, 2010 at Wiredcraft's office about Drupal Optimization

Presentation given on August 15, 2010 at Wiredcraft's office about Drupal Optimization

Published in: Technology

1 Comment
1 Like
Statistics
Notes
No Downloads
Views
Total Views
2,196
On Slideshare
0
From Embeds
0
Number of Embeds
1
Actions
Shares
0
Downloads
28
Comments
1
Likes
1
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. Speeding up your Drupal site by Ronan Berder (Wiredcraft, Managing Director)
  • 2. The why and the what
    • Front end
      • Deliver content to users quickly
      • Optimize use of network
    • Back end
      • Quickly generate content
      • Optimize server resources
  • 3. Some guidelines
    • Keep things simple; add complexity incrementally
    • Scale vertically and then horizontally ONLY IF NEEDED
    • Most important: users, not system administrators
    • Optimizing your code is a huge part of the equation
  • 4. Identifying your bottlenecks
    • Get familiar with shell; uptime, netstat, ps aux,
    • Problem: Network? Disk? CPU? Memory?
    • Source: Web server? App server? DB?
    • Caching is not the “Blue Powder”, caching adds complexity
    • For the long run, you'll need monitoring; Zabbix, Cacti, Nagios...
  • 5. Optimizing your Web server
    • The basics;
      • Remove unnecessary modules
      • Clean up your configuration; MPM, MaxClients, MaxRequestsPerChild, KeepAlive...
    • There are alternatives; Lighttpd, NGINX
    • Stress test (Apache Benchmark)
  • 6. Optimizing your Application server
    • As usual, clean up your configuration
    • Add opcode; APC, Xcache, eAccelerator
    • FastCGI; PHP-FPM and PHP-FCGI
  • 7. Optimizing your Database server
    • As usual, clean up your configuration
    • Check for slow queries
    • Add caching; Memcached
    • Scale horizontally; Master/Slave replication
    • You'll probably want to look into Cacherouter and Pressflow
  • 8. What is Pressflow
    • Patched version of Drupal
    • Runs Drupal.org
    • Only works with PHP5 and MySQL
    • Works with M/S replication and reverse-proxy
  • 9. Adding more caching
    • Reverse proxy; usually Varnish
    • File caching; Boost
    • Block caching; Block Cache Alter
    • ....
    • Be aware that authenticated caching is much more complex
  • 10. The real big thing
    • Caching is fine, but people tend to forget the biggest bottleneck: the code
      • Too many modules (feature creep)
      • Poor code, slow queries
      • “Bad” modules (usually results from “bad” engineering)
    • Code profiling; xdebug, xhprof
  • 11. Dealing with the situation
    • Get things under control;
      • Quick wins; Opcode, Memcached
      • Cleanup your configuration
      • Cache anonymous traffic (Boost)
    • Clean up the mess
    • Take things form there
  • 12. Next step; front end
    • Complete other topic, but many things you can consider; CSS/JS aggregation, parallelization, CDN, Gzip compression, sprites, image optimization...
    • Guess what; code is also a big deal here. Optimize!
  • 13. Thank you! Now, questions?