You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@hc.apache.org by "ASF subversion and git services (JIRA)" <ji...@apache.org> on 2018/02/09 20:20:00 UTC

[jira] [Commented] (HTTPCORE-509) AVAIL_PROCS is auto-configured based on core count

    [ https://issues.apache.org/jira/browse/HTTPCORE-509?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16358905#comment-16358905 ] 

ASF subversion and git services commented on HTTPCORE-509:
----------------------------------------------------------

Commit 7bfffc547a3003885c05138c24d2f4b3b2413e02 in httpcomponents-core's branch refs/heads/4.4.x from [~garydgregory]
[ https://git-wip-us.apache.org/repos/asf?p=httpcomponents-core.git;h=7bfffc5 ]

HTTPCORE-509: AVAIL_PROCS is auto-configured based on core count.

> AVAIL_PROCS is auto-configured based on core count
> --------------------------------------------------
>
>                 Key: HTTPCORE-509
>                 URL: https://issues.apache.org/jira/browse/HTTPCORE-509
>             Project: HttpComponents HttpCore
>          Issue Type: Improvement
>          Components: HttpCore NIO
>    Affects Versions: 4.4.9
>            Reporter: Elijah Zupancic
>            Priority: Major
>
> In [IOReactorConfig:39|
> https://github.com/apache/httpcomponents-core/blob/92c4c6ff64a9a4a0b0677338c03ebd24bfe1b219/httpcore-nio/src/main/java/org/apache/http/impl/nio/reactor/IOReactorConfig.java#L39
> ], the default value for thread count is based on the detected cores on the system. This is usually acceptable. However, if the library is being run within a container where the reported number of CPUs does not match the actual amount of CPU available, you will see too many threads created in the pool leading to performance degradation.
> Of course a direct user of this library will be able to set this value to a sensible number. However, you will typically see httpcore-nio 4-5 steps down the dependency graph and it is being used by other open source components which in turn are being used by other components.
> I would suggest that we optionally read a system parameter for the value of AVAIL_PROCS. If that system parameter is not available, then we use the value of Runtime.getRuntime().availableProcessors();



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

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