Documentation for Confluence 2.5.4 - 2.5.8.
Documentation for [Confluence Cloud] and the latest Confluence Server is available too.

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

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.

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.

Antivirus Software

Antivirus Software can greatly decrease the performance of Confluence. Antivirus Software that intercepts all access to the hard disk is particularly detrimental, and may even cause errors with Confluence. If possible configure your software to ignore the Confluence home directory, or at least its index directory.

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 her 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.

In Confluence versions prior to 2.3 cache is entirely configured from the file confluence/WEB-INF/classes/ehcache.xml. In Confluence 2.3 and above cache is Configured in confluence/WEB-INF/classes/confluence-coherence-cache-config.xml (or confluence/WEB-INF/classes/confluence-coherence-cache-config-clustered.xml for clustered versions). More information about cache Coherence configuration can be found on Coherence cache reference.

There is also cache status page provided with Confluence. It is not linked from anywhere in the interface, but administrative users can access it at the url http://your.confluence.install.example.com/admin/cachestatistics.action. This page will show you the size of each cache, and its hit ratio.

Important Caches

  • com.atlassian.confluence.core.ContentEntityObject should be set to at least 20-30% of the number of content entity objects (pages, comments, emails, news items) in your system. To find the number of content entity objects, use the query select count(*) from CONTENT.
  • com.atlassian.confluence.core.ContentEntityObject.bodyContents should be set to at least 20% of the number of content entity objects (pages, comments, emails, news items) in your system. To find the number of content entity objects, use the query select count(*) from CONTENT.
  • com.atlassian.confluence.security.PermissionCheckDispatcher.isPermitted() should be set to at least the number of concurrent users you expect to access Confluence at the same time
  • com.atlassian.confluence.user.DefaultUserAccessor.deactivatedUsers must be set to at least the number of users with USE_CONFLUENCE permission (don't worry, it only takes up a few bytes per user). To find an upper bound for this, use the query select count(*) from OS_USER, or if you have configured atlassian-user.xml to use the Hibernate repository, select count(*) from users.
  • com.atlassian.confluence.security.SpacePermission should be set to the number of space permissions in your deployment (a good rule of thumb is 20 times the number of spaces). You can find the number of space permissions using the query select count(*) from SPACEPERMISSIONS.

The following are more specific performance problems that can be resolved from tuning the cache.

"Edit Page" screen takes a long time to load

If you're installation of Confluence is suffering from this problem, it may be due to a insufficient SpacePermissions cache size. To address this problem, first determine the number of space permission objects in your Confluence instance. You can do this by running this query against your database:

> select count(*) from SPACEPERMISSIONS

Now locate the cache entry for SpacePermissions in your ehcache.xml file. It looks like this:

<cache name="com.atlassian.confluence.security.SpacePermission" maxElementsInMemory="10000" eternal="false" timeToIdleSeconds="3600" timeToLiveSeconds="0" overflowToDisk="false" />

The equivalent for confluence-coherence-cache-config.xml would be:

<local-scheme>
        <scheme-name>cache:com.atlassian.confluence.security.CachingSpacePermissionManager.permissions</scheme-name>
        <scheme-ref>default</scheme-ref>
        <high-units>10000</high-units>
        <expiry-delay>0s</expiry-delay>
</local-scheme>

Adjust the maxElementsInMemory or high-units property to the number of space permissions you have (in the example above, I've used 10000). Also, just as important, you need to adjust the timeToLiveSeconds or expiry-delay property to 0.

Note: 10K of space permissions consumes approximately 8MB of memory. Please ensure there is enough memory allocated to your instance to cater for this.

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.