2 Replies Latest reply on Sep 9, 2003 12:35 PM by michael01612

    Memory Study

    Shreedhar Newbie

      I have been trying to study the memory usuage of our application. I have about 10 jars and a war packed in a single ear. I was interested in knowing about the memory consumed by each jar @ the time of deployment. I followed a couple of ways to find it out but both the ways did not get me any good picture :( Here are they -

      (1) say I have jar1.jar,jar2.jar... jar10.jar all packed in a single ear. Each jar consisted of 3-4 entity beans and were modularly separated. Using the TaskManager, I noted the memory consumed by JBoss without my application ear. It was around 30,000K. When I deployed my ear, the Java process memory usuage shot upto 50,000K. For sake of studying the memory consumed by each module, I started out deploying my application by removing a single jar at every deployment. i.e. During the first deployment, my ear will contain jar2 to jar10 without jar1. Similarly second deployment, the ear will contain jar1,jar3 .. jar10 but not jar2.

      Java process memory usuage looked like -

      JBoss without app - 30,000K
      JBoss with app, - 50,000K !
      app without jar1 - 49,000K
      app without jar2 - 51,000K ?? [more than JBoss with entire app]

      The memory usuage of Java process was not consistent. I assume this is something to do with garbage collection and so forth.

      [Note: I am not interested in object instances during execution of the application. First I would like to know during deployment, which module takes more memory]

      (2) I started the JBoss without my application. I incrementally deployed the jar one by one. My reading was something like this -

      JBoss without app - 30,000K
      JBoss with jar1 - 33,000K
      JBoss with jar 1 & 2 - 39,000K
      JBoss with jar 1,2,3 - 24,000K ??

      Again inconsistent reading, something is happening inside the JVM. Sometime memory usuage of Java Process falls to as low as 4000K!!

      Guys, what is the best way to study the memory used by each modules @ the time of deployment. Any suggestion will be highly useful.