Jira Backgroud re-index vs Foreground re-index

First of all, what I mean Foreground re-index is Lock Jira and rebuild index. Here is a quick comparison between Background and Foreground re-index.

I have summaried a few take away for your reference:

  • The best combination is Jira Data Center + foreground re-index. As you can see above foreground re-index is quicker and offers better performance in terms of optimized index and disk fragmentation. Jira Data Center supports multiple nodes, so you can take one node out of the load balancer to lock it up and rebuild the index. Meanwhile, other nodes still serve the traffics as normal. After the re-indexing is finished, Jira will automatically distribute the new index to other nodes.
  • If you unfortunately are on Jira Server version 😉 Users are unable to use Jira while foreground re-index runs. And the length of the blackout window varies based on the hardware and Jira load. It is recommended to run foreground re-index after major changes (e.g upgrade, lots add-on updates, custom fields change) or when some index files are corrupted, as it rebuild the index file instead of updates the existing one in place (which background re-index does).
  • If big changes only have been made to a project, like custom fields. Then you can run a project-level re-index. It is a background re-index, users are still able to use Jira.
  • Background re-index is single threaded, it generates less load to Jira but takes longer time to finish. Foreground re-index is multi threaded . It is 10 threads by default, but can be changed in jira-config.properties file e.g jira.index.issue.threads = 20. The rule of thumb is not more than two times of the CPU core.



Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s