2 min read

Maximising Confluence cache effectiveness

A
Adaptavist
Thu, 21 Aug 2014
Maximising Confluence cache effectiveness

Maximising Confluence cache effectiveness

Fine-tuning your cache management is often a trade-off between performance and memory usage. These hints and tips thing I wish I'd known when I started working with Confluence will show you how to achieve optimum efficiency.

The beauty of caches

Even in a simplified version of Confluence architecture, there are many stages between a user requesting access to a page and the page actually appearing in front of them. Maximising your Confluence cache effectiveness is a matter of understanding the separate levels of caching:

  1. the user accesses the webpage via a browser
  2. this request goes through the internet, firewall and reverse proxy and hits Confluence
  3. Confluence communicates with the database and storage media
  4. the information is passed back through the whole chain again and is displayed

This process can take ages particularly if you're loading a large amount of content. Caches are wonderful little components which allow the storage of data you've previously accessed in small reserves along the way, so that the next time you request it, your request doesn't have to travel through each stage.

Where are your caches?

There are three main points at which the responses to data requests can be cached:

  1. Your browser - browser caches are particularly useful for static content like CSS, Java Script and images
  2. The reverse proxy - once again, this saves Confluence from handling the workload of static content
  3. In Confluence itself - storing information in memory saves Confluence the laborious task of searching the database and file system for each request

Maximising caching potential at each of these levels can reduce your application workload tremendously, resulting in a serious performance boost.

Tuning your caches

Confluence provides your cache usage statistics with the Cache Statistics page within the admin user interface. Make sure you select the advanced display, as it provides a lot more information. The goal here is to increase the size of the correct caches, which you can do based on the following priorities (in order of importance). Look for caches that:

  1. are 100% used
  2. have a high number of hits and misses
  3. are not 100% effective
  4. are not too large

Once you’ve identified your target caches, you should increase their size. However, be careful here try to avoid large caches as they will drain your memory exceptionally fast. The database queries cache is a prime example of one which will run out of memory well before it's tuned by this definition.

Finally, aim to keep the size of the cache larger than the number of content objects e.g. attachments, content, comments, groups, spaces and users.

Did you find this post useful? Stay tuned in to our blog for more hints and tips.

For information on how Adaptavist can maximise your investment and performance with Atlassian applications, contact us to discuss your needs.


Stay up to date by signing up for monthly Adaptanews