Trino Memory Sizing Guidelines
- Total Node Memory: Set to the physical RAM (in GB) of each Trino worker node (excluding OS needs).
- JVM Heap (-Xmx): 70–80% of node memory. The rest is for OS, file cache, and off-heap buffers.
- JVM Headroom: ~30% of JVM heap (never set lower than 2GB). Prevents JVM OutOfMemory.
- Query Max Memory Per Node: ~30% of JVM heap. Allows larger queries, but too high reduces concurrency and headroom.
- Query Max Memory (Cluster): Per Node × Worker Nodes.
- Query Max Total Memory: Usually double Query Max Memory (Cluster); this is the hard limit.
- All settings must respect constraints and not exceed available heap or cluster memory.
Trino Memory Config Calculator
Generated Trino Config
Notes & Validation Tips:
- If you see warnings above, adjust sliders to resolve them before applying config.
- Test with production-like loads and monitor JVM/Trino metrics after deploying.
- Revisit and tune settings as your cluster or query patterns evolve.
- For advanced resource management (like resource groups), see the official docs.
This calculator provides a guideline and safe starting point. Final tuning should always be data-driven.