RFR: 8319548: Unexpected internal name for Filler array klass causes error in VisualVM
Thomas Schatzl
tschatzl at openjdk.org
Fri May 3 12:52:59 UTC 2024
On Tue, 19 Dec 2023 10:08:14 GMT, Thomas Schatzl <tschatzl at openjdk.org> wrote:
> Hi all,
>
> please review this change that changes the filler array class name (again) after user feedback.
>
> In particular, the previous name `Ljdk/internal/vm/FillerArray;` confuses some tools (https://github.com/oracle/visualvm/issues/523). I.e. it's not an array, but still variable sized.
> This change adds the `[` array bracket, and renames the element name to not have `Array` inside to not try to pretend that the element is some other kind of array.
>
> Testing: tier1-6
>
> Thanks,
> Thomas
(because the bot does not seem to forward the answer from the mailing list within a few hours; fwiw, it has been pure luck that I stumbled across that question within github):
On 30.04.24 03:38, jjscl8888 wrote:
> Thank you for your clarification. if the instance in question had no
> traffic but you observed a sudden increase in the old generation size
> at 2:35 in the graph, and subsequent garbage collections (GCs) did not
> reduce the size of the old generation back to its original value
Collectors are fairly reluctant to give back memory to the OS.
For G1 in particular, there are the options `MinHeapFreeRatio` and `MaxHeapFreeRatio` which to some degree steer commit and uncommit.
* `MinHeapFreeRatio` is "The minimum percentage of heap free after GC to avoid expansion", i.e. minimum amount of memory should be kept free. Default is 40%, i.e. expands if less than that amount of memory is free.
* `MaxHeapFreeRatio` is "The maximum percentage of heap free after GC to avoid shrinking", i.e. maximum amount of memory that should be kept free. Default is 70%; i.e. only shrinks the heap if more than 70% of memory is free.
Not sure the latter condition is met here to shrink, and without logs (`-Xlog:gc+ergo+heap=debug`) this is just a guess. Also, this kind of heap resizing (including shrinking) only occurs in the Remark pause.
So to decrease the heap more aggressively, it might work to decrease `MaxHeapFreeRatio` (and probably `MinHeapFreeRatio` too because for such large heaps the default values are maybe not optimal).
Hth,
Thomas
-------------
PR Comment: https://git.openjdk.org/jdk/pull/17155#issuecomment-2092954588
More information about the hotspot-gc-dev
mailing list