1 Reply Latest reply on Feb 26, 2010 8:27 PM by Peter Johnson

    Problems with concurrency

    Jorge Ruiz Newbie

      Hello, I have a seam 2.1.2 app running on Jboss AS 4.2.3 with MySQL 5.0 on a HP Blade Server with 22G RAM and Intel Xeon 2.66GHz x4 cpu


      I have set max connections for mysql and app pool to 3000

      i have set max threads for jboss to 3000 too


      I am monitoring my app using web-console, this shows that the value currentThreadsBusy may vary between 100 and 900


      but, still, app runs really slow on when current threds are above 350 (when there's hight concurrency). In these cases mysql uses 1 core, and jboss uses 2.5 cores from the Intel Xeon (according to top command on linux)


      am i missing something? why is it still slow?


      any help would be really appreciated

        • 1. Re: Problems with concurrency
          Peter Johnson Master

          You have hit on a performance anti-pattern. Throwing more threads at an an application does not necessarily mean that it will perform better. Eventually, the contention for common resources will work against you. For every application there is a sweet-spot for the optimal number of threads it can handle (and that includes the optimal number of database connections). One of the purposes of performance tuning is to find that sweet spot. From what you wrote, I suspect that somewhere around 350 connections is the sweet-spot for your app.