This site is archived.

Caching and performance improvements

killes's picture
Submitted by killes on Thu, 07/24/2008 - 23:25.

Session recording

Attached files

Placement
Session time: 
08/28/2008 - 15:00 - 08/28/2008 - 15:45
Conference booklet summary and bio
Article for conference booklet: 
We all know the phenomenon: Your unimportant website was just mentioned on ./ and all of a sudden you have many more visitors. Drupal websites where renowned early on (read: Drupal 3.0) that they were able to withstand such an "attack" quite easily. The reason for this is the page cache which will deliver anonymous visitors the pre-rendered webpage directly from the database. This feature made Drupal quite popular early on and sites such as kerneltrap.org switched to Drupal because of it. Unfortunately, the page cache doesn't work well if you have a very active site that gets new content every minute since each new node or comment will invalidate all the precious cached pages. Also, authenticated users don't get the benefits of the page cache since their pages are usually different for each user. There are many more caches in Drupal: filters, menus, forms (Drupal 6), blocks (Drupal 6). Also, contributed modules also cache various bits and pieces. I want to illustrate the various approaches that the different caches take for storing and removing items, I also want to discuss possible improvements to these caches. Further, Drupal's cache backend is pluggable, e.g. you can write your own cache.inc and do not use the database for caching, but another external application. Memcached is probably the most well known of these. Caches are not the only way to have your Drupal site run fast, but they are the ones that are implemented in Drupal itself. Other options include PHP opcode caches, MySQL query caches, various proxies, running a special webserver for static content, and tuning of your webserver and database. We want to give a short review of these and suggest use cases for small to medium Drupal sites.
Bios for conference booklet: 
I am a Drupal long time user and contributor, having deployed my first Drupal 3.0 site on the 1st of October 2001. In 2006 I became the maintainer of the Drupal 4.7 release, I am a member of the board of directors of the Drupal association and serve the Drupal community in a number of ways. My main interest has always been to make Drupal run faster.

Overview

I've been asked to give a talk on the specified topic by the track co-chair. Since I am now running large scale Drupal installs for over two years (mainly drupal.org) I have learned a few tips about making your Drupal code run fast and not give your server a hard time which I want to share.

Agenda

* Drupal caching in core
+ Drupal 5
+ Drupal 6
+ Drupal 7
* Mistakes to avoid when programming Drupal
* Tips and tricks.
* Different cache backends.
* Other stuff (basic server config)

Goals

I'd like attendees to gather an understanding for why caching is important and the pitfalls that may occur.

Resources

General familiarity with Drupal is going to be helpful.

ipwa's picture

Great session!

A great article to improve front-end performance: http://wimleers.com/article/improving-drupals-page-loading-performance

A CSS Sprite generator: http://spritegen.website-performance.org/