Return-Path: X-Original-To: archive-asf-public-internal@cust-asf2.ponee.io Delivered-To: archive-asf-public-internal@cust-asf2.ponee.io Received: from cust-asf.ponee.io (cust-asf.ponee.io [163.172.22.183]) by cust-asf2.ponee.io (Postfix) with ESMTP id 3CA18200B79 for ; Wed, 7 Sep 2016 09:46:22 +0200 (CEST) Received: by cust-asf.ponee.io (Postfix) id 3B4D9160ACF; Wed, 7 Sep 2016 07:46:22 +0000 (UTC) Delivered-To: archive-asf-public@cust-asf.ponee.io Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by cust-asf.ponee.io (Postfix) with SMTP id 8BD06160AB1 for ; Wed, 7 Sep 2016 09:46:21 +0200 (CEST) Received: (qmail 16299 invoked by uid 500); 7 Sep 2016 07:46:20 -0000 Mailing-List: contact issues-help@camel.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@camel.apache.org Delivered-To: mailing list issues@camel.apache.org Received: (qmail 16285 invoked by uid 99); 7 Sep 2016 07:46:20 -0000 Received: from arcas.apache.org (HELO arcas) (140.211.11.28) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 07 Sep 2016 07:46:20 +0000 Received: from arcas.apache.org (localhost [127.0.0.1]) by arcas (Postfix) with ESMTP id 9067F2C1B7D for ; Wed, 7 Sep 2016 07:46:20 +0000 (UTC) Date: Wed, 7 Sep 2016 07:46:20 +0000 (UTC) From: "ASF GitHub Bot (JIRA)" To: issues@camel.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Commented] (CAMEL-10240) CamelHttpClient default pool size does not work on system with large number of cpus MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 archived-at: Wed, 07 Sep 2016 07:46:22 -0000 [ https://issues.apache.org/jira/browse/CAMEL-10240?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15469899#comment-15469899 ] ASF GitHub Bot commented on CAMEL-10240: ---------------------------------------- Github user asfgit closed the pull request at: https://github.com/apache/camel/pull/1157 > CamelHttpClient default pool size does not work on system with large number of cpus > ----------------------------------------------------------------------------------- > > Key: CAMEL-10240 > URL: https://issues.apache.org/jira/browse/CAMEL-10240 > Project: Camel > Issue Type: Improvement > Components: camel-jetty > Affects Versions: 2.17.2 > Reporter: Zoltan Farkas > > In CamelHttpClient a default threadpool is being created with a hardcoded size of 16: > {code} > @Override > protected void doStart() throws Exception { > if (!hasThreadPool()) { > // if there is no thread pool then create a default thread pool using daemon threads > QueuedThreadPool qtp = new QueuedThreadPool(); > // 16 max threads is the default in the http client > qtp.setMaxThreads(16); > qtp.setDaemon(true); > // let the thread names indicate they are from the client > qtp.setName("CamelJettyClient(" + ObjectHelper.getIdentityHashCode(this) + ")"); > setThreadPoolOrExecutor(qtp); > } > super.doStart(); > } > {code} > this configuration does not work because number of selectors is calculated relative to the number of CPUs in HttpClientTransportOverHTTP: > {code} > public HttpClientTransportOverHTTP() > { > this(Math.max(1, Runtime.getRuntime().availableProcessors() / 2)); > } > {code} > As a result by default camel simply hangs on these systems... > It would be nice if CamelHttpClient would have a constructor that set the HttpClientTransport or at least the number of selectors. -- This message was sent by Atlassian JIRA (v6.3.4#6332)