Visit Azul.com Support

Azul Zing System Tools Memory Configuration

Need help?
Schedule a consultation with an Azul performance expert.
Contact Us

If you have the Azul Zing System Tools (ZST) installed, you can configure the Zing Memory either by using the system-config-zing-memory wizard (see Configure Zing Memory for details) or by directly modifying the settings in the /etc/zing/pmem.conf file.

To reload the modified settings, a restart of the zing-memory system service is needed. The restart is possible only when all Azul Platform Prime java processes are stopped.

The following command checks for running Azul Platform Prime java processes:

 
$ zing-ps -s

To restart the ZST zing-memory system service, use:

 
$ sudo service zing-memory restart

The ZST can be configured in two different modes:

  • reserve-at-config: the memory pool used for all Java heaps is allocated and reserved during the start of the zing-memory system service

  • reserve-at-launch: the memory used for each Java heap is allocated at the time of the java process start. This behavior is similar to when using Azul Platform Prime without the ZST, which is possible since version 19.07.0.0 of the Azul Zing Build of OpenJDK (Zing).

See a configuration example for reserve-at-config in file /etc/zing/pmem.conf:

 
# Memory configuration file version version 2.0 # ZST status (should always be enabled) # values: enabled | disabled pmem enabled # ZST mode when-to-reserve reserve-at-config # memory reservations for ZST, all in percentage of system RAM # instead of % you can also use absolute values with unit specifier MB or GB # reserved memory for Java heaps, sum of all -Xmx Reservable 68% # contingency memory Contingency 4% # pause prevention memory PausePrevention 4% # use all NUMA nodes nodemask ALL

See a configuration example for reserve-at-launch in file /etc/zing/pmem.conf:

 
# Memory configuration file version version 2.0 # ZST status (should always be enabled) # values: enabled | disabled pmem enabled # memory cgroup enforcement # values: enabled | disabled cgroups disabled # ZST mode when-to-reserve reserve-at-launch # memory limits for ZST, all in percentage of system RAM # instead of % you can also use absolute values with unit specifier MB or GB # total sum of all limits OverallUpperLimit 76% # limit for sum of all -Xmx ReservableUpperLimit 68% # contingency memory # here we reserve a static block of 4% of system RAM ContingencyUpperLimit 4% ContingencyMinimumFreeMemory 4% # pause prevention memory # here we reserve a static block of 4% of system RAM PausePreventionUpperLimit 4% PausePreventionMinimumFreeMemory 4% # use all NUMA nodes nodemask ALL

To view and verify the current configuration settings, run the following command:

 
zing-ps -s

This command also shows the current maximum available -Xmx value in megabytes. For the reserve-at-config mode, the maximum -Xmx is guaranteed and shown in the Free row of the Reservable column.

For the reserve-at-launch mode, only the theoretical upper limit of -Xmx is shown in the UpperLimit row of the Reservable column as the practically usable amount can be slightly smaller depending on the current memory fragmentation of the system.