This is my JVM parameters:
> /usr/local/java/bin/java -Xloggc:log/gc.log -XX:+UseConcMarkSweepGC -XX:CMSInitiatingOccupancyFraction=70 -XX:PermSize=64m -XX:MaxPermSize=64m -Xss128K -server -Xmn1024m -Xms3027m -Xmx3027m -Dresin.home=/usr/local/resin
I using Resin,the up is Resin start JVM parameters,the following is my GC output when I using jstat -gcutil pid 1000 1000
S0 S1 E O P YGC YGCT FGC FGCT GCT
0.00 1.60 46.21 25.62 21.69 72639 941.082 31 0.275 941.357
1.51 0.00 51.91 25.63 21.69 72640 941.093 31 0.275 941.368
0.00 1.87 62.96 25.64 21.69 72641 941.104 31 0.275 941.379
1.51 0.00 86.39 25.65 21.69 72642 941.114 31 0.275 941.389
0.00 1.56 94.28 25.65 21.69 72643 941.126 31 0.275 941.401
0.00 1.45 5.03 25.67 21.69 72645 941.146 31 0.275 941.421
1.74 0.00 18.76 25.68 21.69 72646 941.158 31 0.275 941.433
0.00 1.85 37.51 25.69 21.69 72647 941.169 31 0.275 941.443
1.59 0.00 53.58 25.70 21.69 72648 941.180 31 0.275 941.455
0.00 1.74 74.02 25.71 21.69 72649 941.192 31 0.275 941.467
We can find the minor GC about once per second,I feel it’s very frequent,because my new Edanz size is 1g.so why so frequent or that’s a normal thing?
Either you Eden size is not 1 GB or you are creating an incredible about of garbage. As you don’t appear to be setting your Eden size, suspects it much smaller than you think.
Try using
jstat -gccauseinstead to see the sizes.I suspect you have been reading http://www.caucho.com/resin-3.0/performance/jvm-tuning.xtp which incorrectly states that
-Xmnsets the Eden space. 😉The
-Xmxoption sets the maximum total heap size (young and old)The
-Xmnoption sets the size of the young generation which consists of the Eden space and two survivor spaces. As your survivor spaces don’t appear to be very full, I suspect they account for most of the 1 G of young generation.http://www.oracle.com/technetwork/java/javase/tech/exactoptions-jsp-141536.html
Try setting the
-XX:SurvivorRatio=to something like 10 and most of the 1 GB will be Eden space.http://www.oracle.com/technetwork/java/javase/tech/vmoptions-jsp-140102.html