Skip to content

Commit

Permalink
Scale DNSS expected ratio min/max 2x for InstantOn
Browse files Browse the repository at this point in the history
This patch scales dnssExpectedRatioMaximum and dnssExpectedRatioMinimum
by 2x when neither is user-specified and either CRIU or CRaC support is
enabled. This favours reduced memory consumption at the expense of GC
overhead.

Signed-off-by: Younes Manton <[email protected]>
  • Loading branch information
ymanton committed Nov 13, 2024
1 parent 32d32bc commit 0aab9d6
Showing 1 changed file with 16 additions and 0 deletions.
16 changes: 16 additions & 0 deletions runtime/gc_glue_java/ConfigurationDelegate.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -117,6 +117,22 @@ class MM_ConfigurationDelegate
if (!_extensions->dynamicClassUnloadingKickoffThresholdForced) {
_extensions->dynamicClassUnloadingKickoffThreshold = DYNAMIC_CLASS_UNLOADING_KICKOFF_THRESHOLD;
}

#if defined(J9VM_OPT_CRIU_SUPPORT)
/* Favour reduced memory consumption over pause times when checkpointing is enabled by
* scaling the default min and max DNSS expected ratios by a constant factor, unless
* at least one ratio was directly specified by the user.
*/
if (javaVM->internalVMFunctions->isCRaCorCRIUSupportEnabled(javaVM)) {
const double scaleFactor = 2;
if (!_extensions->dnssExpectedRatioMaximum._wasSpecified &&
!_extensions->dnssExpectedRatioMinimum._wasSpecified) {
_extensions->dnssExpectedRatioMaximum._valueSpecified *= scaleFactor;
_extensions->dnssExpectedRatioMinimum._valueSpecified *= scaleFactor;
}
}
#endif /* defined(J9VM_OPT_CRIU_SUPPORT) */

return true;
}

Expand Down

0 comments on commit 0aab9d6

Please sign in to comment.