The default MaxRAMPercentage is set to 80.0, but it doesn't take MaxMetaspaceSize or ReservedCodeCacheSize into consideration.
Wouldn't it be more effective to dynamically calculate the MaxRAMPercentage, factoring in GC_MAX_METASPACE_SIZE and possibly ReservedCodeCacheSize?
I manually patched the java-default-options to support dynamic calculation of MaxRAMPercentage, and we haven't experienced any OOMKilled incidents since implementing the change.
The default
MaxRAMPercentageis set to80.0, but it doesn't takeMaxMetaspaceSizeorReservedCodeCacheSizeinto consideration.Wouldn't it be more effective to dynamically calculate the
MaxRAMPercentage, factoring inGC_MAX_METASPACE_SIZEand possiblyReservedCodeCacheSize?I manually patched the
java-default-optionsto support dynamic calculation ofMaxRAMPercentage, and we haven't experienced anyOOMKilledincidents since implementing the change.