The minimum and maximum JVM heap space allocated to the application server affects performance. Confluence administrators may wish to modify this value from the defaults depending on their server load. This document only provides guidelines rather than rules, so administrators optimising for performance should use this document as a starting point only.

最適なメモリ設定のためのテスト

Bigger is not always better for heap size. When optimising memory settings, consider starting by setting the minimum heap size to 1/4 the available physical memory on the server and setting the maximum to 1/2 of the maximum heap. Avoid setting the minimum and maximum to be the same since server load is normally variable. Being able to use less memory under low load results in slightly improved performance as garbage collections can be made smaller.

Testing Resources

  • Enable the verbosegc JVM parameter to assist in determining the memory size that minimises overall garbage collection
  • Use Page Request Profiling to gauge end-user performance

Determine Minimum Memory
Experiment with setting a lower minimum such as 1/10 of the maximum heap. Identify how much memory is required while under minimum load and set the minimum to that value. It is important to have Confluence use the minimum memory necessary, because garbage collection performance is dependent on the memory usage. Having an unnecessarily high minimum memory setting will degrade performance during GC operations.

Determine Maximum Memory
Experiment with different maximum memory settings with the verbosegc JVM parameter enabled to determine GC performance. Memory usage is most likely to be maximised under peak load, and when creating a site XML backup. Confluence memory may visibly increase while it is generating an XML backup.

  • サーバー上で XML サイトバックアップを手動で実行することが通常の場合は、サーバーに最大負荷を与えた状態で、サイト XML バックアップを実行することで最大メモリ要件をテストしてください。
  • 手動で XML サイトバックアップを作成しない場合は、単に、最大の負荷状態でサーバーを監視してください。

The maximum memory should be the total memory while in this state plus a buffer of at least 15%, taking into account how your garbage collection performs. Never set maximum memory to a value above 85-90% of the available physical server memory as this results in disk paging. Always leave 10-15% of available physical server memory unallocated to allow for OS background processes.

メモリ設定の適用

Users of the EAR/WAR version set their memory in their application server. For Confluence Standalone, the heap space is set in the Confluence install directory.

  • Windows users edit .../bin/setenv.bat
  • Other OS users edit .../bin/setenv.sh

The relevant parameter is

JAVA_OPTS="-Xms128m -Xmx256m ... "

Where -Xms is the minimum and -Xmx is the maximum memory available to Apache Tomcat.

関連トピック