How to Change the Number of Threads Used for Attachment Reindexing

Still need help?

The Atlassian Community is here for you.

Ask the community

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

Use Case

By default, the number of threads used for attachment reindexing is 4 threads on Confluence versions until 7.13. Having more threads on this process will be useful to increase speed of indexing given that the machine/processor is capable on doing so. Please be cautious while increasing this number to ensure that we do not set it high enough to cause performance issues. Kindly validate and test these increased settings on a test environment before applying this on production. 

    • (info) Starting on Confluence version 7.14, the default number of threads used for attachment reindexing is the larger value between 4 and a calculation that considers the number of processors and the available free memory in the JVM. 

Resolution

Add the JVM parameter -Dreindex.attachments.thread.count=10. (see Configuring System Properties for tips on how to set an environment variable)

Note: The above example will set 10 threads for attachment reindexing process.


Number of threads used for Content reindexing

If you are looking for a JVM parameter to change the number of threads used for Content reindexing instead, take a look at "Poor performance while rebuilding the index" section in the Knowledge Base article 

Content Index Administration - make sure to select the appropriate Confluence version on the combo box at the top right of the page.

Last modified on Dec 31, 2024

Was this helpful?

Yes
No
Provide feedback about this article
Powered by Confluence and Scroll Viewport.