1 Reply Latest reply on Mar 10, 2016 3:16 PM by wdfink

    JBOSS Heap Size

    sgkingsly

       

      Please help on the JVM heap size settings for JBoss in the Linux environment.

       

      We have been using JBoss version JBoss AS 7.1.1.Final "Brontes" in our PRODUCTION ENVIRONMENT.

       

      The heapsize and garbage collection arguments that we use is as below.  Few times, the JBoss server crashed because of the cache overflow issue. Please help to tweak the heap size arguments.

       

       

       

      export JAVA_OPTS="

       

      -server \

       

      -Xms1024m \

       

      -XX:PermSize=160m \

       

      -XX:MaxPermSize=256m \

       

      -XX:+UseParallelGC \

       

      -Dsun.rmi.dgc.client.gcInterval=3600000 \

       

      -Dsun.rmi.dgc.server.gcInterval=3600000 \

       

      -Dsun.net.inetaddr.ttl=0 \

       

      -Djava.awt.headless=true

       

      -Djboss.shutdown.forceHalt=false \

       

      -XX:+UseCompressedOops \

       

                      -Dmgnt.cluster.node.id=11141 \

       

      -Duser.timezone=CST6CDT \

       

      -Djava.net.preferIPv4Stack=true \

       

      -Djboss.platform.mbeanserver \

       

      -Djboss.modules.system.pkgs=com.wily,com.wily.*

       

                      -javaagent:/introscope_9.5.3/wily/Agent.jar -Dcom.wily.introscope.agentProfile=/introscope_9.5.3/wily/core/config/IntroscopeAgent.profile

       

      -XX:+HeapDumpOnOutOfMemoryError -XX:HeapDumpPath=$JBOSS_OOM_DIR"

       

       

      Our system memory details are as below:-

      MemTotal:       16467724 kB

      MemFree:          603736 kB

      Buffers:          367412 kB

      Cached:          6828724 kB

      SwapCached:        14848 kB

      Active:         12828856 kB

      Inactive:        2382404 kB

      Active(anon):    6973424 kB

      Inactive(anon):  1042916 kB

      Active(file):    5855432 kB

      Inactive(file):  1339488 kB

      Unevictable:           0 kB

      Mlocked:               0 kB

      SwapTotal:      20971512 kB

      SwapFree:       20880240 kB

      Dirty:               272 kB

      Writeback:             0 kB

      AnonPages:       8008520 kB

      Mapped:            81088 kB

      Shmem:              1216 kB

      Slab:             405324 kB

      SReclaimable:     322088 kB

      SUnreclaim:        83236 kB

      KernelStack:        8952 kB

      PageTables:        27796 kB

      NFS_Unstable:          0 kB

      Bounce:                0 kB

      WritebackTmp:          0 kB

      CommitLimit:    29205372 kB

      Committed_AS:   15109176 kB

      VmallocTotal:   34359738367 kB

      VmallocUsed:      307888 kB

      VmallocChunk:   34359369556 kB

      HardwareCorrupted:     0 kB

      AnonHugePages:   7686144 kB

      HugePages_Total:       0

      HugePages_Free:        0

      HugePages_Rsvd:        0

      HugePages_Surp:        0

      Hugepagesize:       2048 kB

      DirectMap4k:       10240 kB

      DirectMap2M:    16766976 kB

       

       

        • 1. Re: JBOSS Heap Size
          wdfink

          The JVM Heap settings are mostly related to your application and need to be measured and monitored to being able to tune it.

          Imporotant options are -Xms==-Xmx to prevent from recalculating the memory.

          Also I would recommend to use the CMS Garbagte collector as it should work better for most of the use-cases.

          Plus add the verbose GC otption to see GC logging to be able to tune it.

           

          BTW 7.1 is old and you should consider to migrate to WildFly 9 or 10