I am recently seeing some weird behaviour with G1GC. I am using java 1.8.0_152 and have set GC algorithm as G1GC with string deduplication. Recently I see that the memory footprint of java process (got from top -c) is 6.8g while the actual heap size (S0U + S1U + EU+ OU) 4 gb. With 260 threads (using default xss 1MB) I see that 2.54gb memory is taken by G1 collector itself which seems quite large.. Am I missing something here..Can someone please help me out here...as to why G1GC itself is taking so much memory..What will happen if I heap increases to 6 gb...Will G1GC try to take more than the existing RAM (8gb) and fail or will it do a full GC (which I believe it should) at that time
My XMX is 7GB
It looks like G1GC internals are taking extra memory. I ran a full GC through jstat and the java process footprint increased by 0.1gb. This makes me think that G1GC internals are taking this memory. Apart from reducing the RAM is there anyway else to ensure that G1GC itnernals don't take too much memory