1 Reply Latest reply: Feb 5, 2008 8:24 PM by 807557 RSS

    JavaRTS-2.1ea  memory consumption

    807557
      I've been running JavaRTS-2.1ea on RH-MRG for a few days and things seem to work fairly well for an early access product.

      In my test case the JVM seems to be using more memory than I expect. I am running 2 JVMs on a quad core xeon with the following switches

      $RT_JAVA_HOME/bin/java -classpath $CLASSPATH \
      -D_GC_2_JVM_NUM_1 \
      -XX:ScopedSize=64m \
      -XX:ImmortalSize=64m \
      -Xint \
      -Xmx256m \
      -verbose:gc \
      testprogram1


      $RT_JAVA_HOME/bin/java -classpath $CLASSPATH \
      -D_GC_2_JVM_NUM_2 \
      -XX:ScopedSize=64m \
      -XX:ImmortalSize=64m \
      -Xint \
      -Xmx256m \
      -verbose:gc \
      testprogram1

      each JVM seems to consume about 600Meg with this configuration. It consumes even more if I do a fair amount of class preloading.

      Is this expected behavior?

      Thanks
      Dave
        • 1. Re: JavaRTS-2.1ea  memory consumption
          807557
          Dave,

          Glad to hear the EA is going well, but from your comments I infer you've found some problems that you are ascribing to it being an EA product - please share any issues you've encountered.

          The 600M number isn't surprising to me. There are a number of different memory chunks reserved by the VM in addition to the obvious ones. If you run "java -XX:+RTSJShowHeapLayout" it will show you the default set of regions eg:

          RTHeapGen total 65536K, used 0K [0xec000000, 0xf0000000, 0xf0000000)
          RT heap space 65536K, 0% used [0xec000000, 0xf0000000)
          rtsj-mark-sweep perm gen total 65536K, used 0K [0xf0000000, 0xf4000000, 0xf4000000)
          the RTSJPermSpace 65536K, 0% used [0xf0000000, 0xf0000000, 0xf4000000)
          RTSJ gen total 67584K, used 0K [0xf4000000, 0xf8200000, 0xf8200000)
          ImmortalSpace ImmortalSpace 32768K, 0% used [ 0xf4000200, 0xf4000000 0x00000000 0xf4000000 0xf6000000, 0xfedb8fb8]
          ImmortalPhysicalReserved 0xf6000000-0xf6100000
          ScopedPhysicalReserved 0xf6100000-0xf6200000
          ScopedFree list start:
          33554432 bytes (32768KB) 0xf6200000-0xf8200000 in chunk 0x812a188 (p=0x0 n=0x0 cs=2048)
          ScopedFree list end: 32768KB (plus 0 bytes)

          I don't find the above completely clear as you have to understand all the different memory areas and how they combine (ie whether some of the above overlap at all), but a couple of things to note:

          1. The space for Scoped Memory is twice that specified by the -XX:ScopedSize option as each scope requires two backing stores to avoid locking the scope while GC scans it.

          2. There is also immortal physical space and perm gen space

          So adding it up for your config:

          Heap 256M
          scope 128M
          immortal 64M
          immortal physical 32M
          perm gen 64M

          Total: 544M

          One of our GC experts may be able to chip in more details.

          Cheers,
          David Holmes

          Edited by: davidholmes on Feb 6, 2008 12:18 PM