Visit Azul.com Support

Reservable and Reserved Memory

Table of Contents

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

The Reservable memory is a portion of the System Zing Memory reserved when the reserve-at-config policy is chosen when configuring your system using the system-config-zing-memory tool. In this case, the Reservable memory is available to any Azul Zulu Prime Builds of OpenJDK (Azul Zulu Prime JVM) instance at launch. Specific requests for memory made by the Azul Zulu Prime JVM are assigned to that Azul Zulu Prime JVM instance running a Java application. Reservable memory is assigned to new Azul Zulu Prime JVM instances until the available Reservable memory is insufficient to start another Azul Zulu Prime JVM instance. Reservable memory comprises the bulk of the System Zing Memory.

Reserved memory is the amount of memory initially allocated to a specific Azul Zulu Prime JVM instance when the instance starts. This is the memory the Azul Zulu Prime JVM instance uses as Java heap memory. The Reserved memory is reserved for each JVM instance. It guarantees space to store a minimum live set for each Azul Zulu Prime JVM instance plus the space to support the object creation required to support the work done in the application. The live set is the set of objects in the Java heap referenced by the Java application. The live set can also be described as the amount of memory remaining in the heap after a simultaneous new and old generation garbage collection.

Multiple Azul Zulu Prime JVM instances can be started on a system, each being assigned its allocated amount of Reservable memory. When a Azul Zulu Prime JVM instance exits, its Reservable memory is released back to the system’s Reservable memory and is available for other Azul Zulu Prime JVM instances.

The amount of memory allocated to a Azul Zulu Prime JVM instance when it starts is determined by the value of the –Xmx Java heap size command line option.

Estimating the Number of Possible Concurrent Azul Zulu Prime JVM Instances

When estimating the number of Azul Zulu Prime JVM instances running Java applications that can run concurrently on a system, determine the amount of System Zing Memory available, subtract the percentage of System Zing Memory allocated to Pause Prevention and Contingency memory, and then divide the remaining amount of System Zing Memory by the typical Java heap (-Xmx) memory that would be set for your Azul Zulu Prime JVM instances.

For example:

  • The configured System Zing Memory is 100 GB. The amount of memory allocated to Pause Prevention and Contingency memory is 10 GB. The remaining available System Zing Memory, the Reservable memory, is 90 GB.

  • Total the -Xmx values you will use for each of the Java applications you want to run. Remember, in a Zing environment, the -Xmx value can be large because there is no concern for garbage collection pauses

  • So, for this example, in a Zing environment where you want to maximize your Java application performance, set -Xmx to 20 GB for each Azul Zulu Prime JVM instance. This enables running 4 concurrent Azul Zulu Prime JVM instances (4 Azul Zulu Prime JVM instances x 20 GB in -Xmx = 80 GB consumed, with 10 GB left over from the 90 available).

Note
In addition to the number of concurrent Azul Zulu Prime JVM instances, account for the number of available cores. Do not expect multiple busy Azul Zulu Prime JVM instances to run well on a limited number of cores. Distribute Azul Zulu Prime JVM instances over the available host systems.