Heap Used vs Committed Memory
This troubleshooting guide explains the difference between heap used and heap committed memory so you can improve memory monitoring with the Nodinite JMX Monitoring Agent.
Understanding JVM Heap Memory
The JVM manages JVM memory in a heap divided into regions. Two key metrics help you understand heap health and set each monitoring threshold correctly:
| Metric | Description | When It Changes |
|---|---|---|
| Heap Used | Memory actively occupied by live objects | After every garbage collection cycle |
| Heap Committed | Memory reserved (committed) by the OS for the JVM | Grows up to -Xmx as demand increases |
| Heap Max | Maximum heap size configured via -Xmx |
Set at JVM startup, rarely changes |
Diagram: Relationship between heap used, committed, and max, showing how unchecked growth leads to OutOfMemoryError.
Which Metric Does Nodinite Monitor?
The Nodinite JMX Monitoring Agent monitors Heap Used as a percentage of Heap Max (-Xmx). This is the most reliable indicator of memory pressure and the basis for a monitoring threshold that detects heap exhaustion early.
Recommended Threshold Values
| Environment | Warning Threshold | Error Threshold | Notes |
|---|---|---|---|
| Development | 80% | 90% | Allow higher usage for testing |
| Test / QA | 75% | 85% | Balance early detection with noise |
| Production | 70% | 80% | Detect heap exhaustion early |
Tip
Set the Warning threshold 10–15 percentage points below the Error threshold. This gives operators time to investigate before a critical alert fires.
Common Questions
Why does heap used spike after deployments?
New application code loaded into memory after a deployment increases used memory temporarily. Allow 5–10 minutes for the JVM to stabilize before evaluating heap metrics.
Why is heap committed higher than heap used?
The JVM reserves committed memory beyond active memory allocation to avoid frequent OS memory allocation calls. Committed memory grows as heap demand increases but does not shrink automatically until a full GC or JVM restart.
When should I adjust thresholds?
Adjust thresholds after:
- Adding new integration flows that process larger message payloads
- Upgrading the JVM or application framework
- Observing repeated false-positive warnings during normal operation
Next Step
Supported Garbage Collectors
Correlate Heap Spikes
Related Topics
Environment-Specific Thresholds
JMX Troubleshooting Overview
JMX Monitoring Agent