首页 > 解决方案 > 使 AEM MemoryUsage 参数成为代码库的一部分

问题描述

我想在我的 AEM 实例的控制台 (http://localhost:4502/system/console/memoryusage) 参数中设置Automatic Heap Dump Threshold (%)和,但我想从我的代码库/源代码中设置这些参数。有没有办法做到这一点?谢谢 Automatic Heap Dump Interval (s)Memory Usage在此处输入图像描述

标签: osgiaemosgi-bundleaem-6

解决方案


这实际上是通过配置而不是代码完成的,因为这是 AEM 配置的一部分。

您可以:

  1. 在 AEM 的 start.bat/start.sh 文件中添加以下详细信息:

CQ_JVM_OPTS='-server –Xms8192m –Xmx8192m -XX:MaxPermSize=1024M

然而

Xms is Min heap - size can be increased depending on the your instance RAM size
Xmx is Max heap - size can be increased depending on the your instance RAM size
MaxPermSize size can be increased depending on the your instance RAM size
  1. 您还可以在通过命令行启动本地服务器时添加与命令行参数相同的参数 –Xms8192m –Xmx8192m -XX:MaxPermSize=1024M

推荐阅读