When trying to understand what is going on with GC logging on G1GC. I found an undocumented JVM param that can really help when using CMS. -XX:PrintFLSStatistics=1 will report extra data for every GC:
8.790: [ParNew: 72703K->6341K(76672K), 0.0067245 secs] 72703K->6341K(816832K)After GC:
Statistics for BinaryTreeDictionary:
------------------------------------
Total Free Space: 94724096
Max Chunk Size: 94724096
Number of Blocks: 1
Av. Block Size: 94724096
Tree Height: 1
After GC:
Statistics for BinaryTreeDictionary:
------------------------------------
Total Free Space: 0
Max Chunk Size: 0
Number of Blocks: 0
Tree Height: 0
, 0.0068238 secs] [Times: user=0.06 sys=0.00, real=0.01 secs]
This can really help when trying to understand CMS concurrent mode failure due to fragmentation
Pity it is not reporting data in a single line though :-)
3 comments:
Have you run into the problem where there is bad output from "-XX:PrintFLSStatistics=1" if you have very large heap sizes? (e.g. my heap is 65GB)
Example output:
Statistics for BinaryTreeDictionary:
------------------------------------
Total Free Space: -1519901647
Max Chunk Size: -1519901647
Number of Blocks: 1
Av. Block Size: -1519901647
Tree Height: 1
Just curious!
Looks like an overflow :-)
Never tried Heaps that big
I don't understand these logs. Can you come up with post explaining what every line means? Also logs say 2 times: After GC. Shouldn't it be Before GC and After GC?
Post a Comment