Bug 1021911 - "active-count" metric is missing for "bounded-queue-thread-pool"
Summary: "active-count" metric is missing for "bounded-queue-thread-pool"
Keywords:
Status: CLOSED UPSTREAM
Alias: None
Product: JBoss Enterprise Application Platform 6
Classification: JBoss
Component: Domain Management
Version: 6.1.0
Hardware: Unspecified
OS: Unspecified
unspecified
high
Target Milestone: ---
: ---
Assignee: Carlo de Wolf
QA Contact: Martin Simka
Russell Dickenson
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2013-10-22 10:14 UTC by Dasharath Masirkar
Modified: 2019-07-11 07:47 UTC (History)
9 users (show)

Fixed In Version:
Clone Of:
Environment:
Last Closed: 2016-01-22 08:33:09 UTC
Type: Enhancement
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Issue Tracker JBTHR-25 0 Major Resolved "active-count" metric is missing for "bounded-queue-thread-pool" 2018-03-15 13:59:26 UTC

Description Dasharath Masirkar 2013-10-22 10:14:21 UTC
Description of problem:
The "active-count" metric is missing for bounded-queue-thread-pool the same is available for unbounded-queue-thread-pool.This metric is essential to monitor 
approximate number of threads that are actively executing tasks.

Version-Release number of selected component (if applicable):
EAP 6.1.0
EAP 6.1.1
EAP 6.2 Beta

How reproducible:
Always

Steps to Reproduce:

1.  Install EAP 6.1.0 and start in standalone mode with default profile, use 
below CLI to create a bounded-queue-thread-pool.

/subsystem=threads/bounded-queue-thread-pool=bounded-queue-test-thread-pool/:add(queue-length=2,max-threads=200,allow-core-timeout=true)
 
2. Now use below CLI to read the resource including runtime attributes and now observer output for "active-count" metric. 

/subsystem=threads/bounded-queue-thread-pool=bounded-queue-test-thread-pool/:read-resource(recursive-depth=0,include-runtime=true)
 


Actual results:
The "active-count" metric is missing for bounded-queue-thread-pool the same is available for unbounded-queue-thread-pool.

Expected results:
The "active-count" metric must be available for bounded-queue-thread-pool same as it is available for unbounded-queue-thread-pool.

Additional info:

Comment 1 James Livingston 2013-11-13 00:06:39 UTC
The reason for this is likely that the the underlying pools are JBoss Threads' JBossThreadPoolExecutor (extends j.u.c.ThreadPoolExecutor which has the attribute) and JBoss Threads' QueueExecutor (extends j.u.c.AbstractExecutorService which does not).



To support this org.jboss.threads.QueueExecutor would need an equivalent method.

Comment 2 Osamu Nagano 2013-12-03 07:34:47 UTC
We have 7 choices in threads subsystem but their attributes seem not consistent.  For example, "active-count" lacks in all "bounded" or "queueless" queues.  And "queueless" ones have "queue-size" entries which are nonsense.

A customer complained the lack of "active-count" which is a number of acutually being used threads out of "current-thread-count".

~~~
[standalone@localhost:9999 /] ls /subsystem=threads/
blocking-bounded-queue-thread-pool  bounded-queue-thread-pool           scheduled-thread-pool               unbounded-queue-thread-pool
blocking-queueless-thread-pool      queueless-thread-pool               thread-factory

[standalone@localhost:9999 /] ls -l /subsystem=threads/unbounded-queue-thread-pool=ubqueue
ATTRIBUTE            VALUE     TYPE
active-count         0         INT
completed-task-count 0         INT
current-thread-count 0         INT
keepalive-time       undefined OBJECT
largest-thread-count 0         INT
max-threads          10        INT
name                 ubqueue   STRING
queue-size           0         INT
rejected-count       0         INT
task-count           0         INT
thread-factory       undefined STRING

[standalone@localhost:9999 /] ls -l /subsystem=threads/bounded-queue-thread-pool=bqueue
ATTRIBUTE            VALUE     TYPE
allow-core-timeout   false     BOOLEAN
core-threads         undefined INT
current-thread-count 0         INT
handoff-executor     undefined STRING
keepalive-time       undefined OBJECT
largest-thread-count 0         INT
max-threads          10        INT
name                 bqueue    STRING
queue-length         5         INT
queue-size           0         INT
rejected-count       0         INT
thread-factory       undefined STRING

[standalone@localhost:9999 /] ls -l /subsystem=threads/blocking-bounded-queue-thread-pool=bbqueue
ATTRIBUTE            VALUE     TYPE
allow-core-timeout   false     BOOLEAN
core-threads         undefined INT
current-thread-count 0         INT
keepalive-time       undefined OBJECT
largest-thread-count 0         INT
max-threads          10        INT
name                 bbqueue   STRING
queue-length         5         INT
queue-size           0         INT
rejected-count       0         INT
thread-factory       undefined STRING

[standalone@localhost:9999 /] ls -l /subsystem=threads/queueless-thread-pool=qltpool
ATTRIBUTE            VALUE     TYPE
current-thread-count 0         INT
handoff-executor     undefined STRING
keepalive-time       undefined OBJECT
largest-thread-count 0         INT
max-threads          10        INT
name                 qltpool   STRING
queue-size           0         INT
rejected-count       0         INT
thread-factory       undefined STRING

[standalone@localhost:9999 /] ls -l /subsystem=threads/blocking-queueless-thread-pool=bqltpool
ATTRIBUTE            VALUE     TYPE
current-thread-count 0         INT
keepalive-time       undefined OBJECT
largest-thread-count 0         INT
max-threads          10        INT
name                 bqltpool  STRING
queue-size           0         INT
rejected-count       0         INT
thread-factory       undefined STRING

[standalone@localhost:9999 /] ls -l /subsystem=threads/scheduled-thread-pool=stpool
ATTRIBUTE            VALUE     TYPE
active-count         0         INT
completed-task-count 0         INT
current-thread-count 0         INT
keepalive-time       undefined OBJECT
largest-thread-count 0         INT
max-threads          10        INT
name                 stpool    STRING
queue-size           0         INT
task-count           0         INT
thread-factory       undefined STRING

[standalone@localhost:9999 /] ls -l /subsystem=threads/thread-factory=tfactory
ATTRIBUTE           VALUE     TYPE
group-name          undefined STRING
name                tfactory  STRING
priority            undefined INT
thread-name-pattern undefined STRING
~~~


Note You need to log in before you can comment on or make changes to this bug.