cancel
Showing results for 
Search instead for 
Did you mean: 

Alfresco RAN usage over -Xmx

audriusp
Champ in-the-making
Champ in-the-making
Hello,

we have a limit of -Xmx24158M, but after some usage it reports using around 38 Gb?
Where is the catch?

4 REPLIES 4

afaust
Legendary Innovator
Legendary Innovator
For any Java application that is active, there are multiple memory areas that the application manages. One of those is the heap which you can configure/limit via -Xmx. Others are e.g. code store (previously often referenced as PermGen), stack, constant pools… Look at <a href="https://docs.oracle.com/javase/specs/jvms/se7/html/jvms-2.html">the structure of Java virtual machine</a> to learn more.
Long story short: -Xmx does not limit the total amount of memory a Java process can take.

audriusp
Champ in-the-making
Champ in-the-making
So, is there an easy way to limit RAm usage for alfresco? 

afaust
Legendary Innovator
Legendary Innovator
No, there is no "easy" way to limit RAM usage, because any "easy" way would gloss over application requirements and end up in a horrible performance scenario. You can limit the RAM usage technically, but you need to understand what which memory area does, how it is used by Alfresco over time and how it affects performance.

VMWare once (a long time ago) posted a <a href="http://blogs.vmware.com/apps/2011/06/taking-a-closer-look-at-sizing-the-java-process.html">blog post</a> about limiting the memory for the entire Java process.
Again: Be very, very careful when trying to hard limit the memory…

audriusp
Champ in-the-making
Champ in-the-making
Thanks for the response