3 Replies Latest reply on Jul 17, 2010 3:22 PM by Peter Johnson

    JBoss Tuning  & Slimming for my application

    priyank dhadhal Newbie

      Hi Everyone,

       

           I am working on Business Intelligence project. I am running BI (JSP servlet Based)  application on jboss-4.2.3.GA.

      My requirement is to improve application performance by tuning JBoss and Operating system parameters .

       

      Hardware:       Intel Q8400 Quad core CPU 2.66 Ghz ,  4GB RAM

      OS:               Windows Server 2008 R2 64 BIT

      JAVA :           jdk1.6.0_20  64 BIT

      Database       My application doesn’t use JBoss to connect database

       

      i uses third party load testing tool to measure application performance time and i have tried with below options .( i have attached my run_perfomance .bat file)

       

      rem JVM memory allocation pool parameters. Modify as appropriate.
      set JAVA_OPTS=%JAVA_OPTS% -Xms2816m -Xmx2816m



      rem With Sun JVMs reduce the RMI GCs to once per hour
      set JAVA_OPTS=%JAVA_OPTS% -Dsun.rmi.dgc.client.gcInterval=900000 -Dsun.rmi.dgc.server.gcInterval=900000 -XX:ParallelGCThreads=8



      set JAVA_OPTS=%JAVA_OPTS% -XX:PermSize=512m -XX:MaxPermSize=512m

       

      I have started working on JBoss for deploying my application on clients servers , Can any one help me with following issues ??

       

      1) How do i suggest JVM size for (Xms and Xmx )  ? Typically i suggest 70 % of physical memory

      2) How do i improve my application performance by removing  JBoss unnecessary services and JBoss tuning?

      3) How can i prevent JBoss Out of Memory error when i uses 50 concurrent users for loading simple analysis using my application.

      4) What could be the best way to check JVM utilization on peak of application usage ?  ( i am using JBoss web console )

      5) How do i suggest minimum hardware and recommended hardware  requirement (not just for running JBoss but to run my application smoothly)?

      6) how can i find  correct load testing strategy to work on performance tuning .?

       

      Any one's  help is highly appreciated. i am learning JBoss AS tunning .

      Thank You,

       

       

      Best Regards,

       

      Priyank.

        • 1. Re: JBoss Tuning  & Slimming for my application
          Peter Johnson Master

          Garbage collection threads are memory bound - you should never run more GC threads than you have CPUs (or cores). Since you have a quad core system, you should be running 4 GC threads, not 8.

           

          1) That depends entirely on your working set size. Which is a fancy way of saying ot given the app ass much heap as it needs but no more. Too much heap will cause unacceptably large GC pause times, too small a heap will cause too many GCs. You need to find the "sweet spot". Do do that, you need to analyze the GC data. For suggestions on how to gather GC data and analyze it, see these white papers:

          Java Garbage Collection Statistical Analysis 101

          Java Garbage Collection Performance Analysis 201

          at http://www.cmg.org/cgi-bin/search.cgi?q=java+peter+johnson&x=30&y=10

           

          2) See http://community.jboss.org/wiki/SlimmingJBossAS43

           

          3) See answer to #1.

           

          4) See answer to #1. Also, VisualVM is handy for this.

           

          5) Not sure what you are asking. If you need a heap larger than about 3GB you should add more RAM.

           

          6) What load testing have you done? (This is a whole separate topic)

           

          Also, there are lots of recommendations in various posts in the Performance forum: http://community.jboss.org/en/jbossas/performance

          1 of 1 people found this helpful
          • 2. Re: JBoss Tuning  & Slimming for my application
            priyank dhadhal Newbie

            Hi Peter ,

             

            Many thanks for your quick reply , Your answer helped on way to work on my tunning tasks.

             

            About 1:

             

            Sorry, i did not fully understand what you wrote above - Too much heap will cause unacceptably large GC pause times, too small a heap will cause too many GCs.
            As per my understanding, if heap size is smaller, GC will need to run less frequently, and will occupy less memory resources overall.
            And if heap size is larger, GC will need to run more frequently, and will occupy more memory resources overall.
            Is that correct ? let me know please.

             

            About 5:
            We have high processing analytics application which is running on Jboss server.
            Number of users to using application can be 5 to 50 concurrent users.
            I have to recommend hardware to them, based on number of concurrent users. Can you please give some pointers on how do I determine this ?

             

            Thank You ,

             

            Best Regards

             

            Priyank

            • 3. Re: JBoss Tuning  & Slimming for my application
              Peter Johnson Master

              >>As per my understanding, if heap size is smaller, GC will need to run  less frequently

              A typical Java application generates lots of garbage every second (a typical minor GC retains only about 10-20% of the objects in the eden space, the rest are garbage), so a smaller heap (or eden space) will fill up faster with that garbage.

               

              >>I have to recommend hardware to them, based on number of concurrent  users. Can you please give some pointers on how do I determine this ?

              Use a load testing tool, such as JMeter (free, open source) or LoadRunner ($$$$$$), create a script that mimics typical user interactions, and run it. The results from that should let you know what kind of hardware you need. Note that asnwer to a qurestion like this depends almost entirely on the application in question, so there are no general guidelines that I can provide.