Skip to main content

Resource Tuning

The Ignition Helm Chart sets pod resource requests and limits by default. This helps the Kubernetes scheduler make the right decisions on where you schedule Ignition to run.

Default settings:

  • 1 CPU core, 1.5Gi of RAM
  • 75% JVM Heap Percentage

Careful attention should be paid to allocation of memory for your Ignition Gateway. The memory requirements can vary widely based on what type of Ignition application you've created and what modules are in use. It can also vary based on more than just JVM heap usage. Direct memory buffers, OS threads, and other native memory usage can all contribute to the overall memory footprint. Some applications can even run fine under normal conditions and then experience spikes in memory usage during certain operations. When memory usage exceeds the container limit, the pod will be terminated by the kubelet and restarted. This is often referred to as an "OOM Kill".

We recommend starting with conservative defaults and observing and tuning during development of your application.

Configuring resource allocations​

The example values below show how to customize resource allocations:

# testing.yaml
gateway:
resourcesEnabled: true
resources:
limits:
cpu: "4"
memory: "4Gi"
requests:
cpu: "4"
memory: "4Gi"
maxRAMPercentage: 50

This configuration will allocate 4 CPU cores and 4Gi of RAM to the Ignition Pod. The JVM will be configured to use 50% (2Gi) of the available RAM for its heap.