You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@knox.apache.org by "Attila Csoma (JIRA)" <ji...@apache.org> on 2017/12/07 13:52:00 UTC

[jira] [Assigned] (KNOX-1139) Tthread pool size in tests are not enough in a 32 core machine if gateway port mapping enabled

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

Attila Csoma reassigned KNOX-1139:
----------------------------------

    Assignee: Attila Csoma

> Tthread pool size in tests are not enough in a 32 core machine if gateway port mapping enabled 
> -----------------------------------------------------------------------------------------------
>
>                 Key: KNOX-1139
>                 URL: https://issues.apache.org/jira/browse/KNOX-1139
>             Project: Apache Knox
>          Issue Type: Test
>          Components: Tests
>            Reporter: Attila Csoma
>            Assignee: Attila Csoma
>             Fix For: 0.14.0
>
>         Attachments: KNOX-1139.patch
>
>
> Currently Jetty calculates acceptor and selector count as a fraction of processor count (core/8 and core/2 respectively) and will maximize them as 4. That means 4 acceptor and 4 select in a 32+ core machine for each {{ServerConnector}}.  In {{Server.doStart}} jetty will check if {{maxThreadPoolSize}} is large enough to store a request thread and all acceptors and selectors thread for each connector together.
> Currently in tests thread pool max size fixed as 16. In {{GatewayServer.start}} if gateway port mapping is enabled it will initialize two connectors in jetty which on a 32+ core machine will create 4+4 acceptor and 4+4 selector. With the one extra request thread it will exceed the 16 thread pool limit and {{org.apache.hadoop.gateway.GatewayPortMappingFuncTest}} will throw the following exception:
> {code}
> java.lang.IllegalStateException: Insufficient threads: max=16 < needed(acceptors=8 + selectors=8 + request=1)
> 	at org.apache.hadoop.gateway.GatewayPortMappingFuncTest.setup(GatewayPortMappingFuncTest.java:96)
> {code}
> This is only a unit test problem since the default value for thread pool size in {{GatewayConfigImpl}} is 254.
> Probably it would be a better method to calculate thread pool count from core count or max thread count in tests or just use the default value from {{GatewayConfigImpl}}.



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)