1

Running G1GC (Java 8) with below

MaxGCPauseMillis=100
InitiatingHeapOccupancyPercent=30
G1MixedGCLiveThresholdPercent=85

and memory is 115 GB.

I notice that there was a Full GC and it brought down memory from 111GB to 65 GB. Prior to Full GC there were few mixed GC but that was unable to clear memory. Is there any other parameter I should set?

Florian Weimer
  • 32,022
  • 3
  • 48
  • 92
  • 5
    In general, decisions about garbage collection are the runtime's responsibility. You shouldn't ever have to think about GC, and if you do, there are patterns like Object Pools that are designed to mitigate GC problems. – Robert Harvey Dec 11 '18 at 18:56
  • If mixed GC could always reclaim all memory, the feature of doing a full GC did not exist. And if there was a magic option that improves the performance of every application, that option was already the default. – Holger Dec 12 '18 at 14:37
  • Any suggestions on how to approach this problem? – user3660575 Dec 12 '18 at 20:43

1 Answers1

0

Promptly returning unused memory to the operating system is an OpenJDK 12 feature for the G1 collector:

You are observing the limitation described in the proposal: only full GCs return memory to the operating system, mixed/minor GCs do no ot. Also see this related question.

Florian Weimer
  • 32,022
  • 3
  • 48
  • 92