6 Replies Latest reply on Oct 15, 2013 12:03 PM by Jochen Cordes

    JBoss optimization

    keiji13 Newbie

      Hi,

       

      Is there a way to optimize JBoss for better and faster performance? We've been encountering slowdown in our JBoss servers lately, and resources (RAM) are fully consumed once JBoss is started. Which subsystems and modules can be removed? We only use JBoss for deploying web applications (mostly WAR files), web services, JNDI datasources, and clustering for high availability.

       

      Need help pls.

       

      Thanks,

      JayL Conaco

        • 1. Re: JBoss optimization
          Jochen Cordes Novice

          Hi keiji13,

           

          Assuming that you are talking about EAP 6, usually there is no need to remove any subsystems as they are only activated on demand.

           

          The "empty" application-server has a low foot-print (around 290 MB), removing subsystems will not take off a lot.

           

          What parts are actually clustered in your application, only HTTP Sessions? Do you also use JPA with a second-level cache? Do you do re-deployments of web-applications? Are there OutOfMemory errors in the logs?

           

          I would also advise to use jstat and jmap (or more comfortable profiling tools) to see how memory is consumed and by what.

           

          Kind regards,

           

          Jochen

          • 2. Re: JBoss optimization
            Wolf-Dieter Fink Master

            You should state whether you use EAP6 or a different one (this forum is for EAP6)

            Also could you describe when you see that the RAM is consumed, it depends to the start options what is used if the JVM starts. With some options you might consume memory with the JVM but did not use is.

            Please post the start command options and the standalone/domain configuration file.

            • 3. Re: JBoss optimization
              Tomaz Cerar Master

              Jochen Cordes wrote:

               

              The "empty" application-server has a low foot-print (around 290 MB), removing subsystems will not take off a lot.

              What app server are you using? EAP6 has about 12-20MB foot print when started empty (without any apps deployed)

              Heap sizes are setup much higher but that is not the same as real footprint..

              • 4. Re: Re: JBoss optimization
                Jochen Cordes Novice

                Hi Tomaz,

                 

                I'm using a vanilla EAP 6.1 with the standalone.xml profile and no applications deployed. Below you can find the jstat output:

                 

                S0CS1CS0US1UEC EU  OC   OU PCPUYGCYGCTFGCFGCTGCT
                55552.055552.00.06937.1333632.0214348.9889536.00.029824.029787.210.01900.0000.019

                 

                So what I did is to sum-up the utilization numbers. Actually I did a mistake in my first calculation and the total number is 251073.2, so 245 MB.

                 

                Already the permgen is eating much more memory than 20 MB. Or is my perception wrong?

                • 5. Re: Re: JBoss optimization
                  Tomaz Cerar Master

                  Hi,

                   

                  in short, yes, your perception is wrong. What you are looking at is OS reported usage, which mostly relates to different memory options you start jvm with (xms, xms, premgen,...)

                  to get actual memory usage you should check what with tools like jprofiler or even jvisualvm / jconsole and many others.

                  after you connect to it fire few full GC collections, and after that you can see the real memory used by application running in jvm (in this case app server)

                   

                  --

                  tomaz

                  • 6. Re: Re: JBoss optimization
                    Jochen Cordes Novice

                    Hi Tomaz,

                     

                    I now used jconsole to hook into the JVM and saw that the numbers are in line with jstat. When forcing a single Full GC, heap has gone down dramatically (to as low as 18 MB), permgen stayed at 30 MB (as expected) as indicated by jconsole. Same numbers afterwards when firing jstat again.

                     

                    So my fault was not to wait until the next GC (f.e. the hourly RMI one).