Why do I need to reserve memory for Zing?

This article refers to Zing when using it with the now optional component ZST. Since ZVM 19.07 the ZST component is not required any more and depending on your use case Zing without ZST might be the preferred choice now as by its different memory management it is not affected by the problem described here. Though for large heapsizes (-Xmx settings) of hundreds of GBytes, the ZST component adds performance advantages for most applications.

Zing when used with the ZST component preallocates a chunk of memory to hold the entire Xmx value setting to house regular Java objects that get allocated on the heap, plus additional spaces for other data types.

The first choices you make in reserving memory in Zing are how much memory to reserve and when in the JVM process life cycle you want it allocated. Use the utility system-config-zing-memory in the Zing Systems Tools set to make your choices.

For Zing with ZST the two available policies for determining when to preallocate Zing memory are:

  • reserve-at-config
  • reserve-at-launch

Selecting reserve-at-config will preallocate all the Zing memory at once. Memory stays allocated, no matter how many times the ZVM starts or stops. This is the mode you might prefer if you know that on this host only Zing java processes are used and their -Xmx settings are not changed often. It is also the preferred mode on large machines in the range of hundreds of GBytes for the -Xmx setting.

Selecting reserve-at-launch will preallocate all the Zing memory when the Zing java process starts, and releases it when the process ends. This is the mode you might prefer if Zing java is not always used on this host, like on developer machines, or if you have a mixed environment with other processes running.

When doing new installation of Zing, the memory allocation policy is set  to reserve-at-launch by default to simplify the installation and to avoid to preallocate too much memory for Zing.

For further details about the Zing memory configuration using sudo system-config-zing-memory, please go to the following documentation page: http://docs.azul.com/zing/index.htm#ModZingMemConfig.htm



Add Comment



Please sign in to leave a comment.

Was this article helpful?
0 out of 0 found this helpful