Expand my Community achievements bar.

SOLVED

Install AEM6.5 Linux Environments Best Practices

Avatar

Level 5

Hi Team

 

Can you please let me know what are best practices must follow while installing the AEM Product brand new environments (Most of the projects i was involved ,  Adobe Team used install  but for this project I was asked install to up the environment )

 

Generally I am following same steps as similar to local except following 

1) Create folder structure /opt/aem

2)author\crx-quickstart\conf\sling.properties

     update add the secondary runmod ex :dev/qa/stg/prod 

      sling.run.mode.install.options= 

 

3) Any best practice's JVM parameter setting based on server configuration 

 

4) Other important best practices while readiness of new AEM environment Linux server 

 

Regards

Vara

1 Accepted Solution

Avatar

Correct answer by
Employee

You can setup JVM settings - 

Java Heap Size - 

 -Xms - set initial Java heap size
 -Xmx - set maximum Java heap size
 -Xss - set java thread stack size
Usually in prod -Xms and -Xmx keeps in same size.

Percentage of the Heap

 

-XX:MaxHeapFreeRatio – sets the maximum percentage of heap free after GC to avoid shrinking.

-XX:MinHeapFreeRatio – sets the minimum percentage of heap free after GC to avoid expansion; to monitor the heap usage, you can use JCosole.

 

Print GC

-XX:+PrintGCApplicationStoppedTime -XX:+PrintGCDateStamps -XX:+PrintGCDetails -XX:+PrintGCTimeStamp

 

If you want to trigger Heap Dump when out of memory occurs the you can use -

To trigger heap dump on out of memory, you can use 

-XX:+HeapDumpOnOutOfMemoryError

JVM option produces a stack dump when your JVM dies with OutOfMemory Error. There is no expense involved unless an OOM really occurs. This flag is a requisite for production systems as it is usually the only way to determine the problem deeply.

The heap dump will be set up in the “current directory” of the JVM by default. If you wish to create heap dumps on specific directory, then run

-XX:HeapDumpPath= [path-to-heap-dump-directory]
-XX:+UseGCOverheadLimit
-XX:OnOutOfMemoryError="< cmd args >;< cmd args >"

Apart from that you need to setup proper log archiving and purging to use the Server Memory efficiently. 

View solution in original post

2 Replies

Avatar

Correct answer by
Employee

You can setup JVM settings - 

Java Heap Size - 

 -Xms - set initial Java heap size
 -Xmx - set maximum Java heap size
 -Xss - set java thread stack size
Usually in prod -Xms and -Xmx keeps in same size.

Percentage of the Heap

 

-XX:MaxHeapFreeRatio – sets the maximum percentage of heap free after GC to avoid shrinking.

-XX:MinHeapFreeRatio – sets the minimum percentage of heap free after GC to avoid expansion; to monitor the heap usage, you can use JCosole.

 

Print GC

-XX:+PrintGCApplicationStoppedTime -XX:+PrintGCDateStamps -XX:+PrintGCDetails -XX:+PrintGCTimeStamp

 

If you want to trigger Heap Dump when out of memory occurs the you can use -

To trigger heap dump on out of memory, you can use 

-XX:+HeapDumpOnOutOfMemoryError

JVM option produces a stack dump when your JVM dies with OutOfMemory Error. There is no expense involved unless an OOM really occurs. This flag is a requisite for production systems as it is usually the only way to determine the problem deeply.

The heap dump will be set up in the “current directory” of the JVM by default. If you wish to create heap dumps on specific directory, then run

-XX:HeapDumpPath= [path-to-heap-dump-directory]
-XX:+UseGCOverheadLimit
-XX:OnOutOfMemoryError="< cmd args >;< cmd args >"

Apart from that you need to setup proper log archiving and purging to use the Server Memory efficiently. 

Avatar

Level 5

Can you please help me sample JVM Options to set Linux Server .In My local not seen the JVM Options for MaxHeapFreeRatio ,Is recommended to set max and min HeapFreeRatio

 

Here is sample my local AEM Instance:

# default JVM options
if [ -z "$CQ_JVM_OPTS" ]; then
CQ_JVM_OPTS='-server -Xmx1024m -XX:MaxPermSize=256M -Djava.awt.headless=true'
# add the required JPMS modules, if needed
java --add-modules java.se.ee -version >/dev/null 2>&1
if [ $? -eq 0 ]; then
CQ_JVM_OPTS="${CQ_JVM_OPTS} --add-modules java.se.ee"
fi
fi