cancel
Showing results for 
Search instead for 
Did you mean: 

want to change java mem size, but how

bisana
Champ on-the-rise
Champ on-the-rise
Hi All,
I am trying to increase "PermGem" size, I am refering to the url
http://wiki.alfresco.com/wiki/JVM_Tuning#Permanent_Generation_.28PermGen.29_Size
But in this wiki page I was not able to find which file, and which parameter to change for it to get reflected
How to increase the heap size, which file to modify, and where to modify for ALfesco CE 4.2.d on a Linux system with RAM 6 GB memorey size
Help and advice requested.
Thanks
Joseph John
2 REPLIES 2

abarisone
Star Contributor
Star Contributor
Hi,
usually change
tomcat/bin/catalina.sh
file setting JVM parameteres upon your needs.
For example I added
export JAVA_OPTS='-server -Xmx8g -Xms8g -Xss256k -XX:MaxPermSize=512m -XX:NewSize=4g -Dfile.encoding=UTF-8'
where
<ol>
-XX:NewSize=2m

Default size of new generation (in bytes) [5.0 and newer: 64 bit VMs are scaled 30% larger; x86: 1m; x86, 5.0 and older: 640k]

-XX:MaxPermSize=64m

Size of the Permanent Generation.  [5.0 and newer: 64 bit VMs are scaled 30% larger; 1.4 amd64: 96m; 1.3.1 -client: 32m.]

-Xmx <size>[g|G|m|M|k|K] 

This option sets the maximum Java heap size. The Java heap (the “heap”) is the part of the memory where blocks of memory are allocated to objects and freed during garbage collection. Depending upon the kind of operating system you are running, the maximum value you can set for the Java heap can vary.

-Xms<size>[g|G|m|M|k|K]

The -Xms option sets the initial and minimum Java heap size. The Java heap (the “heap”) is the part of the memory where blocks of memory are allocated to objects and freed during garbage collection.

-Xss<size>[g|G|m|M|k|K]

-Xss sets the thread stack size. Thread stacks are memory areas allocated for each Java thread for their internal use. This is where the thread stores its local execution state.
</ol>

Regards,
Andrea

bisana
Champ on-the-rise
Champ on-the-rise
thanks