Click here to Skip to main content
15,885,278 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Below is my GC settings in my 32 bit Linux Server of Quad Core processor of 2 GB RAM

After setting this , my Survivor Space is not at all getting used and Major GC happening on every 5 to 10 mins for 1 to 2 mins.


-XX:MaxNewSize=1024M
-XX:MaxPermSize=256M
-XX:NewSize=1024M
-XX:SurvivorRatio=6
-Xms1792M
-Xmx1792M
-XX:+UseCMSInitiatingOccupancyOnly
-XX:+UseConcMarkSweepGC
-XX:-UseAdaptiveSizePolicy
-XX:CMSInitiatingOccupancyFraction=60


Kindly check and let me know why the Survivor Space is not getting used and Major GC happening for every 10 mins.
Posted
Updated 24-Apr-13 7:50am
v2

I am not a java gc guru, but I know that these settings alone won't make you happy or sad, since everything depends on the memory usage. Your 2GiB RAM is much likely too small. But nobody can tell more without detailed memory usage statistics. First of all, I suggest you consult following article: http://www.curiousmentality.co.uk/2011/11/tuning-jvm-memory-settings/[^] . Use the VisualVM for gathering data.
 
Share this answer
 
Read about the heap space[^]

Read about Garbage Collector[^]

If your app does not have "surviving pojos", then the heap's Survivor Space is not used.
Survivors are a typical problem when using JNI to connect to some C Coding and a reference to that system (e.g. a pointer there) is held.

You can request the GC to run, that is not considered to be that evil. Although it's best to not need to request the GC to run.
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

  Print Answers RSS
Top Experts
Last 24hrsThis month


CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900