Poor performance on bandana table queries
Platform Notice: Data Center - This article applies to Atlassian products on the Data Center platform.
Note that this knowledge base article was created for the Data Center version of the product. Data Center knowledge base articles for non-Data Center-specific features may also work for Server versions of the product, however they have not been tested. Support for Server* products ended on February 15th 2024. If you are running a Server product, you can visit the Atlassian Server end of support announcement to review your migration options.
*Except Fisheye and Crucible
Problem
Thread dumps or stack traces look like this:
at com.atlassian.confluence.setup.bandana.ConfluenceCachingBandanaPersister.retrieve(ConfluenceCachingBandanaPersister.java(Inlined Compiled Code))
at com.atlassian.confluence.setup.bandana.ConfluenceCachingBandanaPersister.retrieve(ConfluenceCachingBandanaPersister.java(Compiled Code))
at com.atlassian.bandana.DefaultBandanaManager.getValue(DefaultBandanaManager.java(Compiled Code))
at com.atlassian.bandana.DefaultBandanaManager.getValue(DefaultBandanaManager.java(Inlined Compiled Code))
at com.atlassian.confluence.setup.settings.DefaultSettingsManager.getGlobalSettings(DefaultSettingsManager.java(Inlined Compiled Code))
at com.atlassian.confluence.util.zip.ConfluenceGzipFilter.useGzip(ConfluenceGzipFilter.java(Compiled Code))
Diagnosis
A way to check whether this is indeed a performance problem is to load and save the Administration >> General Configuration page.
The bandana storage is also where plugins store their data. Depending on how it's written, this may be extremely inefficient. Have a look at the bandana table keys, and whether there is a lot of XML data in the BANDANAVALUE column. It's likely due to inefficient plugin data storage.
Cause
Global Configuration settings and plugin data are pulled from the bandana
table. This can be inefficient, depending on how much plugin data is stored. More complex plugins that use bandana storage may be inefficient once they begin to scale.
Resolution
- Upgrade Confluence. There are performance improvements such as CONF-10552 and many others, including indices added to the
bandana
table in the database. - Consider increasing the bandana cache. See Cache Performance Tuning. Make sure to check that you're on the correct version for your page. The cache to increase is
Settings (Persistence)
.
The trade off to a higher cache may be a higher heap space, or garbage collection tuning. See Garbage Collector Performance Issues.