4 Replies Latest reply on Jun 13, 2013 11:11 AM by Peter Johnson

    JBoss 5.1.0 tuning on AWS for large number of concurrent users

    jbossbuddy Newbie

      Performance Testing Environment

      --------------------------------

       

      Web Server

          CPU: 4 Core processor

          RAM: 14984 MB

          OS: AMI(amazon linux) --64 bit

       

      App Server

          CPU: 4 Core processor

          RAM: 14985 MB

          OS: AMI(amazon linux) --64 bit

       

      DB Server

          CPU: 4 Core processor

          RAM: 14985 MB

          OS: AMI(amazon linux) --64 bit

       

      Deployment Information

      -----------------------------------

       

      Web Server (Apache) : Serving static files, images, javascripts, CSS etc.

      App. Server (Jboss GA 5.1.0) : An eCommerce application

      Database Server (mysql  Ver 14.14 Distrib 5.5.28) : The DB schema for the e-Commerce application.

       

       

      Background on site usage

      --------------------------------------

       

      The site currently supports 700 Active users (per Google Analytics) and CPU utilization stayed at 40 % when that many users were active in the site. The 'maxThreads' configuration in server.xml file is set at 700, and ConnectionPool size has also been set at a value matching the demand. JVM tuning had been done subseqent to the results obtained as a result of load testing the application iteratively.

       

      The above usage case has been supported by running a single instance of Jboss.

       

      Other info : Jboss has been slimmed as per the recommendations in the web site

       

      Questions

      ------------------

       

      I. In anticipation of a higher demand, 2000 Active users at peak, we are considering the following strategies

       

          a. Increase the parameters like 'maxThreads', max-min connection pool sizes, and achieve the capacity to address that many users.

       

          b. Have another instance of Jboss running in the same box, and cluster that with the former, and have the configuration parameters stated in #I.a. to support 1000 users on each of those Jboss instances.

       

      Which among the above will be a better option? - The CPU utilization on the App Server machine can go up to 70 %.

      Are there other candidate strategies that provide better value for the investment already done?

       

      II. Are there any Jboss/ Operating System configuration tuning specific to AWS cloud deployments?

        • 1. Re: JBoss 5.1.0 tuning on AWS for large number of concurrent users
          Wolf-Dieter Fink Master

          As long one JVM can handle the load you might use a.

          But you might run into issues that the JVM get stuck by long GC periodically or did not have enough memory (32Bit Java?). In this case you can spit in two instances and build a cluster.

          In my experience two instances on the same machine will work if you have enough memory and CPU power.

          But you need to verify whether the system can handle the load with the resources.

          • 2. Re: JBoss 5.1.0 tuning on AWS for large number of concurrent users
            Peter Johnson Master

            You missed an option:

             

            c) Run a second AWS instance with JBoss AS and load-balance between the two.

             

            I would pick "c" if using any kind of vitualization, it is the option that allows for greater scalability (you can add a 3rd or 4th instance using the same technique).

            • 3. Re: JBoss 5.1.0 tuning on AWS for large number of concurrent users
              jbossbuddy Newbie

              The suggestions provided are valuable.

               

              I am looking at to exploit the unutilized CPU capacity (70 % [max affordable CPU utilization] - 40 % [Observed max utilization during peak load] = 30 % free) of the application server to handle even more concurrent users.

               

              For this if suppose I run two Jboss instances (clustered) in the same box with reduced heap sizes and accordingly adjust other associated JVM tuning parameters, would it be possible to have an increase in number of concurrent requests (sum of requests that can be handled by individual instances -> sum of 'maxThreads' of both instances) that can be served by the Server?

               

              Motivation to think in the above respect:- Have come across a rule of thumb for calculating the value of 'maxThreads' that can be specified in Jboss config -> [200 * No. of CPU] +/-  depending on RAM and other Machine specs.

               

              Does this rule apply for each instance of Jboss running on the server? or it applies to the server as such, irrespective of how many Jboss instances are running in it?

              • 4. Re: JBoss 5.1.0 tuning on AWS for large number of concurrent users
                Peter Johnson Master

                There is no such "rule of thumb". I suspect that whatever you read was specific to that person's environment. Unless you do you own load testing you will not be able to determine what kind of load your system will be able to handle. And having two JBoss AS instances running on one server will not double the number of request threads that can be specified (or maybe it can, but it won't increase throughput). Youy have to remember that the more load you place on the system the longer it will take to process each individual request. It is a fine balancing act between the amount of load and the response time.