You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@mina.apache.org by "Jonathan Valliere (Jira)" <ji...@apache.org> on 2021/07/31 07:44:00 UTC

[jira] [Updated] (DIRMINA-723) OrderedThreadPoolExecutor behavior: configurable queue size, corePoolSize, maximumPoolSize

     [ https://issues.apache.org/jira/browse/DIRMINA-723?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Jonathan Valliere updated DIRMINA-723:
--------------------------------------
    Sprint: Mina Sprint 2

> OrderedThreadPoolExecutor behavior: configurable queue size, corePoolSize, maximumPoolSize
> ------------------------------------------------------------------------------------------
>
>                 Key: DIRMINA-723
>                 URL: https://issues.apache.org/jira/browse/DIRMINA-723
>             Project: MINA
>          Issue Type: Improvement
>          Components: Core
>    Affects Versions: 2.0.0-M6
>         Environment: Ubuntu Linux, kernel 2.6.x
>            Reporter: Victor N
>            Priority: Minor
>
> The problem was discussed with Emmanuel Lecharny in mail lists:
> http://www.nabble.com/OrderedThreadPoolExecutor%3A-limited-workQueue-td24275973.html
> If you compare OrderedThreadPoolExecutor and standard ThreadPoolExecutor, you can see that ThreadPoolExecutor has useful params:
> - core pool size
> - maximum pool size
> - work queue size
> If you use unbounded thread pools and queues with mina Acceptor or Connector, you may get OutOfMemoryError under critical load because Java creates too many threads.
> With ThreadPoolExecutor you may limit the number of threads (maximumPoolSize) and use a bounded queue (ex. LinkedBlockingQueue of limited capacity).
> Unfortunately, this does not work with OrderedThreadPoolExecutor -both  "waitingSessions" and  "sessionTasksQueue" do not allow to configure their size nor pass a different queue implementation.
> Even though OrderedThreadPoolExecutor extends ThreadPoolExecutor, it overrides the behavior significantly - seems that its meaning of "corePoolSize" and "maximumPoolSize" is different.



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@mina.apache.org
For additional commands, e-mail: dev-help@mina.apache.org