JDK-8222145 : Add -XX:SoftMaxHeapSize flag
  • Type: Enhancement
  • Component: hotspot
  • Sub-Component: gc
  • Affected Version: 13
  • Priority: P4
  • Status: Resolved
  • Resolution: Fixed
  • Submitted: 2019-04-08
  • Updated: 2019-12-17
  • Resolved: 2019-06-07
The Version table provides details related to the release that this issue/RFE will be addressed.

Unresolved : Release in which this issue/RFE will be addressed.
Resolved: Release in which this issue/RFE has been resolved.
Fixed : Release in which this issue/RFE has been fixed. The release containing this fix may be available for download as an Early Access Release or a General Availability Release.

To download the current JDK release, click here.
JDK 13 JDK 14
13 b25Fixed 14Fixed
Related Reports
Blocks :  
Blocks :  
CSR :  
Relates :  
Sub Tasks
JDK-8222487 :  
Introduce a manageable SoftMaxHeapSize flag. When set, the GC should strive to not grow heap size beyond the specified size. But as the flag name suggests, this is a soft limit. In other words, the GC is allowed to grow the heap size beyond SoftMaxHeapSize if needed.

There are a few different use cases where this flag could be useful. For example, when you want to keep the heap footprint down, while maintaining the capability to deal with a temporary increase in heap space requirement. Or when you want to play it safe, with lots of margin, to increase confidence that you will not run into an allocation stall because of an unforeseen increase in allocation rate.

The SoftMaxHeapSize should not be allowed to be set to a value greater than the max heap size (-Xmx). When not set on the command-line, this flag should default to the max heap size.