6 Replies Latest reply on Nov 13, 2003 7:33 PM by Adrian Brock

    Performance degradation of mdb

    ah123 Newbie

      Hello Jboss members,

      I'm using mdb utilizing the Queue format in this manner:

      Client sends 5 seperate messages to the mdb. Mdb processes each message and sends back 5 separate messages to my listening client. This works fine and it takes about 60 sec to process the 5 messages. However when I run 3 instances of my client (doing the same think with different request id per client) I'm getting back my messages (for each instance) in about 150 sec (per client instance). Why do I observe degradation in performance, shouldn't the mdb perform these processes in parallel?

      Please help,

      Thank you

        • 1. Re: Performance degradation of mdb
          Adrian Brock Master

          How many cpus do you have?

          5 messages in 60 seconds sounds like you doing something
          very intensive in your MDB.

          I'm suprised you don't see 3 x 60 = 180 seconds.


          • 2. Re: Performance degradation of mdb
            ah123 Newbie

            I'm not sure what is a cups. But for each message I have intensive process which takes between 20-60 sec to complete, therefore sending 5 messages from one client and completing in 60 sec sounds reasonable(I mean getting a response back for all 5 in 60 sec).

            However when I add two more clients each sending 5 messages, it takes about 150 - 160 sec per client to complete. It seems that when mdb processes more messages (15 vs 5) there's a linear degradation in performance.


            • 3. Re: Performance degradation of mdb
              ah123 Newbie

              sorry i read you message too fast. I'm running it on one cpu 1.8 GHz machine.

              • 4. Re: Performance degradation of mdb
                Elias Ross Master

                You can reduce the MDB pool size. Linear degredation is the right and expected sort of behavior, as your CPU machine is doing the same amount of work. It takes longer to process one message as there are now more messages being processed simulatenously.

                Edit standardjboss.xml, the section:

                POOL SIZE HERE

                • 5. Re: Performance degradation of mdb
                  ah123 Newbie

                  Thanks for your suggestion. I've tried using 1 as my maxsize and that slowed it even further since only one message at a time was processed. Overrall it took about 200-240 sec per client. What is 'MaxMessages' for ?

                  I also tried increasing the maxsize and maxmessage both to 100. That also didn't improve performance. I'm surprised that it's so easy to achive performance degradation with only 5 vs 15 messages. And I do need them to be processes simulatenously.


                  • 6. Re: Performance degradation of mdb
                    Adrian Brock Master

                    You only have so much CPU.
                    If your machine is pegged at 100% cpu running more threads
                    won't help (there is no CPU left)