12 Tips to Drupal Website Performance

3,378 views

Published on

Is your Drupal website overweight, sluggish,
unresponsive, prone to slowdowns?
Don’t wait to hear about it from someone else.
Whip your website into shape now with these
12 performance-enhancing tips for developers.
This best-practice fitness regimen for a high-
performing website takes a few minutes.
It’s only a fraction of the time you’d spend troubleshooting.

Published in: Technology

12 Tips to Drupal Website Performance

  1. 1. 12 TIPS TO GET YOUR DRUPAL WEBSITE RUNNING AT ITS ABSOLUTE BEST
  2. 2. HEY DRUPAL DEVELOPERS, Is your website overweight, sluggish, unresponsive, prone to slowdowns? Don’t wait to hear about it from someone else. Whip your website into shape now with these 12 performance-enhancing tips for developers. This best-practice fitness regimen for a highperforming website takes a few minutes. It’s only a fraction of the time you’d spend troubleshooting. VARNISH
  3. 3. 1. Optimize your Drupal caching settings and aggregate your CSS and JS DO THIS NOW IF… Your site has slow browser load times. Want to give users a dynamic experience—without CSS JS heavy backend usage? Configure your caching settings. Whether you’re on Drupal 7 or Drupal 6, you’ll want to configure your Minimum Cache Lifetime, Expiration of Cached Pages and Bandwidth Optimization. Do it right, and get a super-fast, super-light site. Don’t forget to optimize CSS and JavaScript files to significantly speed up browser-render time. QUICKSTART: There’s a dashboard for that. See if you need to optimize your caching on Pantheon’s Launch Check page. http://getpantheon.com 12 TIPS TO GET YOUR DRUPAL WEBSITE RUNNING AT ITS ABSOLUTE BEST 3
  4. 4. 2. Use Redis as a caching backend and watch your site run unencumbered DO THIS NOW IF… You’ve got downtime and timeouts from database resource contention. When you use Redis as a drop-in replacement for caching, you limit database operations to actual data. This reduces overhead and improves performance. Redis is optimized for high performance storage and retrieval. Installation is fast. QUICKSTART: Use Pantheon, which offers Redis as a service on most plans. 12 TIPS TO GET YOUR DRUPAL WEBSITE RUNNING AT ITS ABSOLUTE BEST 4
  5. 5. 3. Enable New Relic to monitor your site performance and alert you when things go awry DO THIS NOW IF… You hate looking through log files to pinpoint bottlenecks and bugs. New Relic gives you a real-time look into the performance of your web application. QUICKSTART: Enable New Relic on Pantheon, and you’ll also accelerate your support process. Now the support team can visualize corresponding performance and symptoms. 12 TIPS TO GET YOUR DRUPAL WEBSITE RUNNING AT ITS ABSOLUTE BEST 5
  6. 6. 4. Make sure Varnish is caching your site DO THIS NOW IF… You have downtime, probably from increased load on backend systems. Varnish is an HTTP accelerator that quickly serves both static content and anonymous pages for sites on Pantheon. Varnish serves data from virtual memory. That means a response is returned without accessing the application server. This frees DROP workers to build more dynamic requests. Each Varnish server can handle millions of requests per minute. Drupal alone can’t do that. Varnish can also improve the availability of your site. For example, if a PHP fatal error breaks your site, anonymous page requests can VARNISH still be served by Varnish and end-users won’t realize something is wrong. QUICKSTART: See if Varnish is caching your site on Pantheon’s Launch Check page. http://getpantheon.com 12 TIPS TO GET YOUR DRUPAL WEBSITE RUNNING AT ITS ABSOLUTE BEST 6
  7. 7. 5. Check your watchdog logs for PHP notices and warnings, and fix them pronto DO THIS NOW IF… You want to avoid system failure. PHP Exceptions are errors, and some can cause a site crash. Any PHP error—even a notice—will drastically reduce the speed of PHP execution. Drupal logs exceptions to Watchdog, so check your watchdog logs and fix any PHP notices and warnings you receive. QUICKSTART: See if your watchdog logs have any PHP notices and warnings on Pantheon’s Launch Check page. http://getpantheon.com 12 TIPS TO GET YOUR DRUPAL WEBSITE RUNNING AT ITS ABSOLUTE BEST 7
  8. 8. 6. Make sure you’re using the latest version of Drupal core DO THIS NOW IF… Your site is less stable because it’s missing critical patches, performance updates, and security settings. Drupal Core is constantly being updated. Most updates fix bugs and security issues that keep your website from performing at its best. QUICKSTART: Use Pantheon, which makes it a no-brainer to keep your site optimized by keeping your core up to date. Most updates don’t require any code or configuration changes. 12 TIPS TO GET YOUR DRUPAL WEBSITE RUNNING AT ITS ABSOLUTE BEST 8
  9. 9. 7. Make sure you have backups configured on your site so you can sleep well at night. DO THIS NOW IF… You’re afraid of permanent data loss and extended downtime. In case of emergency, you want the ability to restore to your backup with one click. QUICKSTART: Use Pantheon, which makes environment backups a simple, one-click operation. An environment backup consists of a database backup, a files backup, and a code backup. See if your backups are configured on Pantheon’s Launch Check page. http://getpantheon.com 12 TIPS TO GET YOUR DRUPAL WEBSITE RUNNING AT ITS ABSOLUTE BEST 9
  10. 10. 8. Make sure your Views caching settings are logical DO THIS NOW IF… Your website has slow response times. You may have noticed increased demand on backend resources like your database and application server. Not every module uses Drupal’s caching out-of-the-box. When you need a granular caching system, look closely at your Views. You’ll see a big bump in site performance when your Query results caching, Rendering output caching, and Block caching are configured properly. QUICKSTART: Launch Check shows you any problems with your Views Caching settings. http://getpantheon.com 12 TIPS TO GET YOUR DRUPAL WEBSITE RUNNING AT ITS ABSOLUTE BEST 10
  11. 11. 9. Try performing dashboard operations from the terminal to save time DO THIS NOW IF… You’ve got a large team with a complex development process. If you want to save time, you can use Terminus to perform and script dashboard operations in the same way that you would through the website. QUICKSTART: Launch Check shows you any problems with your Views Caching settings. http://getpantheon.com 12 TIPS TO GET YOUR DRUPAL WEBSITE RUNNING AT ITS ABSOLUTE BEST 11
  12. 12. 10. Use a CDN DO THIS NOW IF… You have slow load times and bottlenecks, usually due to higher HTTP round-trip times for your assets. A Content Delivery Network quickly delivers content using a mix of caching, advanced seek/indexing technology, and multiple synchronized origins across a geographic area. By minimizing physical latency and allowing quick, smart retrieval of assets from a localized cache, delivery CDN time can be greatly improved. • nsures your data is distributed across multiple E data centers • ffers clear usage analytics (better forecasting O and planning) • mproves response times (Edge locations closer I to users) • Handles traffic surges • Offers browser caching for static assets 12 TIPS TO GET YOUR DRUPAL WEBSITE RUNNING AT ITS ABSOLUTE BEST 12
  13. 13. 11. Don’t forget to QA DO THIS NOW IF… You’ve ever introduced a new bug in production. Does your site look and work great on your desktop, but load like a dial-up on your smartphone? QUICKSTART: Here are two free, highly recommended services to help you optimize your site across all browsers, operating systems and smartphone/tablet devices: • Saucelabs https://saucelabs.com/ • Selenium tests - An example of implementation Q A 12 TIPS TO GET YOUR DRUPAL WEBSITE RUNNING AT ITS ABSOLUTE BEST 13
  14. 14. 12. Load test your expected peak traffic DO THIS NOW IF… You’re getting ready to launch a website, and don’t want to fail. Don’t know how your application will perform under various loads and peak traffic? Get ready for downtime and failed campaigns. Load testing allows you to plan for the expected traffic—and for success. QUICKSTART: Enable New Relic to monitor internal execution performance. You don’t need any additional modules or tools. Next, make sure you have access to a command-line environment, preferably with administrative privileges. Finally, only load test on the Live environment. Test for both performance and scalability. 12 TIPS TO GET YOUR DRUPAL WEBSITE RUNNING AT ITS ABSOLUTE BEST 14
  15. 15. VARNISH DON’T LET YOUR WEBSITE BE A COUCH POTATO. Hold your website accountable to highest performance standards. Give it the best-practice treatment from day one at http://getpantheon.com. It’s always free in development. LEARN MORE

×