[GR-58624] Support -XX:+AlwaysPreTouch in native image with EpsilonGC
Feature request
Please include the following information:
Is your feature request related to a problem? Please describe. EpsilonGC is suited quite well for use cases when low latency is required. Page faults introduce unnecessary jitter and pre-initializing memory at startup helps to avoid them. Oracle JVM supports AlwaysPreTouch VM option for this:
Pre-touch the Java heap during JVM initialization. Every page of the heap is thus demand-zeroed during initialization rather than incrementally during application execution.
If EpsilonGC is used in Oracle JVM a suggestion to enable AlwaysPreTouch is logged. See https://bugs.openjdk.org/browse/JDK-8232051.
Describe the solution you'd like. Add support for AlwaysPreTouch to EpsilonGC.
Describe who do you think will benefit the most. GraalVM users using native image to achieve predictable low latency.
Describe alternatives you've considered. -R:±AlwaysPreTouch is supported by G1 GC in native image. Unfortunately G1 GC is not suitable for the low latency applications as it is stop-the-world GC with multi-ms pauses.
Express whether you'd like to help contributing this feature If you'd like to contribute, please read the contribution guide.
EpsilonGC is quite a niche usecase. This would certainly be an interesting extension but I doubt we will treat this with priority any time soon.