2 Replies Latest reply on Oct 15, 2008 7:07 AM by erasmo2 marciano2

    top command show wrong memory for java

    REDA Newbie

      Why the top command on linux show 7775m for java process and in my jboss I set it to Xms6144m -Xmx6144m -XX:MaxPermSize=256m.

        • 1. Re: top command show wrong memory for java
          Peter Johnson Master

          Let's see:

          6144MB for the heap
          +256MB for the permgen
          +256KB * number of threads for the stacks (the 256KB is a guess, I cannot offhand recall how big each thread stack is)
          +xxxMB C/C++ data overhead (this is the JVM's data used to manage/run the Java app)
          +xxxMB for the code (the JVM and the shared objects it uses)
          -----------
          7775MB total

          Moral of the story - the heap is not everything, there is a lot of overhead above and beyond the heap.

          By the way, do you really want a 6BG heap? I hope you are using the CMS collector or else you will wait a long time for each major garbage collection.

          • 2. Re: top command show wrong memory for java
            erasmo2 marciano2 Master

            I suggest to not use an heap so BIG.
            If you have problem of performance installed more jboss in mode cluster or use an CMS collector as Peter said.