2 Replies Latest reply on May 23, 2013 1:34 PM by Rodrigo Traba

    Why JVM shows another Heap size when Xms=Xsx?

    Rodrigo Traba
      Hi everybody. I have two instances of oc4j on a cluster of two nodes. The configuration of parameters on opmn.xml is exactly the same for both instances.
      Particulary I see an strange behavior on memory heap. I expect that if Xmx and Xms parameters are equals to 4096, then the heap size must be fixed on 4 Gb exactly, and there will be not resizing.
      But monitoring the heaps with JVisualVM I can see that the heap size of the first instance is moving between 3.7 and 4 Gb, and the Heap size of the second node is moving around 3.2 Gb. The hosts have both 16 Gb of RAM, it's running on Windows 2003 Server R2 and there is no overload on the OS.
      Possibly the behavior is normal and I just have a wrong understanding of what is expectable.
      Here are some parameteres extracted from opmn.xml file:

        • 1. Re: Why JVM shows another Heap size when Xms=Xsx?
          Hi Rodrigo,

          Where are you looking in jvisualvm to determine your heap size? In the Monitor tab you should see the heap usage graph on the top right. There you will see the reported heap size and max, as well as the currently used heap. In your case, both heap size and max should be roughly around 4096M, but the used heap will fluctuate along with your application needs.

          BTW, looking at your config you have 768M configured for your PermGen. It's surprisingly large, but depending on what your application does it may be warranted.

          • 2. Re: Why JVM shows another Heap size when Xms=Xsx?
            Rodrigo Traba
            Hi Sebastien, Thanks for responding.
            In fact I'm looking exactly where you say to determine your heap size.
            The thing is that I can't understand why one instance takes some minor heap size and fluctuates the size while the other instance take around 4 Gb and kept static in this value. I can see there is no diferences on configuration for both. I know that the used heap must present diferent behavior, but not the total size. I think that the size should be fixed and static with Xmx=Xms=4096, but this is not happening.
            I would like to show an image to ilustrate what I'm describing.
            About the PermGen, I think there's no problem with that, around 80% is in effective use, and this value is stable.
            Best regards