cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Meaning of Free Committed Memory

abyala
Contributor

I have some heap dumps that I took either before or after running out of memory. Looking just at the overview, I understand what's meant by Used Memory and Free Memory, but not Free Committed Memory. When we get an OutOfMemoryError, we tend to have maybe 10% of the JVM heap assigned to Used Memory, and the rest is Free Committed Memory.

Could someone please explain what Free Committed Memory is?

3 REPLIES 3

_JOJO
Dynatrace Helper
Dynatrace Helper

From my understanding there's:

  1. Used (Red),
  2. Free Committed (Pink) and
  3. Free Uncommitted (Grey).
  4. JVM Max (1024 MB)

Free Committed is the difference between the currently "used memory amount" and how much RAM your JVM actually requested from the OS. Once it uses up the "Free Committed" space, the JVM will request more committed memory space up to the JVM Max.

abyala
Contributor

Joseph -- I understand that to be the Free Uncommitted (grey) memory. If the application has a total of 2 GB of memory allocated by the host, and we've used 512 MB with actual objects (used = red), then the remaining 1.5 GB of memory should be available for consumption (free uncommitted = grey).

I guess I'm confused about the distinction between Free Committed and Free Uncommitted in this context

_JOJO
Dynatrace Helper
Dynatrace Helper

Using your context, I've added Total Committed as a column for help. As the JVM reaches it's max total committed memory, It will request the OS for more space until there is no more free uncommitted space.

IntervalFree CommittedUsedTotal CommittedFree Uncommitted
156MB200MB256MB1.75GB
2255MB257MB512MB1.5GB
3412MB612MB1GB1GB
4768MB768MB1.25GB0.75GB

From the Docs:

https://docs.oracle.com/javase/7/docs/api/java/lang/management/MemoryUsage.html

Take a look at getUsed(), getCommitted(), getMax().

  • I think Free Uncommitted is getMax() - getCommitted().
  • I think Free Committed is getComitted() - getUsed().

Hope that helps