I'm running a java program using 3GB heap space. After a while I notice this in the gc logs.
Application time: 0.8263100 seconds
2015-03-13T07:24:49.065-0700: 77177.620: [GC Before GC:
Statistics for BinaryTreeDictionary:
Total Free Space: 2960457
Max Chunk Size: 1233864
Number of Blocks: 393
Av. Block Size: 7532
Tree Height: 19
Before GC:
Statistics for BinaryTreeDictionary:
Total Free Space: 0
Max Chunk Size: 0
Number of Blocks: 0
Tree Height: 0
77177.620: [ParNew (0: promotion failure size = 2154) (1: promotion failure size = 2154) (2: promotion failure size = 2154) (3: promotion failure size = 2154) (4: promotion failure size = 2154) (5: promotion failure size = 2154) (6: promotion failure size = 2154) (7: promotion failure size = 2154) (8: promotion failure size = 2154) (10: promotion failure size = 2154) (11: promotion failure size = 2154) (12: promotion failure size = 2154) (13: promotion failure size = 2154) (14: promotion failure size = 2154) (15: promotion failure size = 2154) (16: promotion failure size = 2154) (17: promotion failure size = 2154) (18: promotion failure size = 2154) (19: promotion failure size = 2154) (20: promotion failure size = 2154) (21: promotion failure size = 2154) (22: promotion failure size = 2154) (23: promotion failure size = 2154) (24: promotion failure size = 2154) (25: promotion failure size = 2154) (26: promotion failure size = 2154) (27: promotion failure size = 2154) (promotion failed): 346350K->333366K(393216K), 0.3779580 secs]77177.998: [CMSCMS: Large block 0x00000007b7da3200
: 2156277K->1695244K(2621440K), 11.2619970 secs] 2481226K->1695244K(3014656K), [CMS Perm : 193077K->191199K(256000K)]After GC:
Statistics for BinaryTreeDictionary:
Total Free Space: 118536640
Max Chunk Size: 118536640
Number of Blocks: 1
Av. Block Size: 118536640
Tree Height: 1
After GC:
Statistics for BinaryTreeDictionary:
Total Free Space: 0
Max Chunk Size: 0
Number of Blocks: 0
Tree Height: 0
, 11.6404220 secs] [Times: user=16.85 sys=0.04, real=11.64 secs]
Total time for which application threads were stopped: 11.6432380 seconds
Application time: 0.0421420 seconds
Total time for which application threads were stopped: 0.0189740 seconds
Because of this Full GC, my program was stopped for 11 seconds. It caused a huge performance problem. The thing is, everywhere people are telling [promotion failure = fragmentation]. If that is so, then why is max Chunk size(1233864) before GC still more than all the promotion failure block sizes(2154) combined.
I have check everywhere and not been able to find the cause for this problem.
Does anyone here know the reason why this keeps occurring?