I've found that with HR2 of SDL Tridion 2011SP1 a new file is included in the configuration samples (sample_jvm.xml).

This file can be used to send application specific JVM arguments.  
        Add the Option tag to define specific JVM options.  
        The Option tag can define the MaximumHeapSizeInMB (-Xmx), the InitialHeapSizeInMB (-Xms) and other JVM properties(-D).  
        <Option Name="-Xmx" Value="400m"/>  
        <Option Name="-Xms" Value="50m"/>  
        <Option Name="-Dfile.encoding" Value="UTF-8"/>  

I've uncommented the -Xmx and -Xms options and set them to 50m/20m but I'm not seeing any difference in memory consumption of the website (still roughly 150m).

The memory consumption is not coming from the .Net runtime (private bytes in all heaps is <10m) so I'm assuming it's the Java runtime...

Edit: after trying the hints provided by the answers given here i've decided to give up on trying to make the JVM behave memory-wise; the only solution to not have an individual website eat up at least 130MB memory is to not have a JVM. I suppose Java and small memory footprint will just never be friends. I'm accepting Bart's answer as the solution as there is simply no way to control all of a JVMs memory usage. Thanks to all for contributing!

2 Answers 2


-Xmx sets the maximum heap space, but the JVM allocates memory for other spaces also.

"Private Bytes" can (and does) include memory that is used by the JVM process but it is not part of the Java heap. So you should never expect your process's memory usage as measured by "private bytes" to stay below the -Xmx setting.


Memory consumption can come from the permgen zone. This memory zone is used by the JVM to load internal representation of java classes (Tridion lib for ex).

If no value is set, the default size of the permgen is 64m. You can try to tune it with the following parameters :

-XX:PermSize=... -XX:MaxPermSize=...

But be careful. If the value is too small then the JVM will raise this kind of exception "java.lang.OutOfMemoryError exception : Permgen space".

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.