RFC: JEP draft: Automatic Heap Sizing for G1
Thomas Schatzl
thomas.schatzl at oracle.com
Tue Jul 1 07:33:49 UTC 2025
Hi Kirk,
On 27.06.25 16:40, Kirk Pepperdine wrote:
> Hi Thomas,
>
> I like the proposal. The only questions I have is with regards to the section
> on "Responding to machine memory pressure” and testing. How do you see
> testing the features that respond to increased memory pressure?>
basically we intend to piggyback on what has been done for ZGC so
far. It basically involves starting the VM in a memory limited
container, then add some memory consumer (may just be a raw C program
committing/uncommitting memory over time), and verify that the running
VM reacts on that.
We may formalize the expected behavior a bit more in some place as the
implementation matures.
Note that the current extent of this functionality is mostly somewhat
basic avoidance of OOME for the VMs in e.g. a container.
The VM does not know much about additional requirements like priorities,
can not divine the intent of the user, etc. so may only fit very simple
use cases. (Like the "allow potential use of all memory in the
environment" one).
There is the expectation that users to use the
*GCIntensity/GCTimeRatio/* controls to implement their own custom
policies (if they have the need).
Hth,
Thomas
More information about the hotspot-gc-dev
mailing list