Return-Path: X-Original-To: apmail-hbase-issues-archive@www.apache.org Delivered-To: apmail-hbase-issues-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 57C1C17B08 for ; Wed, 9 Sep 2015 04:59:46 +0000 (UTC) Received: (qmail 94360 invoked by uid 500); 9 Sep 2015 04:59:46 -0000 Delivered-To: apmail-hbase-issues-archive@hbase.apache.org Received: (qmail 94314 invoked by uid 500); 9 Sep 2015 04:59:46 -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 94303 invoked by uid 99); 9 Sep 2015 04:59:46 -0000 Received: from arcas.apache.org (HELO arcas.apache.org) (140.211.11.28) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 09 Sep 2015 04:59:46 +0000 Date: Wed, 9 Sep 2015 04:59:46 +0000 (UTC) From: "stack (JIRA)" To: issues@hbase.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Updated] (HBASE-14331) a single callQueue related improvements MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 [ https://issues.apache.org/jira/browse/HBASE-14331?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] stack updated HBASE-14331: -------------------------- Attachment: HBASE-14331.patch > a single callQueue related improvements > --------------------------------------- > > Key: HBASE-14331 > URL: https://issues.apache.org/jira/browse/HBASE-14331 > Project: HBase > Issue Type: Improvement > Components: IPC/RPC, Performance > Reporter: Hiroshi Ikeda > Assignee: Hiroshi Ikeda > Priority: Minor > Attachments: BlockingQueuesPerformanceTestApp-output.pdf, BlockingQueuesPerformanceTestApp-output.txt, BlockingQueuesPerformanceTestApp.java, CallQueuePerformanceTestApp.java, HBASE-14331.patch, HBASE-14331.patch, SemaphoreBasedBlockingQueue.java, SemaphoreBasedLinkedBlockingQueue.java, SemaphoreBasedPriorityBlockingQueue.java > > > {{LinkedBlockingQueue}} well separates locks between the {{take}} method and the {{put}} method, but not between takers, and not between putters. These methods are implemented to take locks at the almost beginning of their logic. HBASE-11355 introduces multiple call-queues to reduce such possible congestion, but I doubt that it is required to stick to {{BlockingQueue}}. > There are the other shortcomings of using {{BlockingQueue}}. When using multiple queues, since {{BlockingQueue}} blocks threads it is required to prepare enough threads for each queue. It is possible that there is a queue starving for threads while there is another queue where threads are idle. Even if you can tune parameters to avoid such situations, the tuning is not so trivial. > I suggest using a single {{ConcurrentLinkedQueue}} with {{Semaphore}}. -- This message was sent by Atlassian JIRA (v6.3.4#6332)