Back to Zing Documentation Home
Using Control Groups (Cgroups)
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 Zing ZST 5.21.x release line starting with 5.21.7, cgroups support in Zing is automatically enabled when running on RHEL 7. It cannot be enabled or disabled manually.
For Zing 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, Zing System Tools 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 ZVM 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 ZVM and OpenJDK is the availability of Contingency Memory and Pause Prevention Memory for Java applications on Zing ZVM. As soon as one of the two memory pools is used by ZVM, 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 ZVM processes on that host or configure it individually per process.
© Azul Systems, Inc. 2020 All rights reserved.