5 Replies Latest reply on Mar 7, 2005 4:22 AM by mcguinnessdave

    Threading Anomoly

    mcguinnessdave

      Hello everyone,

      I am currently looking at the effect of the size of the thread pool for the clients of an EJB application.

      I am referring to the setting maxThreads in server.xml under the following directory:
      %JBOSS%\server\default\deploy\jbossweb-tomcat50.sar\
      (see below for excerpt)

      I get the following figures for throughput (TP) and response time(RT):

      1 thread: TP=144, RT=11.421
      10 threads: TP=142, RT=11.615
      100 threads TP=66, RT=26.874

      The number of users in the system is 10 so extra threads are redundant but why do spare threads have such a detrimental effect on RT (more than doubled) and TP (less than half)?

      I am running a simple stateless session bean-only application that simulates a load on CPU and Memory so there should be no real resource contention (Memory consumption is well below memory availability) and I am using JMeter to control the load and return the RT and TP statistics.

      Any ideas of what might cause this would be very much appreciated.
      Thanks a lot,
      Dave

      PS Changing jboss-service.xml in %JBOSS%\server\default\conf has no real effect on TP or RT

      Excerpt from server.xml file:


      <!-- A HTTP/1.1 Connector on port 8080 -->

        • 1. Re: Threading Anomoly
          mcguinnessdave

          sorry the excerpt got cut off, here it is now...



          <!-- A HTTP/1.1 Connector on port 8080 -->

          • 2. Re: Threading Anomoly
            mcguinnessdave

            take 3:

            Service name="jboss.web"
            className="org.jboss.web.tomcat.tc5.StandardService">

            Connector port="8080" address="${jboss.bind.address}"
            maxThreads="150" minSpareThreads="25" maxSpareThreads="75"
            enableLookups="false" redirectPort="8443" acceptCount="100"
            connectionTimeout="20000" disableUploadTimeout="true"/


            • 3. Re: Threading Anomoly
              clebert.suconic

              Did you try increasing the ThreadPool?
              Are you using all or default as server configuration?

              • 4. Re: Threading Anomoly
                mcguinnessdave

                Hi,

                As far as I know, what I was changing in server.xml was the thread pool size. am I mistaken? I am using default as the server configuration,

                Thanks,
                Dave

                • 5. Re: Threading Anomoly
                  mcguinnessdave

                  Hi again,

                  Thanks for the reply. I have run some more tests. for these I have set the memory consumption of the stateless server beans to zero and I increased the number of users to 100 (all running the same single method transaction). there are also 100 beans in the pool. What I would expect to find is that as we increase from 1 thread up to somewhere near 100, we should get increasing throughput and decreasing response times, but quite the opposite is happening (see below). Regarding context switching, surely JBoss should only switch between threads when there is something active on the thread and should not switch to threads that are not in use (and so unused threads shypould not cause extra runtime CPU usage (or a very minimal amount to check the extra threads for usage???)

                  Thanks again for any insight provided

                  Regards,
                  David

                  RESULTS
                  ====================
                  Threads RT TP
                  1 87092 132
                  5 84231 142
                  10 95694 111
                  25 90989 129
                  50 101541 116
                  100 132768 99
                  =====================