6 Replies Latest reply on Feb 6, 2019 2:35 PM by Tomaž Cerar

    Live threads in jboss admin console

    Vineeth Narayanan Newbie

      Hi,

       

      I need some clarification on threading in Jboss EAP 7.0.  Could any one please help on this.

       

      Scenario:

       

      While monitoring the admin console of jboss eap, we can able to see the live threads under StandaloneServer >> JVM. In our case ,it is showing random counts by different server restarts.

      As per my understanding, this live threads is meant for processing the http requests. But this thread count is not getting impacted while processing HTTP requests as I tested by  putting a request in debug mode.

       

      Also I found another configuration in  standalone.xml file, which can  be used for configuriing threads . By default, there  is no threads mentioned in this subsystem and there is an option to add 'task-max-threads'

      in  worker tag below.

      <subsystem xmlns="urn:jboss:domain:io:1.1">

        <worker name="default"/>

                <buffer-pool name="default"/>

         </subsystem>

       

      If I gave the  task-max-threads as 2, I can see only 2 threads fro processing the request. This I found out by keeping two request in progress and fired the third request which is not processing at all.

      But still I am not able to see any impact on the 'Live thread' area in jboss admin console.

       

      Clarification:

       

      1). What is live thread showing in admin console?

      2). As per my experiments, it is found that we can configure threads using the subsystem below. Is my assumption correct on this

      3). If no task-max-threads are given,what is the default value of threads.

        • 1. Re: Live threads in jboss admin console
          Claudio Miranda Expert

          > 1). What is live thread showing in admin console?

           

          It comes from: /core-service=platform-mbean/type=threading:read-attribute(name=thread-count)

          It is the current number of live threads including both daemon and non-daemon threads from the overall jvm.

          > 2). As per my experiments, it is found that we can configure threads using the subsystem below. Is my assumption correct on this

           

          The worker of IO subsystem you can add worker threads that may be used to run workloads. But the target system need to specify this worker.

           

          You can go to the Web Server and Http Listener and set the worker name.

           

          The "task-max-threads" specify the maximum number of threads for the worker task thread pool. If not set, default value used which is calculated by formula cpuCount * 16

           

          > 3). If no task-max-threads are given,what is the default value of threads.

           

          The default is the number of cpu * 16.

          • 2. Re: Live threads in jboss admin console
            Vineeth Narayanan Newbie

            Thanks for your  very valuable and helpful suggestion. 

            As per your reply following are my understandings

            1) .  live thread is the overall thread count of jvm where jboss is running. For instance ,if any other process is also running on the same jvm, this count will include the thread  count of that process also.

             

            2). The requests for the deployed applications will be processed by the worker threads and this also will contribute to the count of live threads  displaying in console.

             

            Clarification :

            Is there any way to see the worker threads count either in console or through any other ways.

            • 3. Re: Live threads in jboss admin console
              Claudio Miranda Expert

              > 1) live thread is the overall thread count of jvm where jboss is running. For instance ,if any other process is also running on the same jvm, this count will include the thread  count of that process also.

               

              The thread count is per jvm, per process. If other process uses the same java binary, it is a different process with different thread count.

               

              > 2) The requests for the deployed applications will be processed by the worker threads and this also will contribute to the count of live threads  displaying in console.

               

              Yes. For simple application there should be a thread per request, but for a complex application, it may start more threads (batch jobs, async tasks, etc.)

               

              > Is there any way to see the worker threads count either in console or through any other ways.

               

              The newer JBoss EAP 7.2 contains more metrics, related to the IO and worker functionality. There you can monitor the number of threads per worker (attribute io-thread-count ), it is available in the web console and in command line.

              • 4. Re: Live threads in jboss admin console
                Vineeth Narayanan Newbie

                Thanks Claudio Miranda,  But Currently we are using the version 7.0. 

                • 5. Re: Live threads in jboss admin console
                  Vineeth Narayanan Newbie

                  I checked with the following command using CLI but it is showing both io-threads and task-max threads as undefined

                   

                  /subsystem=io/worker=default:read-resource(include-runtime=true,recursive=true)

                  • 6. Re: Live threads in jboss admin console
                    Tomaž Cerar Master

                    most of metrics ware added to 7.1.

                    see JBoss EAP 7.1 Model Reference  for more details