2 Replies Latest reply on Jun 22, 2012 3:18 PM by maksymg

    Where thread pool tuning per CPU in 7.1.1?

    maksymg

      Hi,

       

      Previous releases had per-cpu attribute for thread pool counters that allow to adjust throughput on a fly by adding CPU to VM. Without this feature JBoss domain loses his appeal, where the same profile supposed to be shared across different server groups with different load. Can someone clarify whether core-threads, max-threads are static now and is there any way to make them depend on CPU count. I tried to apply something like:

       

                  <blocking-bounded-queue-thread-pool name="ajpPool">
                      <queue-length count="#{20 * ${os.cpu.count}}"/>
                      <max-threads count="100"/>
                  </blocking-bounded-queue-thread-pool>

        where os.cpu.count is a custom system variable, but attributes do not allow any expressions nor usage of system variables alone even it seems work in other places.

       

      Thanks

        • 1. Re: Where thread pool tuning per CPU in 7.1.1?
          traian20

          You can still use the per-cpu attribute in 7.1.1, so you can define the pool like this:

           

                     

          <blocking-bounded-queue-thread-pool name="ajpPool">


          <core-threads count="10" per-cpu="10"/>
                          <queue-length count="20" per-cpu="20"/>
                          <max-threads count="100"/>
                      </blocking-bounded-queue-thread-pool>
          • 2. Re: Where thread pool tuning per CPU in 7.1.1?
            maksymg

            It applies properly but fires a warning:

             

            WARN  [org.jboss.as.threads] JBAS012400: The 'per-cpu' attribute is no longer supported. The value [X] of the 'count' attribute is being combined with the value [Y] of the 'per-cpu' attribute and the current processor count [2] to derive a new value of [Z] for 'count'.

             

            I have also found no way to assign 'per-cpu' via CLI. So it can only be done manually by editing XML.

             

            Can someone explain why this convient feature is sunset?