Friday, January 20, 2012

Oracle Coherence Monitoring, Node max memory keep changing.

If you turn on the coherence monitoring by setting the jvm property, -Dtangosol.coherence.management.remote=true, you can check the Coherence status via the JMX client like Jconsole.  I.e you can click the Node of Coherence domain, and see all the Nodes information, like MaxMemory, FreeMemory.

image
always we set up the heap size constant. min and max to the same value, I set it up to 300M here.
But when I check the node attributes of max and free memory, the max one is not 300M, and sometimes, even keep changing.
image

then I check the code, to return the MemoryMaxMB, pretty simple, just call runtime to get the maxmemory.
image
I created the following bTrace script, and make sure it is calling this code. And I am right.

@OnMethod(clazz = "com.tangosol.coherence.component.net.management.model.localModel.ClusterNodeModel", method = "getMemoryMaxMB", location = @Location(value = Kind.RETURN))
public static void getMemoryMaxMB(@Return int i) {
    BTraceUtils.println("get max");
    BTraceUtils.println(i);

}


then the question is why the maxmemory here is 287 or some value instead of 300M ?
I did a another test, change the JVM to Jrockit, what do you expect? it shows 300M.

image

conclusion, the MemoryMaxMB reported here vary by JVM. because each JVM vendor has it’s own implementation of the JVM.

No comments:

 
Locations of visitors to this page