This page last changed on Dec 01, 2008 by pfragemann.

Like any server application, Confluence may require some tuning as it is put under heavier use. We do our best to make sure Confluence performs well under a wide variety of circumstances, but there's no single configuration that is best for everyone's environment and usage patterns.

If you are having problems with the performance of Confluence and need our help resolving them, you should read this document: Requesting Performance Support

General hints

Use the latest versions of your application servers and Java runtime environments. Newer versions are usually better optimized for performance. As an example, our internal performance tests show a 20% speed-up (when viewing pages under load) between Tomcat 6 on Java 6 vs Tomcat 5.5 on Java 5.

Troubleshoot possible memory leaks

The Troubleshooting Confluence Hanging or Crashing guide is a good place to start. Some of the known causes listed there could result in performance issues short of a crash or hang.

Performance Testing

Learn about how to test performance issues using the Performance Testing Scripts.

Antivirus Software

Antivirus software greatly decreases the performance of Confluence. Antivirus software that intercepts access to the hard disk is particularly detrimental, and may even cause errors with Confluence. You should configure your antivirus software to ignore the Confluence home directory, its index directory and any database-related directories.

Access logs

You can find out which pages are slow and which users are accessing them by enabling Confluence's built-in access logging.

Built-in Profiler

You can identify the cause of page delays using Confluence's built-in profiler according to Troubleshooting Slow Performance Using Page Request Profiling.

Enabling HTTP Compression

If bandwidth is responsible for bottlenecking in your Confluence installation, you should consider enabling HTTP compression. This may also be useful when running an external facing instance to reduce your bandwidth costs.
Take note of the known issues with HTTP compression in versions of Confluence prior to 2.8, which may result in high memory consumption.

Choice of Database

The embedded database that is provided with Confluence is meant only to be used for evaluation, or for low-volume Confluence sites. Once your site grows, you will almost certainly need to switch to an external relational database management system. Beyond this, we do not recommend any particular RDBMS over another. We recommend using what you are familiar with, because your ability to maintain the database will probably make far more difference to what you get out of it than the choice of database itself.

Database Connection Pool

If load on Confluence is high, you may need more simultaneous connections to the database.

  • If you are using JNDI data-sources, you will do this in your application server's configuration files.
  • If you have configured Confluence to access the database directly, you will need to manually edit the hibernate.c3p0.max_size property in the confluence.cfg.xml file in your confluence.home directory. After you have changed the URL in this file, restart Confluence.

To assess whether you need to tune your database connection pool, take thread dumps during different times (including peak usage). Inspect how many threads have concurrent database connections.

Database Indexes

If Confluence is running slowly, the most likely cause is that there is some kind of bottleneck in the database.

If you have the luxury of access to a DBA, it would be worthwhile having them tune the database specifically to the demands that your particular Confluence installation is placing on it. If you do not have a DBA, you may want to consult the database indexing advice that we have been gathering from customer reports and our own experience running and developing Confluence. The instructions on that page are for Oracle, but most of the indexes can be applied to (and will help with) any database.

(These database indexes are now created automatically when Confluence is installed, but existing installations upgrading to a more recent version may still need to add them manually)

Cache Tuning

To reduce the load on the database, and speed up many operations, Confluence keeps its own cache of data. Tuning the size of this cache may speed up Confluence (if the caches are too small), or reduce memory (if the caches are too big). Future versions of Confluence will allow you to tune the size of this cache from within the web application. Vote for tuning the cache from the UI and getting cache recommendations to encourage Atlassian to build this feature into a Confluence release.

Please have a look at our documentation on Cache Performance Tuning for information on how to tune Confluence caches.

Adjust Application Server Memory Settings

See Managing Application Server Memory Settings.

Use A Web Server

For high-load environments, performance can be improved by using a web server such as Apache in front of the application server. There is a configuration guide to Running Confluence behind Apache.

When configuring your new web server, make sure you configure sufficient threads/processes to handle the load. This applies to both the web server and the application server connector, which are typically configured separately. If possible, you should enable connection pooling in your web server connections to the application server.

Parallel GC

If you have a large of CPU's on your server you can add -XX:+UseParallelGC to your JAVA_OPTS options. This will allow garbage collection to happen in parallel with the application and can boost performance. For more information please refer to http://java.sun.com/docs/hotspot/gc5.0/gc_tuning_5.html#1.1.%20Types%20of%20Collectors%7Coutline.

RELATED TOPICS

Cache Performance Tuning
Cache Performance Tuning for Specific Problems
Performance Testing Scripts
Working with Confluence Logs
Operating Large or Mission-Critical Confluence Installations
Confluence Clustering Overview
Requesting Performance Support
Administrators Guide
Configuration Guide


Document generated by Confluence on Dec 03, 2008 15:04