eclipse-openj9 / openj9

Eclipse OpenJ9: A Java Virtual Machine for OpenJDK that's optimized for small footprint, fast start-up, and high throughput. Builds on Eclipse OMR (https://github.com/eclipse/omr) and combines with the Extensions for OpenJDK for OpenJ9 repo.
Other
3.28k stars 720 forks source link

Make `-Xmnx` proportional to `-Xsoftmx` in Balanced GC #13543

Open cedrichansen opened 3 years ago

cedrichansen commented 3 years ago

With the existing balanced GC eden sizing logic (and even with changes introduced in https://github.com/eclipse-openj9/openj9/pull/12043) , if a user specifies -Xmx10G -Xmnx5G -Xsoftmx2G, then the -xmnx being used by the eden sizing logic will be 5G.

In Gencon, as of https://github.com/eclipse/omr/pull/6141, this behaviour has been modified, such that the actual maximum amount of space used by nursery, is proportional to -Xmnx/-Xmx - That is, (using the example above), nursery will be allowed to use 50% (5G / 10G) of 2G softmx limit - or in other words, nursery can grow up to 1G. If softmx were to dynamically change to 8G, then nursery can grow up to 4G (again, 50% of softmx value). In a more mathematical sense, actual max nursery size = (-xmnx/-xmx) * -xsoftmx

The behaviour in Balanced GC should be made consistent with the behaviour of Gencon, such that Eden size is proportional to the softmx in use.

Please note the following:

cedrichansen commented 3 years ago

@amicic @dmitripivkine