---
title: "JMeter Heap / JVM Sizing Estimator"
description: "Estimate JMeter injector heap (-Xmx) from thread count, engine count, scripting, and listeners. Free client-side tool on docs.jmeter.ai."
url: https://docs.jmeter.ai/tools/heap-estimator/
lastUpdated: 2026-10-01
source: docs.jmeter.ai
---

# JMeter Heap / JVM Sizing Estimator

Pick a **starting** `-Xmx` for injectors. Memory depends on threads, samplers, scripting, listeners, and response sizes. This tool gives a conservative first guess you should validate with GC logs.

## How to apply the flags

On the command line (example):

```bash
JVM_ARGS="-Xms512m -Xmx2048m" jmeter -n -t plan.jmx -l results.jtl
```

Or paste HEAP into the [CLI Command Builder](/tools/cli-builder/) with the rest of the run flags.

Or set `HEAP` in your JMeter startup script / environment for the version you ship.

## Practical tips

- Prefer **CLI mode** for load; GUI burns heap on rendering.
- Disable **View Results Tree / Table** during load tests.
- In distributed mode, size **each engine** for its share of threads.
- Controllers usually need less heap than injectors.

## Related reading

- [Best Practices](/user-manual/best-practices/)
- [Thread Calculator](/tools/thread-calculator/)
- [Remote Testing](/user-manual/remote-test/)
- [Listeners](/user-manual/listeners/)

## Continue Learning

→

### Next Practical Step

Size threads with the [Thread Calculator](/tools/thread-calculator/), then re-check heap.

📖

### Related Reference

[Properties cheat sheet](/tools/properties-cheatsheet/) · [Dashboard report](/user-manual/generating-dashboard/)

⚠

### Common Mistakes

Raising -Xmx endlessly while View Results Tree is still enabled.

🔧

### Troubleshooting

Still OOM? Reduce threads per engine, strip listeners, avoid saving response data.
