3 Replies Latest reply on Feb 25, 2008 11:01 AM by Peter Johnson

    performance tuning web-container in jboss

    Mario Kofler Newbie


      i am performance testing the jboss server. however i realized a low throughput for simultaneous client requests. so now i would like to know which possibilities i have to change this behaviour and increase performance.

      for performance tests i use the command line tool openwebload(http://openwebload.sourceforge.net), my jvm settings are fine (-Xmx1024m) and i see the memory getting used up the more simultaneous client requests i send. however after about 180 simultaneous client requests the jvm is filled up and the server is going dead. this is too few for my taste.

      i need to keep the settings for tomcat (for example maxacceptrate,thread pool,...) and the jvm settings fixed, but i would anyway like to improve the performance.

      is there something i can do? are there possibilities of connection pooling or an improved garbage collection for the jvm so that it does not fill up the memory so fast?

      thanks in advance for help,

        • 1. Re: performance tuning web-container in jboss
          Peter Johnson Master

          Are you using a database? How many database connection have you set up?

          With HTTP, the default setting is 250 connections, so you are OK there for now.

          What are your JVM options for heap setting? Have you set the young generation size? See my presentation on Java Performance at http://www.cecmg.de/doc/tagung_2007/agenda07/24-mai/2b3-peter-johnson/index.html. I also have a more detailed page on performance tuning, specifically for JBossAS, but it is not frre. If you like, I can provide the URL.

          • 2. Re: performance tuning web-container in jboss
            Mario Kofler Newbie

            hello peter,

            thanks for your reply, so at the moment the first test includes just the call to a jsp which gives back the date. the database things should be coming later.

            my actual jvm settings are the following:

            -XX:+DisableExplicitGC -server -Xms1024m -Xmx1024m -XX:PermSize=512m -XX:MaxPermSize=512m -Dsun.rmi.dgc.client.gcInterval=360000 -Dsun.rmi.dgc.server.gcInterval=3600000 -Djava.net.preferIPv4Stack=true

            i am running the server on a 2gig ram machine. does it make any sense to set the values for the heap higher than the actual values?

            i also already tried some GC options for the jvm (-Xincgc) but there never seem to be any garbage collected...

            thanks for looking and thanks for the link i will check it out.

            • 3. Re: performance tuning web-container in jboss
              Peter Johnson Master

              You need to add a young generation size to the command line (usualy 1/3 to 1/4 the heap size):

              ... -XX:NewSize=300m -XX:MaxNewSize=300m

              Also, I am wondering about your client. If each request creates its own session, you could have a lot of session objects hanging around that will not be gc'ed until they time out.

              Also, I recommend charting the gcs (as mentioned in my presentation). This will tell you if there is a memory leak of some kind (such as sessions not timing out).