Heap Used vs Committed Memory
Section titled “ 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
Section titled “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 (green), committed (yellow), and max (red), showing how unchecked growth leads to OutOfMemoryError.
Which Value Does Nodinite Monitor?
Section titled “Which Value Does Nodinite Monitor?”The Nodinite JMX Monitoring Agent monitors free heap in percent, the part of the heap not occupied by live objects, and compares it with the Heap Size thresholds in the Configuration. The thresholds are the minimum free heap: the JVM Resource changes to Warning or Error when free heap drops below them for the configured Duration. Low free heap is the most reliable sign of memory pressure and the basis for a monitoring threshold that catches heap exhaustion early. The agent doesn't report heap used, committed, and max as separate values.
Recommended Threshold Values
Section titled “Recommended Threshold Values”| Environment | Warning Threshold % (free heap below) | Error Threshold % (free heap below) | Notes |
|---|---|---|---|
| Development | 20% | 10% | Allow higher usage for testing |
| Test / QA | 25% | 15% | Balance early detection with noise |
| Production | 30% | 20% | Detect heap exhaustion early |
Common Questions
Section titled “Common Questions”Why does heap used spike after deployments?
Section titled “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, or set a Duration long enough that the warm-up doesn't change the Resource state.
Why is heap committed higher than heap used?
Section titled “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?
Section titled “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 Steps
Section titled “ Next Steps” Supported Garbage Collectors
Correlate Heap Spikes
Related Topics
Section titled “ Related Topics” Environment-Specific Thresholds
JMX Troubleshooting Overview
JMX Monitoring Agent