We are using open-jdk 11 and 2GB is used as the max heap size. The application works smoother till it has enough Eden space and performance starts to degrade when the Eden space shrinks to less than 300MB. Whenever the oldgen reaches 1GB (50%), the Eden space is shrunk to less than 50GB. When the Eden space goes less than 50MB, the JVM hangs. After restarting only, the application is back to its normal state.
Please help me to understand why it is not expanding more than 1GB (50%) since we have 2GB of the max heap size.