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

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.

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.

(info) If you are running Tomcat as a Windows service, you may need to run a regedt32 to increase memory as in the article on increasing JIRA memory. Although the article discusses JIRA, it should also be applicable to Confluence.

The relevant parameter is

JAVA_OPTS="-Xms128m -Xmx256m"

Where -Xms is the minimum and -Xmx is the maximum memory available to Apache Tomcat.
Note: In newer Tomcat distributions the file may not exist. Feel free to create it in the ./bin directory.

関連トピック