Confluence performance can be significantly affected by the performance of its caches. It is essential for the administrator of a large production installation of Confluence to tune the caches to suit its environment. There are several configurable parameters for each of the cache regions, most notably cache size, cache expiry delay and eviction policy. In the majority of the cases, cache size is the parameter you would want to change. Fortunately, from Confluence 3.0, it is very easy to adjust cache sizes through the Administration Console. However, if you need to modify parameters other than a cache size, you would need to modify the relevant configuration files manually.

The cache performance information for your Confluence installation is available under Administration > Cache Statistics. For more information about the numbers displayed on that screen, see Cache Statistics.

Notes:

  • To improve performance of a large Confluence site, we recommend that you move the caching of static content from the JVM into Apache. This will prevent the JVM from having a number of long running threads serving up static content. See Configuring Apache to Cache Static Content via mod_disk_cache.
  • If you only need to modify Confluence's maximum cache sizes, you can do this through the Cache Statistics feature of the Administration Console.

Cache tuning example


As an example of how to tune Confluence's caches, let's have a look at the following table:

Caches

% Used

% Effectiveness

Objects/Size

Hit/Miss/Expiry

Attachments

87%

29%

874/1000

78226/189715/187530

Content Attachments

29%

9%

292/1000

4289/41012/20569

Content Bodies

98%

81%

987/1000

28717/6671/5522

Content Label Mappings

29%

20%

294/1000

4693/18185/9150

Database Queries

96%

54%

968/1000

105949/86889/83334

Object Properties

27%

18%

279/1000

5746/25386/8102

Page Comments

26%

11%

261/1000

2304/17178/8606

Users

98%

5%

982/1000

6561/115330/114279

The caches above are of size 1000 (meaning that it can contain up to 1000 objects), which is the default size for caches in the default cache scheme. Refer to Confluence Cache Schemes for more explanation.

You can tell when a cache size needs to be increased because the cache has both:

  • a high usage percentage (above 75%)
  • a low effectiveness percentage.

Check the 'effectiveness' versus the 'percent used'. A cache with a low percent used need not have its size lowered; it does not use more memory until the cache is filled.

Based on this, the sizes of the "Attachments", "Database Queries", and "Users" caches should be increased to improve their effectiveness.

As the stored information gets older or unused it will expire and be eliminated from the cache. Cache expiry may be based on time or on frequency of use.

(info) There is not much that you can do with a cache that has both a low percentage of usage and effectiveness. Over time, as the cache is populated with more objects and repeat requests for them are made, the cache's effectiveness will increase.

Finding the configuration file

The caches are configured in ehcache.xml (for standard editions) or confluence-coherence-cache-config-clustered.xml (for clustered editions) which is stored in <confluence-home>/config/.

Oracle Coherence Licensing Change:

Icon
  • Due to a license agreement change,Confluence is now available in two editions:
    • Standard Edition — Confluence with Ehcache's caching technology (available to customers with non-clustered Confluence licenses).
      (warning) If you are currently running a clustered installation of Confluence, please do not upgrade it with a standard edition of Confluence.
    • Clustered Edition — Confluence with Oracle's Coherence clustering and distributed caching technology (available to customers with Confluence clustered licenses only).
  • For more information about these changes, please refer to the Coherence License Changes document.
  • If you have a Confluence clustered license, are running a clustered installation of Confluence and wish to upgrade to Confluence version 2.6 or later, please ensure that you download only a clustered edition of Confluence and please refer to the Confluence 3.0.1 Upgrade Notes for additional upgrade information.

Cache key mappings

The cache configuration file configures caches by their keys. When you move your mouse over the the cache names displayed on the cache statistics page, a tooltip will indicate the actual cache key for that cache name.

Using our example from the table above, if we were to modify parameters for the Users cache we would need to change the cache with the key com.atlassian.user.impl.hibernate.DefaultHibernateUser. Do not get confused with Users (External Mappings) and Users (External Groups) which are in themselves, two separate caches. "Users" is the friendly name for com.atlassian.user.impl.hibernate.DefaultHibernateUser.

Standard editions of Confluence

In standard editions of Confluence, the caching layer is Ehcache.

Understanding the Ehcache configuration file

For more information about the Ehcache configuration file and a full reference on Ehcache configuration, please refer to the Ehcache configuration documentation.

Converting your Coherence configuration to Ehcache

Icon

This section only applies to customers who:

  • Have an installation of Confluence that was downloaded before the 4th of September 2009.
  • Intend to (or have already) upgraded to Confluence 3.0.1 or later (or to Confluence versions 2.6.3, 2.7.4, 2.8.3, 2.9.3 and 2.10.4).
  • Will use a non-clustered Confluence license for the Confluence upgrade.
  • Have implemented customisations to their Confluence installation's cache configuration file (confluence-coherence-cache-config.xml).

To maintain your existing cache configuration file settings, you will need to transfer any cache customisations you have implemented in the Coherence cache configuration file (confluence-coherence-cache-config.xml) to the relevant entries in the Ehcache cache configuration file (ehcache.xml).

Each cache has a cache-mapping element in the Coherence file (of which there is an equivalent cache element in the ehcache.xml file). Unfortunately, copying across your customisations is not quite a straightforward process because the Coherence file defines several 'caching schemes' to store the actual cache values, which in turn are referenced by the cache-mapping elements. In contrast, the ehcache.xml file does not support caching schemes and a cache's values are expressed explicitly in separate parameters of a cache element.

To convert your Coherence cache configuration file customisations across to the equivalent Ehcache file:

  1. Open both the confluence-coherence-cache-config.xml and ehcache.xml files in a text editor. These files are located in the <confluence-home>/config directory.
    (info) If you implemented your customisations in a version of Confluence prior to 3.0, you will most likely find the confluence-coherence-cache-config.xml file in the <confluence-install>/confluence/WEB-INF/classes directory.
  2. In the customised confluence-coherence-cache-config.xml file:

    1. Identify the caching schemes that were customised in this file and make a note of the values of all its child elements.
      (info) Typically, each caching scheme is located inside a local-scheme element and all of these are enclosed within the cache-schemes element, which appears towards the end of this file.
    2. Note each customised caching scheme by the content of its scheme-name element.
    3. For each cache-mapping element (which typically appears towards the top of this file), identify if it has a scheme-name element whose content matches one noted in the previous step and if so, make a note of its associated cache-name element.
  3. In the ehcache.xml file:

    1. Identify each cache element whose 'name' parameter matches the cache-name elements noted in step '2c'.
    2. Using the mappings table below, apply the values noted in step '2a' to the appropriate parameters of the cache elements identified in the previous step ('3a').

Mappings table showing how elements of the Coherence cache configuration file map to parameters of the equivalent Ehcache file.

Coherence Element

Ehcache Attribute

high-units

maxElementsInMemory

expiry-delay > 0s

timeToIdleSeconds - Use this attribute for expiry delays greater than 0s along with the eternal attribute set to 'false'

expiry-delay = 0s

eternal - For expiry delays of 0s, set this attribute to 'true'.

Clustered editions of Confluence

Understanding the Coherence configuration file

The Coherence configuration file is a mapping of cache keys to cache schemes. Each cache scheme controls the expiry, eviction policy and size of the caches linked to it. A cache scheme can extend another scheme.

For a full reference, see the Oracle's Coherence cache configuration documentation.

Defining caching scheme mappings in Coherence cache config file

If a cache key does not have an explicit definition in the caching scheme mappings (defined in confluence-coherence-cache-config.xml) then it will use the "default" cache-mapping.

In our example, com.atlassian.user.impl.hibernate.DefaultHibernateUser is not explicitly defined in the caching scheme mappings. Hence to increase the expiry-delay to 2 hours, we will need to define the mapping ourselves and add the following within the <caching-scheme-mapping>...</caching-scheme-mapping> tags:

<cache-mapping>
<cache-name>com.atlassian.user.impl.hibernate.DefaultHibernateUser</cache-name>
<scheme-name>cache:com.atlassian.user.impl.hibernate.DefaultHibernateUser</scheme-name>
</cache-mapping>

Then we will need to define a cache schema with name cache:com.atlassian.user.impl.hibernate.DefaultHibernateUser within <caching-schemes>...</caching-schemes> tags.

<local-scheme>
<scheme-name>cache:com.atlassian.user.impl.hibernate.DefaultHibernateUser</scheme-name>
<scheme-ref>default</scheme-ref>
<high-units>10000</high-units>
<expiry-delay>7200</expiry-delay>
</local-scheme>

It's possible to define a local-scheme mapping for a cache key without defining certain parameters (e.g. <high-units> ). In such a cases, their parameters will be inherited from scheme-ref scheme, which is the default scheme in our case.

Reference of Internal names to Human readable names

The names in the Cache statistics screen are mapped to internal names (as per the ehcache/coherence-override file) as follows:

 

bucket.user.persistence.dao.hibernate.BucketUserDAO.findUserByUsername()

Users (Username)

bucket.user.propertyset.BucketPropertySetItem

Object Properties

bucket.user.providers.CachingAccessProvider.handles()

Groups (OSUser)

bucket.user.providers.CachingAccessProvider.inGroup()

User Group Mappings (OSUser)

bucket.user.providers.CachingCredentialsProvider

Users (OSUser Credentials)

com.atlassian.bandana.BandanaPersister

Settings (Persistence)

com.atlassian.confluence.core.BodyContent

Content Bodies

com.atlassian.confluence.core.ContentEntityObject

Content Objects

com.atlassian.confluence.core.ContentEntityObject.attachments

Content Attachments

com.atlassian.confluence.core.ContentEntityObject.bodyContents

Content Body Mappings

com.atlassian.confluence.core.ContentEntityObject.labellings

Content Label Mappings

com.atlassian.confluence.core.ContentEntityObject.outgoingLinks

Content Links (Outgoing)

com.atlassian.confluence.core.ContentEntityObject.permissions

Content Permission Mappings

com.atlassian.confluence.core.ContentEntityObject.previousVersions

Content Versions

com.atlassian.confluence.core.ContentEntityObject.referralLinks

Content Links (Referral)

com.atlassian.confluence.core.ContentEntityObject.trackbackLinks

Content Links (Trackback)

com.atlassian.confluence.diffs

Page Diffs

com.atlassian.confluence.html.diffs

Html Page Diffs

com.atlassian.confluence.plugins.like.notifications.dao.NotificationDao

Likes Notification DAO

com.atlassian.confluence.security.ContentPermission

Content Permissions

com.atlassian.confluence.core.PersistentDecorator

Layouts (Database)

com.atlassian.confluence.labels.Label

Labels

com.atlassian.confluence.labels.Labelling

Label Content Mappings

com.atlassian.confluence.pages.Attachment.labellings

"Attachment Label Mappings"

com.atlassian.confluence.pages.AttachmentDownloadPathCache

Attachment Download Paths

com.atlassian.confluence.pages.templates.PageTemplate.labellings

"Page Template Label Mappings"

com.atlassian.confluence.links.ReferralLink

Links (External)

com.atlassian.confluence.links.TrackbackLink

Links (Trackback)

com.atlassian.confluence.core.ContentEntityObject.comments

Comments

com.atlassian.confluence.pages.Attachment.previousVersions

Attachment Versions

com.atlassian.confluence.pages.Comment.children

Comment Relationships

com.atlassian.confluence.pages.Draft

Drafts

com.atlassian.confluence.pages.Page.ancestors

Page Ancestors

com.atlassian.confluence.pages.Page.children

Page Children

com.atlassian.confluence.pages.templates.PageTemplate.previousVersions

Template Versions

com.atlassian.confluence.pages.attachments.ImageDetailsDto

Image Details

com.atlassian.confluence.security.SpacePermission

Space Permissions (by ID)

com.atlassian.confluence.setup.bandana.ConfluenceBandanaRecord

Settings

com.atlassian.confluence.spaces.Space

Spaces

com.atlassian.confluence.user.persistence.dao.CachingPersonalInformationDao.usernameToId

User Information By Username

com.atlassian.confluence.util.velocity.ConfluenceVelocityResourceCache

UI Templates

com.atlassian.user.impl.hibernate.DefaultHibernateExternalEntity

Users (External Mappings)

com.atlassian.user.impl.hibernate.DefaultHibernateExternalEntity.groups

Users (External Groups)

com.atlassian.user.impl.hibernate.DefaultHibernateGroup

Groups

com.atlassian.user.impl.hibernate.DefaultHibernateGroup.externalMembers

Groups (External Members)

com.atlassian.user.impl.hibernate.DefaultHibernateGroup.localMembers

Groups (Local Members)

com.atlassian.user.impl.hibernate.DefaultHibernateUser

Users

com.atlassian.user.impl.hibernate.DefaultHibernateUser.groups

User Group Mappings

com.atlassian.user.impl.hibernate.CachingExternalEntityDAO.externalEntityName

Users (External Mappings)

com.opensymphony.user.provider.hibernate.impl.HibernateGroupImpl

Groups (OSUser)

com.opensymphony.user.provider.hibernate.impl.HibernateUserImpl

Users (OSUser)

com.opensymphony.user.provider.hibernate.impl.HibernateUserImpl.groups

User Group Mappings (OSUser Hibernate)

net.sf.hibernate.cache.StandardQueryCache

Database Queries

net.sf.hibernate.cache.UpdateTimestampsCache

Object Timestamps

com.atlassian.confluence.lock-cache

Locks

com.atlassian.confluence.rpc.auth.TokenAuthenticationManager.tokens

Remote Auth Tokens

bucket.user.providers.CachingProfileProvider.getPropertySet()

Bucket Property Set

bucket.user.providers.CachingProfileProvider.handles()

Profile Providers Handles

com.atlassian.confluence.cluster.safety.DefaultClusterSafetyManager.safetyNumber

Cluster Safety Numbers

com.atlassian.confluence.security.PermissionCheckDispatcher.isPermitted()

User Authorized URLs

com.atlassian.confluence.security.persistence.dao.hibernate.legacy.HibernateKey

Hibernate Keys

com.atlassian.confluence.security.trust.ConfluenceTrustedApplication

Trusted Applications

com.atlassian.confluence.security.trust.ConfluenceTrustedApplication.restrictions

Trusted Application Restrictions (Foreign Keys)

com.atlassian.confluence.security.trust.TrustedApplicationRestriction

Trusted Application Restrictions (Objects)

com.atlassian.confluence.themes.persistence.hibernate.DefaultPersistentDecoratorDao

Decorators

com.atlassian.confluence.util.i18n.I18NBeanFactory.by.locale

Internationalisation Bean Factories

com.atlassian.confluence.core.CachingInheritedContentPermissionManager.getInheritedContentPermissionSets()

Inherited Content Permissons

com.atlassian.confluence.pages.persistence.dao.PageDao.getPage()

Pages

com.atlassian.confluence.security.CachingSpacePermissionManager.permissions

Space Permissions (by Type, Scope & Entity)

com.atlassian.confluence.spaces.persistence.dao.SpaceDao.getSpace()

Spaces (by key)

com.atlassian.confluence.util.UserChecker

Number Of Registered Users

com.atlassian.confluence.cache.jcaptcha.ConfluenceCachingCaptchaStore

Captchas

com.atlassian.confluence.core.DefaultContentPropertyManager

Content Properties

com.atlassian.confluence.spaces.SpaceGroup

Space Groups

com.atlassian.confluence.hosted.SpaceGroupPermission

Space Group Permissions

com.atlassian.confluence.spaces.persistence.dao.SpaceGroupDao.getSpaceGroup()

Space Groups (Hibernate)

com.atlassian.confluence.core.ContentEntityObject.contentPermissionSets

Permission Set Collections in Content Entity Objects

com.atlassian.confluence.security.ContentPermissionSet

Content Permission Sets

com.atlassian.confluence.security.ContentPermissionSet.contentPermissions

Permissions in Content Permission Sets

com.atlassian.confluence.published-cache

Objects Published to All Cluster Members

com.atlassian.confluence.core.DefaultHeartbeatManager.activities

Page Edit Activities for Heartbeat Tracking

com.atlassian.confluence.pages.Attachment

Attachments

com.atlassian.confluence.pages.attachments.AttachmentCache

Attachment IDs

com.atlassian.confluence.security.persistence.dao.hibernate.AliasedKey

Encryption Keys

com.atlassian.user.impl.hibernate.properties.HibernatePropertySetFactory.propertysets

Hibernate User Properties

com.atlassian.confluence.follow.Connection

Connection

com.atlassian.confluence.user.DefaultUserAccessor.deactivatedUsers

Disabled Users

com.atlassian.confluence.links.DefaultReferralManager.hotReferrers

Hot Referrers

com.atlassian.confluence.extra.jira.OldRssMacro

Old Rss Macro

com.atlassian.confluence.security.login.DefaultLoginManager

Login Manager: Login attempts for unknown users

com.atlassian.confluence.user.persistence.dao.ConfluenceRememberMeToken

RememberMe Tokens

com.atlassian.confluence.locale.requestLang

Browser language cache

com.atlassian.confluence.security.persistence.dao.hibernate.UserLoginInfo

User Login Information

com.atlassian.confluence.like.LikeEntity

Likes

com.atlassian.crowd.integration-groupnames

Crowd Group Names

com.atlassian.crowd.integration-user

Crowd Users

com.atlassian.crowd.integration-group-membership

Crowd Group Memberships

com.atlassian.crowd.integration-all-group-members

Crowd All Group Members

com.atlassian.crowd.integration-groupname-case

Crowd Group Name Case

com.atlassian.crowd.integration-all-memberships

Crowd All Memberships

com.atlassian.crowd.integration-username-case

Crowd User Name Case

com.atlassian.crowd.integration-parentgroup

Crowd Parent Groups

com.atlassian.crowd.integration-usernames

Crowd User Names

com.atlassian.crowd.integration-group

Crowd Groups

com.atlassian.crowd.integration-is-user-or-group

Crowd User Or Group Cache

com.atlassian.crowd.integration-user-with-attributes

Crowd users with Attributes

  1. Embedded Crowd cache friendly names

com.atlassian.crowd.model.user.InternalUserAttribute

Embedded Crowd Internal User Attribute

com.atlassian.crowd.model.user.InternalUser

Embedded Crowd Internal User

com.atlassian.crowd.model.application.ApplicationImpl.directoryMappings

Embedded Crowd Application Directory Mappings

com.atlassian.crowd.model.directory.DirectoryImpl.attributes

Embedded Crowd Directory Attributes

com.atlassian.crowd.model.directory.DirectoryImpl.allowedOperations

Embedded Crowd Directory Allowed Operations

com.atlassian.crowd.model.application.ApplicationImpl

Embedded Crowd Application

com.atlassian.crowd.model.directory.DirectoryImpl

Embedded Crowd Directory

com.atlassian.crowd.model.application.DirectoryMapping

Embedded Crowd Directory Mapping

com.atlassian.crowd.model.group.InternalGroup

Embedded Crowd Internal Group

com.atlassian.crowd.embedded.hibernate2.HibernateMembership

Embedded Crowd Group Membership

com.atlassian.crowd.model.application.DirectoryMapping.allowedOperations

Embedded Crowd Directory Mapping Allowed Operations

com.atlassian.crowd.model.user.InternalUser.credentialRecords

Embedded Crowd Internal User Credential Records

com.atlassian.crowd.model.application.ApplicationImpl.attributes

Embedded Crowd Application Attributes

com.atlassian.crowd.model.application.DirectoryMapping.authorisedGroups

Embedded Crowd Directory Mapping Authorised Groups

com.atlassian.crowd.model.application.ApplicationImpl.remoteAddresses

Embedded Crowd Application Remote Addresses

com.atlassian.crowd.model.user.InternalUserCredentialRecord

Embedded Crowd Internal User Credential Record

com.atlassian.crowd.model.application.GroupMapping

Embedded Crowd Group Mapping

com.atlassian.crowd.model.group.InternalGroupAttribute

Embedded Crowd Internal Group Attribute

com.atlassian.confluence.user.crowd.DefaultApplicationCache

Embedded Crowd Immutable Application

com.atlassian.confluence.user.crowd.CachedCrowdUserDao.USER_CACHE

Embedded Crowd Users

com.atlassian.confluence.user.crowd.CachedCrowdUserDao.ATTRIBUTE_CACHE

Embedded Crowd User Attributes

com.atlassian.confluence.user.crowd.CachedCrowdGroupDao.GROUP_CACHE

Embedded Crowd Groups

com.atlassian.confluence.user.crowd.CachedCrowdGroupDao.ATTRIBUTE_CACHE

Embedded Crowd Group Attributes

com.atlassian.confluence.user.crowd.CachedCrowdMembershipDao.STRING_PARENT_CACHE

Embedded Crowd String Parent Memberships

com.atlassian.confluence.user.crowd.CachedCrowdMembershipDao.GROUP_PARENT_CACHE

Embedded Crowd Group Object Parent Memberships

com.atlassian.confluence.user.crowd.CachedCrowdMembershipDao.GROUP_CHILD_CACHE

Embedded Crowd Group Object Child Memberships

confluence.fifo.buffer.mail

Mail Queue (only flushable individually)

confluence.fifo.buffer.task

Task Queue (only flushable individually)

confluence.fifo.buffer.mail-error

Mail Error Queue (only flushable individually)

com.atlassian.user.impl.hibernate.HibernateGroupManager.hibernateRepository.groups

Hibernate Groups

com.atlassian.user.impl.hibernate.HibernateGroupManager.hibernateRepository.groups_getGroupsForUser

Hibernate User Groups (Group Side)

com.atlassian.user.impl.hibernate.HibernateGroupManager.hibernateRepository.groups_hasMembership

Hibernate Membership

com.atlassian.user.impl.hibernate.HibernateGroupManager.hibernateRepository.repositories

Hibernate Group Repository

com.atlassian.user.impl.hibernate.HibernateUserManager.hibernateRepository.users

Hibernate Users

com.atlassian.user.impl.hibernate.HibernateUserManager.hibernateRepository.groups_getGroupsForUser

Hibernate User Groups (User Side)

com.atlassian.user.impl.hibernate.HibernateUserManager.hibernateRepository.repository

Hibernate User Repository

com.atlassian.user.impl.hibernate.HibernateUserManager.hibernateRepository.users_ro

Hibernate User Read-Only Flags

com.atlassian.user.impl.hibernate.HibernateUserManager.ldapRepository.users

Hibernate-LDAP Users

com.atlassian.user.impl.hibernate.HibernateUserManager.ldapRepository.groups_getGroupsForUser

Hibernate-LDAP Groups for Users (User Side)

com.atlassian.user.impl.ldap.LDAPGroupManagerReadOnly.ldapRepository.groups

LDAP Groups

com.atlassian.user.impl.ldap.LDAPGroupManagerReadOnly.ldapRepository.groups_getGroupsForUser

LDAP User Groups (Group Side)

com.atlassian.user.impl.ldap.LDAPGroupManagerReadOnly.ldapRepository.groups_hasMembership

LDAP Membership

com.atlassian.user.impl.ldap.LDAPGroupManagerReadOnly.ldapRepository.repositories

LDAP Group Repository

com.atlassian.user.impl.ldap.LDAPUserManagerReadOnly.ldapRepository.users

LDAP Users

com.atlassian.user.impl.ldap.LDAPUserManagerReadOnly.ldapRepository.groups_getGroupsForUser

LDAP User Groups (User Side)

com.atlassian.user.impl.ldap.LDAPUserManagerReadOnly.ldapRepository.repository

LDAP User Repository

com.atlassian.user.impl.ldap.LDAPUserManagerReadOnly.ldapRepository.users_ro

LDAP User Read-Only Flags

com.atlassian.crowd.embedded.atlassianuser.EmbeddedCrowdGroupManager.embeddedCrowd.groups

Embedded Crowd Groups

com.atlassian.crowd.embedded.atlassianuser.EmbeddedCrowdGroupManager.embeddedCrowd.groups_getGroupsForUser

Embedded Crowd User Groups (Group Side)

com.atlassian.crowd.embedded.atlassianuser.EmbeddedCrowdGroupManager.embeddedCrowd.groups_hasMembership

Embedded Crowd Membership

com.atlassian.crowd.embedded.atlassianuser.EmbeddedCrowdGroupManager.embeddedCrowd.repositories

Embedded Crowd Group Repository

com.atlassian.crowd.embedded.atlassianuser.EmbeddedCrowdUserManager.embeddedCrowd.users

Embedded Crowd Users

com.atlassian.crowd.embedded.atlassianuser.EmbeddedCrowdUserManager.embeddedCrowd.groups_getGroupsForUser

Embedded Crowd User Groups (User Side)

com.atlassian.crowd.embedded.atlassianuser.EmbeddedCrowdUserManager.embeddedCrowd.repository

Embedded Crowd User Repository

com.atlassian.crowd.embedded.atlassianuser.EmbeddedCrowdUserManager.embeddedCrowd.users_ro

Embedded Crowd User Read-Only Flags

com.atlassian.crowd.embedded.atlassianuser.EmbeddedCrowdPropertySetFactory.propertysets

Embedded Crowd Properties

com.atlassian.confluence.schedule.ScheduledJobStatus

Scheduled Job Status

 

Important caches

Icon

The following suggestions are general guidelines. In cases of large databases, 20-30% of the size of the table may be unnecessarily large. Check the effectiveness and Percent Used categories in the cache for more specific assessments.

  • com.atlassian.confluence.core.ContentEntityObject (known as Content Objects cache)
    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 where prevver is null.
  • com.atlassian.confluence.core.ContentEntityObject.bodyContents (known as Content Body Mappings cache)
    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 where prevver is null.
  • com.atlassian.confluence.security.PermissionCheckDispatcher.isPermitted() (known as User Authorized URLs cache)
    should be set to at least the number of concurrent users you expect to access Confluence at the same time
  • com.atlassian.crowd.model.user.InternalUser (known as Embedded Crowd Internal User cache) should be set to the number of users you have in the internal directory.  You can discover this number by using the following SQL:

    SELECT
        COUNT(*)
    FROM
        cwd_user u
    JOIN
        cwd_directory d
    ON
        u.directory_id = d.id
    AND d.directory_name = 'Confluence Internal Directory';
  • com.atlassian.confluence.user.crowd.CachedCrowdUserDao.USER_CACHE (known as the Embedded Crowd Users cache) should be set to the number of rows in the cwd_user table.  

    SELECT
    COUNT(*)
    FROM
    cwd_user u;

  • com.atlassian.confluence.security.SpacePermission (known as Space Permissions (by ID) cache)
    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.

Cache tuning follow-up

After you have made changes to your cache config, doing a follow up on the changes in the next week or after the expected performance spike would be important.

Make sure that you take a screenshot of the cache statistics before and after the change. Then compare them with the cache statistics in the later period where performance improvement is expected.

Notes

You can monitor what's in the cache by using a JSP included in the Confluence distribution. Browse to <base-URL>/admin/cachecontents.jsp to monitor the cache contents.

 

Attachments:

size.png (image/png)
size.png (image/png)
cacheKey.png (image/png)