Reputation: 2485
I have the following details of a Java process (WildFly application server):
"heap-memory-usage" => {
"init" => 536870912L,
"used" => 73683328L,
"committed" => 505413632L,
"max" => 1908932608L
}
I need to create an alert when the amount of free memory drops under a certain level. Is it correct to assume that the heap available memory equals to (max - used) ? or should I use (max - committed) ?
Thanks
Upvotes: 0
Views: 380
Reputation: 136112
You should use max - used. See java.lang.management.MemoryUsage
class API for details
Upvotes: 1