# Confluence 6 管理应用服务器内存设置

**URL:** <https://www.isharkfly.com/t/confluence-6/416>\
**Category:** 文档交付\
**Tags:** confluence\
**Created:** [August 28, 2020, 2:57pm UTC](https://www.isharkfly.com/t/confluence-6/416 "2020-08-28T14:57:48Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![honeymoose](https://www.isharkfly.com/user_avatar/www.isharkfly.com/honeymoose/32/20796_2.png) [@honeymoose](https://www.isharkfly.com/u/honeymoose)\
**Post date:** [August 28, 2020, 2:57pm UTC](https://www.isharkfly.com/t/confluence-6/416/1 "2020-08-28T14:57:49Z")

</div>

应用服务器中的最小和最大 JVM Heap 空间配置将会影响系统的性能。Confluence 管理员可能希望对默认的配置进行修改，基于你系统的负载不同配置情况也会有所不同，请参考页面 [Server Hardware Requirements Guide](https://www.cwiki.us/display/CONFLUENCEWIKI/Server+Hardware+Requirements+Guide) 页面中的内容。这个页面只提供了配置所需要的参考并不是为了你的配置提供需要遵守的规则。因此系统管理员可以用这个文档作为开始的内容，希望我们能够为你提供一些指引。  
有关 Confluence 在 Sun JRE 中的内存管理的完整参考，或者内存性能的修改提升，请参考页面 [Garbage Collector Performance Issues](https://www.cwiki.us/display/CONFLUENCEWIKI/Garbage+Collector+Performance+Issues) 中的内容。

**为内存优化设置进行测试** 在基本情况下，JIRA 和 Confluence 用户只需要配置最大和最小的需要的值就可以了。在更大的安装那就行，这个配置也对内存的使用会有帮助。如果你的实例中遇到了内存溢出错（Out of Memory Heap），尝试增加你安装实例中的 -Xmx 和 -Xms 值看问题是否能得到解决或者能够帮助你解决你遇到的问题。最好在每次增加的时候只增加一小部分（例如，每次增加 512MB）来避免 heap 太大，这个也会导致不同的问题。如果你增加了内存对你出现的问题也还是没有什么帮助的话，请想我们提交支持帮助，因为这个又可能是其他问题导致的。  
内存的使用最大值最有可能是在 [creating a site XML backup](https://www.cwiki.us/display/CONFLUENCEWIKI/Site+Backup+and+Restore) 的时候出现。在很多时候站点备份可能会导致 OOM，因此增加 -Xmx 值后进行系统备份，然后在看你对系统备份的时候会不会出现 OOM 的错误。一个针对内存进行成功调整的规则是针对用户的使用感觉。系统变得根据快了吗？系统还是一样的速度吗？在对系统进行备份的时候是否还是一样的问题？  
Atlassian 推荐的配置是针对常规使用的，你可以禁用 XML 的备份方式，在你的 Confluence 安装实例中使用 [Production Backup Strategy](https://www.cwiki.us/display/CONFLUENCEWIKI/Production+Backup+Strategy) 进行备份。

- 如果你通常使用的是手动的 XML 站点备份方式，你可以针对你安装的 Confluence 实例进行手动备份，通常在这种情况下 Confluence 是运行在最高内存消耗和最大系统负载的情况下的。
- 如果你没有创建手动的 XML 备份，你可以在系统最高负载的情况下对系统进行监控。

**应用内存设置** 请参考 [How to fix out of memory errors by increasing available memory](https://confluence.atlassian.com/confkb/how-to-fix-out-of-memory-errors-by-increasing-available-memory-154071.html)。  
**相关主题**

- [Garbage Collector Performance Issues](https://www.cwiki.us/display/CONFLUENCEWIKI/Garbage+Collector+Performance+Issues)
- [How to fix out of memory errors by increasing available memory](https://confluence.atlassian.com/confkb/how-to-fix-out-of-memory-errors-by-increasing-available-memory-154071.html)
- [Server Hardware Requirements Guide](https://www.cwiki.us/display/CONFLUENCEWIKI/Server+Hardware+Requirements+Guide)
- [Performance Tuning](https://www.cwiki.us/display/CONFLUENCEWIKI/Performance+Tuning)
- [Troubleshooting Slow Performance Using Page Request Profiling](https://www.cwiki.us/display/CONFLUENCEWIKI/Troubleshooting+Slow+Performance+Using+Page+Request+Profiling)
- Tomcat [JVM options](http://www.chemaxon.com/jchem/doc/admin/tomcat.html) and [Modify the Default JVM Settings](https://tomcat.apache.org/tomcat-3.2-doc/uguide/tomcat_ug.html)

[https://www.cwiki.us/display/CONF6ZH/Managing+Application+Server+Memory+Settings](https://www.cwiki.us/display/CONF6ZH/Managing+Application+Server+Memory+Settings)
