Hi,
recently I have upgraded my JVM from 1.6 to 1.7 and from that time my server (
jboss) is suffering from GC for severals seconds every 5-6 mins. As
Java 7 has introduced new GC I have commented out this line in my server start script:
and now it looks like this:
With increasing memory from 4g to 12g I suffer the freezes less often, however obviously they last longer. Please take a look at gc.log when full gc takes place (and server freezes), first is just after start:
2012-02-14T23:28:01.495+0400: 5.485: [Full GC (System) [PSYoungGen: 55632K->0K(3670016K)] [PSOldGen: 0K->54379K(8388608K)] 55632K->54379K(12058624K) [PSPermGen: 23167K->23167K(46848K)], 0.4141070 secs] [Times: user=0.41 sys=0.00, real=0.41 secs]
2012-02-15T00:31:53.580+0400: 3837.523: [Full GC [PSYoungGen: 39308K->0K(4134016K)] [PSOldGen: 8368304K->2662766K(8388608K)] 8407613K->2662766K(12522624K) [PSPermGen: 149854K->149854K(302720K)], 16.6296611 secs] [Times: user=16.63 sys=0.00, real=16.63 secs]
2012-02-15T01:34:52.344+0400: 7616.243: [Full GC [PSYoungGen: 29688K->0K(4140544K)] [PSOldGen: 8359251K->2881431K(8388608K)] 8388939K->2881431K(12529152K) [PSPermGen: 150738K->150738K(302656K)], 17.7303998 secs] [Times: user=17.69 sys=0.00, real=17.74 secs]
2012-02-15T02:09:42.935+0400: 9706.798: [Full GC [PSYoungGen: 75367K->0K(4074880K)] [PSOldGen: 8358495K->2184325K(8388608K)] 8433863K->2184325K(12463488K) [PSPermGen: 151364K->146011K(288256K)], 18.4415495 secs] [Times: user=18.45 sys=0.00, real=18.44 secs]
....
2012-02-15T10:14:51.759+0400: 38815.262: [Full GC [PSYoungGen: 266802K->0K(3765888K)] [PSOldGen: 8361334K->1665185K(8388608K)] 8628137K->1665185K(12154496K) [PSPermGen: 148107K->148107K(279872K)], 14.7845768 secs] [Times: user=14.79 sys=0.00, real=14.79 secs]
As you see it happens now every about 30 mins and freezes server for 14-20 secs! I tried to take heap dump when xmx was set to 4gb, but had to cancel it as only 25% was done and server was already freezed for 3 mins... In my
test environment (not big load, tried to load some pages with JMeter) I took a heap dump in YourKit but really cannot locate problematic classes (besides duplicated Strings, but I do not believe that using intern() will solve the problem...) - perhaps anyone familiar with YourKit could give me a tip what to search for?
Anyway, I believe for now I could improve a lot by tunning this GC - perhaps I should go back to parallel collector?
Thanks for all answers,
Michal