We are using AEM 6.2 author instance and we ran into lot of performance issues lately. From the logs we found that the error is related to heap memory so we requested for a dump from server team so the we can analyse the memory leak issue
Repository size: 250 GB
Free space : 400 GB
RAM: 64 GB
Heap was 12 GB and we decided to increase to 14GB as we assumed the out of memory is because of the heap size but still we faced slowness in AEM author and CPU load is increasing rapidly.
While we analyse the heap dump, I would like to know how to determine the size requirement of the RAM for the machine and Heap memory for AEM.
Also any suggestions/ links which we can follow to determine the root cause of slowness would be much appreciated. Please let me know if more details are required
it's hard to give proper recommendations based on the given information. 12G of heap is plenty for most usecases, and not enough if you deal with very large assets. So increasing the heap size might or might not improve the situation, that totally depends on your application and your workload.
To understand the root cause for slowness, I would use the following approach:
* enable Garbage Collection logging on the JVM and monitor the GC behavior.
* quantify "slowness": Determine "slow" requests and make it actionable (what makes a slow request "slow"? Response times over 1 second?)
* check the periodic threaddump and search for patterns; correlate it with observed slowness (slow requests). It's definitely best if you could reproduce this in a lower environment and attach a profile to it to understand where the time is spend.
There are tons of ways, how and why requests get slow; a few of them:
* JCR queries, which are not served by an index (you will see warnings in the logs)
* overly complex logic with lots of unnecessary repository access
* requests, which trigger itself external requests to 3rd party systems.
Also we have total 64 GB of RAM and 8 CPU cores currently in the server and we have a spring application(for search)and solr also running in the same server. We understand if we change the heap then we may need to increase these parameters as well but I would like more inputs from experts here how to determine this.