---
title: How do I configure workers to fully allocate heap at startup?
---

Some JVMs automatically allocate the full heap at startup and touch all memory pages (e.g., Azul Zing 13). When migrating to JVMs that don't do this automatically (e.g., Zing 17 or standard OpenJDK), you may want to restore this behavior for specific workers.

## Solution

Create a custom JVM profile that combines:

- **`-Xms` equal to `-Xmx`** — Commits the full heap size at startup.
- **`-XX:+AlwaysPreTouch`** — Touches all heap pages during startup, allocating them into physical memory and avoiding potential allocation failures during operation.

Add the following to `iris-environment.prop` in the controller/console/web API service stanza:

```properties
# EagerHeap profile: Full heap allocation at startup
RemoteProcessingRequestProfile.custom.EagerHeap.include.1=G1 GC
RemoteProcessingRequestProfile.custom.EagerHeap.jvmParameter.pretouch=-XX:+AlwaysPreTouch
RemoteProcessingRequestProfile.Xms.EagerHeap=$RequestedHeap
```

Then select **EagerHeap** as the JVM profile for workers that need this behavior.

## Kubernetes installations

Kubernetes installations already include these settings by default for the G1 GC profile. If you're running on Kubernetes and using G1 GC, no additional configuration is needed.

## Related documentation

- [Remote processing profiles](../../sys-admin/pq-controller/remote-processing-profiles.md)
- [Eager heap allocation with AlwaysPreTouch](../../sys-admin/pq-controller/remote-processing-profiles.md#eager-heap-allocation-with-alwayspretouch)
