ZUncommit is enabled by default?

Sundara Mohan M m.sundar85 at gmail.com
Tue Dec 10 20:28:53 UTC 2019


Hi Stefan,
     Thanks for the doc.

I tried setting min < max and seeing this error

[2019-12-10T19:20:10.559+0000][35.277s][error][gc     ] Failed to uncommit
memory (Not supported)
[2019-12-10T19:20:10.560+0000][35.277s][info ][gc,init] Uncommit: Disabled

Guess it's related to kernel doesn't support something
Linux  2.6.32-754.10.1.el6.20190116.16.x86_64 #1 SMP Wed Jan 16 21:27:59
UTC 2019 x86_64 x86_64 x86_64 GNU/Linux


Thanks
Sundar

On Tue, Dec 10, 2019 at 12:21 PM Stefan Karlsson <stefan.karlsson at oracle.com>
wrote:

> Hi Sundar,
>
> It's described on our project wiki:
> https://wiki.openjdk.java.net/display/zgc/Main
>
> ---
> Returning Unused Memory to the Operating System
>
> By default, ZGC uncommits unused memory, returning it to the operating
> system. This is useful for applications and environments where memory
> footprint is a concern. This feature can be disabled using
> -XX:-ZUncommit. Furthermore, memory will not be uncommitted so that the
> heap size shrinks below the minimum heap size (-Xms). This means this
> feature will be implicitly disabled if the minimum heap size (-Xms) is
> configured to be equal to the maximum heap size (-Xmx).
>
> An uncommit delay can be configured using -XX:ZUncommitDelay=<seconds>
> (default is 300 seconds). This delay specifies for how long memory
> should have been unused before it's eligible for uncommit.
> ---
>
> Additionally, -Xms sets both -XX:InitialHeapSize and -XX:MinHeapSize, so
> if you only want to set the lower limit of the amount of committed
> memory for the heap, you can use -XX:MinHeapSize instead.
>
> StefanK
>
> On 2019-12-10 19:57, Sundara Mohan M wrote:
> > Hi,
> >   I am using following java version and see Uncommit feature is disabled
> by
> > default
> > openjdk version "13.0.1" 2019-10-15
> > OpenJDK Runtime Environment AdoptOpenJDK (build 13.0.1+9)
> > OpenJDK 64-Bit Server VM AdoptOpenJDK (build 13.0.1+9, mixed mode,
> sharing)
> >
> > GC logs
> >
> > [2019-12-10T18:47:43.171+0000][0.007s][info][gc,init] Initializing The Z
> > Garbage Collector
> > [2019-12-10T18:47:43.171+0000][0.007s][info][gc,init] Version: 13.0.1+9
> > (release)
> > [2019-12-10T18:47:43.171+0000][0.007s][info][gc,init] NUMA Support:
> Enabled
> > [2019-12-10T18:47:43.171+0000][0.007s][info][gc,init] NUMA Nodes: 2
> > [2019-12-10T18:47:43.171+0000][0.007s][info][gc,init] CPUs: 48 total, 48
> > available
> > [2019-12-10T18:47:43.171+0000][0.007s][info][gc,init] Memory: 128318M
> > [2019-12-10T18:47:43.171+0000][0.007s][info][gc,init] Large Page Support:
> > Disabled
> > [2019-12-10T18:47:43.171+0000][0.007s][info][gc,init] Workers: 40
> parallel,
> > 7 concurrent
> > [2019-12-10T18:47:43.174+0000][0.010s][info][gc,init] Address Space:
> > 0x0000040000000000 - 0x0000140000000000 (16T)
> > [2019-12-10T18:47:43.174+0000][0.010s][info][gc,init] Heap backed by
> file:
> > /tmp/java_heap.112273
> > [2019-12-10T18:47:43.174+0000][0.010s][info][gc,init] Min Capacity:
> 80000M
> > [2019-12-10T18:47:43.174+0000][0.010s][info][gc,init] Initial Capacity:
> > 80000M
> > [2019-12-10T18:47:43.174+0000][0.010s][info][gc,init] Max Capacity:
> 80000M
> > [2019-12-10T18:47:43.174+0000][0.010s][info][gc,init] Max Reserve: 112M
> > [2019-12-10T18:47:43.174+0000][0.010s][info][gc,init] Pre-touch: Enabled
> > [2019-12-10T18:47:43.174+0000][0.010s][info][gc,init] Available space on
> > backing filesystem: 125929M
> > *[2019-12-10T18:48:30.290+0000][47.126s][info][gc,init] Uncommit:
> Disabled*
> > [2019-12-10T18:49:30.315+0000][107.151s][info][gc,init] Runtime Workers:
> 40
> > parallel
> > [2019-12-10T18:49:30.318+0000][107.155s][info][gc     ] Using The Z
> Garbage
> > Collector
> > ...
> > Is this feature enabled by default in later release only?
> >
> > Thanks
> > Sundar
>
>


More information about the zgc-dev mailing list