Visit Azul.com Support

Using Control Groups

Looking for Zing? The Azul Zing Virtual Machine is now Azul Zulu Prime Builds of OpenJDK and part of Azul Platform Prime. Learn more.

Control groups (cgroups) is a Linux feature that provides a way of limiting access to system resources for processes when running applications. By using cgroups, you can limit CPU and memory resources.

This setting only relates to memory limited cgroups, for example, those used by container environments activated by the --memory parameter to limit a container’s memory. The cgroups behavior regarding CPU resources is always enabled and behaves similar to OpenJDK.

For the Azul Zulu Prime System Tools (ZST) 5.21.x release line starting with 5.21.7, cgroups support in Azul Platform Prime is automatically enabled when running on RHEL 7. It cannot be enabled or disabled manually.

For ZST 5.22.x and beyond, cgroups support is disabled by default but can be enabled for all operating systems with the cgroups enabled line in the file /etc/zing/pmem.conf. After changing this setting, ZST needs to be restarted as follows: systemctl restart zing-memory. This makes cgroups behavior regarding memory limits similar to OpenJDK’s behavior.

With cgroups support enabled, the JVM process will behave similarly to an OpenJDK process under cgroups control. If the process exceed the defined cgroups limit, it will be terminated by Linux. The only difference between Azul Platform Prime and OpenJDK is the availability of Contingency Memory and Pause Prevention Memory for Java applications on Azul Zulu Prime JVM. As soon as one of the two memory pools is used by Azul Zulu Prime JVM, the total heap usage exceeds the defined -Xmx limit. ZST memory configuration pmem.conf file defines by how much the memory usage can exceed the -Xmx setting. It is possible to set both memory pools to 0 (% of system RAM) for all Azul Zulu Prime JVM processes on that host or configure it individually per process.