[jboss-jira] [JBoss JIRA] (JGRP-1037) Ergonomics: size thread pools dynamically

Bela Ban (JIRA) jira-events at lists.jboss.org
Thu May 30 10:42:55 EDT 2013


    [ https://issues.jboss.org/browse/JGRP-1037?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12778251#comment-12778251 ] 

Bela Ban commented on JGRP-1037:
--------------------------------

Not so sure automatically adjusting the thread pool sizes makes sense:
* Even if we compute the average number of messages to be serviced by the pool, setting a large max size for the OOB pool should be enough, as the pool will increase the number of threads (the OOB has no queue by default) automatically
* For the OOB pool, if we set the max threads too high, we'd get too many threads, leading to increased context switching and contention. We'd rather lose a few requests, as this will throttle the sender because it won't get credits sent back by the receivers quickly
* For the regular pool, we have to deliver messages from a given sender P in the order in which P sent them, so setting the max thread pool size to be greater than the average number of messages in the system would be wrong, as we cannot process all regular messages right away. For example, if we have 5 messages from P, then we only need 1 thread to deliver those messages. If we had a message from P, one from Q and one from R, we'd need 3 threads. So the best way to compute the max thread pool size for regular messages is to simply set it to the current cluster size, e.g. 10 nodes == max-size of 10 (plus perhaps 1-2 spare threads). However, we also need to think about whether the queue created by default for the regular thread pool should be removed.
                
> Ergonomics: size thread pools dynamically
> -----------------------------------------
>
>                 Key: JGRP-1037
>                 URL: https://issues.jboss.org/browse/JGRP-1037
>             Project: JGroups
>          Issue Type: Feature Request
>            Reporter: Bela Ban
>            Assignee: Bela Ban
>             Fix For: 3.4
>
>
> Ergonomics are a step towards less configuration and more dynamic setting of values. Example: a thread pool's min and max sizes can be dynamically changed, based on observations. When we have a min size of 10, but the thread pool is always 75, then we should set the min size to 75 and possibly change the idle time too.
> This is just a first step towards ergonomics and needs to be expanded on in 3.x releases

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira


More information about the jboss-jira mailing list