7 Replies Latest reply on Jun 8, 2009 7:38 AM by paul.robinson

    jbr-provider threads and performance tuning

      Hi,

      We use a jbr-provider to handle HTTP POST requests. We notice that under load the time to respond increases. We have tried increasing the number of threads etc and also following the guidelines in the JBoss esb performance tuning page.

      Here is the service configuration:


       <service category="CMTE CNNI" name="Search Content" description="Search Content" invmScope="GLOBAL">
       <property name="maxThreads">100</property>
       <listeners>
       <jbr-listener name="Cmte Cnni Search Content Gateway"
       busidref="cmte_cnni_search_content_http_end_point" is-gateway="true" maxThreads="100" />
       <jms-listener name="CMTE CNNI" busidref="cmte_cnni_search_content_esb_channel"
       maxThreads="100" />
       </listeners>
       <actions>
       <action name="SearchContent" class="cmte.search.SearchContentAction"
       process="process" />
       </actions>
       </service>
      


      I notice the service getting invoked sequentially and not in parallel when we try to simulate multiple clients.

      Is there any other configuration that we need to change?

      Thanks

      :)
      SShetty

        • 1. Re: jbr-provider threads and performance tuning
          tfennelly

          Hi... the config is misleading you here... sorry about that. In fact, changing maxThreads has no effect on any of the gateways. To increase the number of threads used by the JBR server, you need to make a JBR specific config. You can do this on the jbr-provider, jbr-bus or jbr-listener by adding a property element... name="jbr-maxThreads" value="100" etc

          • 2. Re: jbr-provider threads and performance tuning
            mvecera

            Hello,
            you could also try some more reasonable value based on the number of CPU cores in your system. What JMS provider are you using? You could try jms-jca-provider.

            • 3. Re: jbr-provider threads and performance tuning
              paul.robinson

              Tom,

              You mention that setting the maxThreads has no affect on the gateway. In that case, how do you configure the number of threads on a jms-provider?

              Thanks,

              Paul.

              • 4. Re: jbr-provider threads and performance tuning
                mvecera

                Hello Paul,

                as statet in Tom's reply, you have to specify it using a property like the following one:

                <property name="jbr-maxThreads" value="4" />


                Martin

                • 5. Re: jbr-provider threads and performance tuning
                  paul.robinson

                  Martin,

                  Thanks for the reply.

                  I think Tom's solution only applies to a jbr-provider. I am using a jms-provider.

                  Does tom's statement "changing maxThreads has no effect on any of the gateways", apply to all gateways or just the jbr-gateway?

                  We have tried setting the maxThreads property on the service and service.listeners.jms.listener. After logging the threadID in the action, I can see that four threads are being used for the action pipeline. However, my cpu utilization suggest that only one cpu is being used by the JBoss server (I have 4 cpus). I am not using persistent JMS queues.

                  Here's a simplified jboss-esb.xml for our scenario:

                  <jbossesb>
                   <providers>
                   <jms-provider name="JBM" connection-factory="ConnectionFactory" >
                   <jms-bus busid="jmsGatewayBus" >
                   <jms-message-filter dest-type="QUEUE" dest-name="jms_queue" />
                   </jms-bus>
                   </jms-provider>
                   </providers>
                   <services>
                   <service category="jms_simple" name="SimpleListener" description="jms_simple">
                   <property name="maxThreads" value="4" />
                   <listeners>
                   <jms-listener name="JMS-Gateway" busidref="jmsGatewayBus"
                   is-gateway="true" maxThreads="4" />
                   </listeners>
                   <actions mep="OneWay">
                   <action name="action1" class="com.example.SimpleAction" process="handle"/>
                   </actions>
                   </service>
                   </services>
                  </jbossesb>
                  


                  • 6. Re: jbr-provider threads and performance tuning
                    mvecera

                    Paul,

                    it applies just to JBR gateways. If you see 4 threads, then you are doing everything all right on your part. I can't see any issues with your configuration except for the line with property definition, which is IMHO redundant and ignored:

                    <property name="maxThreads" value="4" />


                    Martin

                    • 7. Re: jbr-provider threads and performance tuning
                      paul.robinson

                      Thanks Martin,

                      I'll delve a bit deeper and see where the bottleneck is.

                      Paul.