Skip to main content

Resources

The Ignition Helm Chart allows you to easily configure the resource limits and requests via the gateway.resources value. The default is to set limits and requests for CPU and Memory to 1 CPU and 1.5Gi of RAM, respectively.

The Java Virtual Machine (JVM) for Ignition will be allocated 75% of the memory limit by default, based on the gateway.maxRAMPercentage value. The defaults are shown below:

gateway:
maxRAMPercentage: 75
resourcesEnabled: true
resources: {}
# limits:
# cpu: 1000m
# memory: 1536Mi
# requests:
# cpu: 1000m
# memory: 1536Mi

The default max JVM heap percentage may not be correct for all projects in Ignition. Buffers, OS threads, and other processes that run inside the Ignition pod all contribute to the total memory usage. If these limits are exceeded, Kubernetes will terminate the pod, forcing a restart of Ignition.

Customizing Resource Limits and Requests​

Resource requests are used by Kubernetes for scheduling workloads onto an available node. Resource limits are used to enforce maximum usage. You can customize these settings by overriding the gateway.resources value. It is fairly typical to set limits and requests to the same value.

For example, the settings below will apply 4 CPUs and 4 GiB of total memory to Ignition.

gateway:
resources:
limits:
cpu: 4000m
memory: 4Gi
requests:
cpu: 4000m
memory: 4Gi

You'll observe "Max Heap 3GB" in the Ignition Performance page under Diagnostics. This is due to the default setting of 75% of total memory to be allocated to the JVM heap via gateway.maxRAMPercentage. You can override this value to a lower percentage if your application needs larger buffer headroom and/or if you're deploying additional sidecar containers alongside Ignition. Other project needs may also warrant tuning memory allocations.

gateway.maxRAMPercentageDescription
0Disable percentage based JVM heap allocation
25 to 85Use a custom percentage.
auto
✨ New in v0.2.4
Use a dynamic percentage based on applied memory limits.
Memory Limit Required for Percentage Allocation

If gateway.resources.limits.memory is not specified, the memory percentage allocation is skipped in order to prevent inadvertent whole-node memory consumption. In this scenario, you may wish to manually configure the JVM heap allocation. See Resource Tuning for more information.

Gateway JVM Heap Auto-Sizing​

✨ New in v0.2.4

Setting gateway.maxRAMPercentage to auto will enable dynamic JVM heap sizing based on the memory limits applied to the Ignition pod.

Memory LimitMax JVM Heap %
<= 4Gi50 %
<= 6Gi60 %
<= 8Gi70 %
<= 16Gi80 %
> 16Gi85 %

Example:

gateway:
maxRAMPercentage: auto
resources:
limits:
cpu: 4000m
memory: 5Gi
requests:
cpu: 4000m
memory: 5Gi

The values above will result in a 3GiB max JVM heap allocation with a 5GiB total memory limit.