Open
Description
openedon Nov 20, 2023
@maxandersen and @franz1981 taught me java 17 has support for jvm reclaiming memory back to the os:
- https://bugs.openjdk.org/browse/JDK-8293114 this is the feature
- this is what we have for G1 instead: https://bugs.openjdk.org/browse/JDK-8204089
And Netty behaviour is what's missing from the puzzle (see netty/netty#11845 (comment))
Meaning that while idle, https://bugs.openjdk.org/browse/JDK-8204089 just shrink back the heap RSS to xms
we need 2 set of VM args to be passed:
- autotrim interval -> which requires something like -XX:+UnlockExperimentalVMOptions -XX:TrimNativeHeapInterval=5000
- G1 periodic GC: -> G1PeriodicGCInterval, G1PeriodicGCInvokesConcurrent and G1PeriodicGCSystemLoadThreshold (for https://bugs.openjdk.org/browse/JDK-8204089)
OpenJDK supports -XX:+IgnoreUnrecognizedVMOptions
, in case users run an older JDK 17 that doesn't support the new flags, and OpenJ9 simply ignores unknown flags, so it's probably safe to try it out on insider builds.
@rgrunber @testforstephen @jdneo WDYT?
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment