How to increase the speed of full reindex in Jira

お困りですか?

アトラシアン コミュニティをご利用ください。

コミュニティに質問

プラットフォームについて: Server および Data Center のみ。この記事は、Server および Data Center プラットフォームのアトラシアン製品にのみ適用されます。

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.

*Fisheye および Crucible は除く

要約

Deprecation notice

This article has been superseded by:

How to troubleshoot and optimize the Full Reindex in Jira

The contents below were kept in place as lingering reference material and may soon be removed in favor of the redirection to the one above.


If you have a large JIRA instance (>300k issues) then Full reindex might take a couple of hours. The performance of reindexing depends on many factors:

  • CPU performance
  • Disk performance
  • DB performance
  • Number and type of custom fields

By default, full reindex on JIRA 7.x runs only 10 threads, and Jira 8.x runs on 20 threads. If you have really good hardware then it might be underutilized and you may be able to reduce reindexing time. This is not applicable to background reindex which it's always single-threaded. 

(info) The indexing operation is very database-intensive. If increasing the number of threads doesn't improve the performance, chances are that the database is the bottleneck.
Make sure that latency between Jira and the database is low and that DB index maintenance is done on a regular basis.

ソリューション

Goal is to review system resources and increase number of index threads until you reach saturation point. You shouldn't look at a single factor only. Please note that Lucene disk writer is single-threaded, so the goal to prepare just enough data for it.  

再インデックス中にシステムの負荷を確認します。

  • CPU utilization (if it's below 50%, then you might benefit from tuning)
  • Disk utilization (if it's below 70%, then you might benefit from tuning)
  • DB utilization (check with your DBA if you have capacity there) increase DB pool size if required

Regarding Custom field indexers, they may be analyzed using the metrics described on this page (available for Jira 8.1 and later):

チューニング

Add/update the value of jira.index.issue.threads in the $JIRA_HOME/jira-config.properties.
Optionally, also add jira.index.sharedentity.threads to tune the number of threads that reindex the filters ("SearchRequests") after the issues are indexed.

(info) In new Jira installations, this file may not initially exist and if so, it needs to be created manually. 

Jira 7.x の場合

# jira.index.issue.threads = 10 (default for Jira 7.x)
jira.index.issue.threads = 20

For Jira 8.x and above - change only if the number of CPUs allows, e.g. for a system with 32 CPUs set the value to 30 or 32

# jira.index.issue.threads = 20 (default for Jira 8.x)
jira.index.issue.threads = 30
# jira.index.sharedentity.threads = 10 (default filter reindex threads for Jira 8.x)
jira.index.sharedentity.threads = 30

チューニングのヒント

  • It's necessary to restart the application to apply any changes done on jira-config.properties
  • Don't increase the value too high (eg: above 2x number of CPU cores.)
  • You can start with value 20 and then increase the value with small steps running a full reindex each time. If you don't see significant improvement then roll back the change. 

Please see for more details:  JRA-38598 - Getting issue details... STATUS   JRA-25788 - Getting issue details... STATUS

Below are some examples of reindexing time reduction due to better tuning:

1

週末にスレッドの数を 50 個に増やしたところ、ロックアウトのインデックス時間が 50 分から 10 分に短縮されました。平均コア使用率は 10% から 40% に増えました。

2. 

300,000 件の課題、32 コア、48 RAM インスタンスでのテストの結果です。10 から 32 スレッドにすることで、時間が 29 分から 15 分に短縮されました。

3.

スレッドを 20 に設定しました。インデックス時間を 1 時間軽減できました。これまで 3 時間 40 分だったのが 2 時間 40 分になりました。


説明 大規模な Jira インスタンス (300,000 件~の課題) をお持ちの場合、完全な再インデックスには数時間かかる可能性があります。再インデックスのパフォーマンスは、CPU パフォーマンス、ディスク パフォーマンス、DB パフォーマンスなどのさまざまな要因に依存します。デフォルトでは、Jira は 10 個のスレッドのみを再インデックスのために実行します。このため、ご利用のハードウェアの性能が高い場合、それをさらに活用して再インデックス時間を軽減できる可能性があります。これはバックグラウンドでの再インデックスには適用されません。バックグラウンドでの再インデックスは常にシングル スレッドで実行されます。 
製品Jira
プラットフォームServer
最終更新日: 2024 年 2 月 1 日

この内容はお役に立ちましたか?

はい
いいえ
この記事についてのフィードバックを送信する
Powered by Confluence and Scroll Viewport.