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 8A4272009FB for ; Fri, 6 May 2016 09:48:14 +0200 (CEST) Received: by cust-asf.ponee.io (Postfix) id 88C92160A0C; Fri, 6 May 2016 07:48:14 +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 D06AD1609F6 for ; Fri, 6 May 2016 09:48:13 +0200 (CEST) Received: (qmail 69304 invoked by uid 500); 6 May 2016 07:48:13 -0000 Mailing-List: contact issues-help@hbase.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Delivered-To: mailing list issues@hbase.apache.org Received: (qmail 69286 invoked by uid 99); 6 May 2016 07:48:13 -0000 Received: from arcas.apache.org (HELO arcas) (140.211.11.28) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 06 May 2016 07:48:13 +0000 Received: from arcas.apache.org (localhost [127.0.0.1]) by arcas (Postfix) with ESMTP id D41B42C1F5D for ; Fri, 6 May 2016 07:48:12 +0000 (UTC) Date: Fri, 6 May 2016 07:48:12 +0000 (UTC) From: "Jingcheng Du (JIRA)" To: issues@hbase.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Commented] (HBASE-15784) MIsuse core/maxPoolSize of LinkedBlockingQueue in ThreadPoolExecutor MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 archived-at: Fri, 06 May 2016 07:48:14 -0000 [ https://issues.apache.org/jira/browse/HBASE-15784?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15273767#comment-15273767 ] Jingcheng Du commented on HBASE-15784: -------------------------------------- bq. And I suggest to set allowCoreThreadTimeOut to true. The patch only shows diff so I'm not sure whether we set it at all places. Could you please verify it? Thanks for comments. All of the pools have been set allowCoreThreadTimeOut as true. > MIsuse core/maxPoolSize of LinkedBlockingQueue in ThreadPoolExecutor > -------------------------------------------------------------------- > > Key: HBASE-15784 > URL: https://issues.apache.org/jira/browse/HBASE-15784 > Project: HBase > Issue Type: Bug > Components: Client, Replication, Thrift > Reporter: Jingcheng Du > Assignee: Jingcheng Du > Attachments: HBASE-15784.patch > > > LinkedBlockingQueue is usually used in ThreadPoolExecutor. It allows the thread pool not to be blocked if the number of running threads in the pool is less than the max pool size and the queue is not full. > But when the core pool size of ThreadPoolExecutor is different from the max pool size, the things don't go as expected. When the number of running threads is the same with the core size, more requests of executions are added into the LinkedBlockingQueue. And the requests can be executed again only when LinkedBlockingQueue is full or some of running threads are finished. > Thus it is better to use the same value for the core and max pool size when the LinkedBlockingQueue is used. -- This message was sent by Atlassian JIRA (v6.3.4#6332)