使 AEM MemoryUsage 参数成为代码库的一部分

问题描述

我想在 Automatic Heap Dump Threshold (%) 控制台 (http://localhost:4502/system/console/memoryusage) 中为我的 AEM 实例设置 Automatic Heap Dump Interval (s)Memory Usage 参数,但我想从我的代码库/源代码中设置这些参数。有没有办法实现这一目标? 谢谢

enter image description here

解决方法

这是通过配置而不是代码来完成的,因为这是 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