[jboss-jira] [JBoss JIRA] (WFCORE-1529) New threads named ServerService Thread Pool -- xyz created with every deploy and undeploy and removed after ~20 seconds

Brian Stansberry (JIRA) issues at jboss.org
Thu May 5 13:40:00 EDT 2016


     [ https://issues.jboss.org/browse/WFCORE-1529?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Brian Stansberry updated WFCORE-1529:
-------------------------------------
    Description: 
tl;dr version from Brian:

The ServerService Threads and Host Controller Service Threads pools have no core size and a thread timeout of 20 secs, so if a management request comes in periodically but less often then every 20 secs (says twice a minute) the pool will continually churn threads. That kind of periodic polling is not an unusual scenario, so, we'll put in a core size of one or two.

Original details from Rostislav:

I did quite simple thing in the loop : 
 * deploy attached application into jboss-eap-7.0/standalone/deployments/
 * wait 1 minute
 * remove anything from jboss-eap-7.0/standalone/deployments/
 * wait 1 minute

I connected with jvisualvm and was watching monitor tab for cpu / classes / heap / threads overview statistics. After some time I spotted jumps (up and down) on threads.

After some time I see threads named "ServerService Thread Pool -- 346", I ended with number bigger than 1400. In my case 15 threads are created for 20 seconds when deploying and another 15 threads are created for 20 seconds when undeploying. Nothing seems to be reused

Setup for threads is done in https://github.com/wildfly/wildfly-core/blob/master/server/src/main/java/org/jboss/as/server/ServerService.java#L207-L213 method addService

Is it intentional to have threads alive only 20 seconds and then scratch them ? Keeping a lot of threads means usage of system resources, creating new threads has some overhead too. Maybe the question is what is the right balance ? 

Note: It would be nice to have "Possible Bug" Issue Type for issues like this ;)

  was:
I did quite simple thing in the loop : 
 * deploy attached application into jboss-eap-7.0/standalone/deployments/
 * wait 1 minute
 * remove anything from jboss-eap-7.0/standalone/deployments/
 * wait 1 minute

I connected with jvisualvm and was watching monitor tab for cpu / classes / heap / threads overview statistics. After some time I spotted jumps (up and down) on threads.

After some time I see threads named "ServerService Thread Pool -- 346", I ended with number bigger than 1400. In my case 15 threads are created for 20 seconds when deploying and another 15 threads are created for 20 seconds when undeploying. Nothing seems to be reused

Setup for threads is done in https://github.com/wildfly/wildfly-core/blob/master/server/src/main/java/org/jboss/as/server/ServerService.java#L207-L213 method addService

Is it intentional to have threads alive only 20 seconds and then scratch them ? Keeping a lot of threads means usage of system resources, creating new threads has some overhead too. Maybe the question is what is the right balance ? 

Note: It would be nice to have "Possible Bug" Issue Type for issues like this ;)



> New threads named ServerService Thread Pool -- xyz created with every deploy and undeploy and removed after ~20 seconds
> -----------------------------------------------------------------------------------------------------------------------
>
>                 Key: WFCORE-1529
>                 URL: https://issues.jboss.org/browse/WFCORE-1529
>             Project: WildFly Core
>          Issue Type: Bug
>          Components: Domain Management
>    Affects Versions: 2.1.0.Final
>            Reporter: Rostislav Svoboda
>            Assignee: Brian Stansberry
>
> tl;dr version from Brian:
> The ServerService Threads and Host Controller Service Threads pools have no core size and a thread timeout of 20 secs, so if a management request comes in periodically but less often then every 20 secs (says twice a minute) the pool will continually churn threads. That kind of periodic polling is not an unusual scenario, so, we'll put in a core size of one or two.
> Original details from Rostislav:
> I did quite simple thing in the loop : 
>  * deploy attached application into jboss-eap-7.0/standalone/deployments/
>  * wait 1 minute
>  * remove anything from jboss-eap-7.0/standalone/deployments/
>  * wait 1 minute
> I connected with jvisualvm and was watching monitor tab for cpu / classes / heap / threads overview statistics. After some time I spotted jumps (up and down) on threads.
> After some time I see threads named "ServerService Thread Pool -- 346", I ended with number bigger than 1400. In my case 15 threads are created for 20 seconds when deploying and another 15 threads are created for 20 seconds when undeploying. Nothing seems to be reused
> Setup for threads is done in https://github.com/wildfly/wildfly-core/blob/master/server/src/main/java/org/jboss/as/server/ServerService.java#L207-L213 method addService
> Is it intentional to have threads alive only 20 seconds and then scratch them ? Keeping a lot of threads means usage of system resources, creating new threads has some overhead too. Maybe the question is what is the right balance ? 
> Note: It would be nice to have "Possible Bug" Issue Type for issues like this ;)



--
This message was sent by Atlassian JIRA
(v6.4.11#64026)


More information about the jboss-jira mailing list