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 2B81F184C6 for ; Mon, 21 Mar 2016 18:17:26 +0000 (UTC) Received: (qmail 52359 invoked by uid 500); 21 Mar 2016 18:17:26 -0000 Delivered-To: apmail-hbase-issues-archive@hbase.apache.org Received: (qmail 52302 invoked by uid 500); 21 Mar 2016 18:17:26 -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 52253 invoked by uid 99); 21 Mar 2016 18:17:25 -0000 Received: from arcas.apache.org (HELO arcas) (140.211.11.28) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 21 Mar 2016 18:17:25 +0000 Received: from arcas.apache.org (localhost [127.0.0.1]) by arcas (Postfix) with ESMTP id BC9DD2C1F5A for ; Mon, 21 Mar 2016 18:17:25 +0000 (UTC) Date: Mon, 21 Mar 2016 18:17:25 +0000 (UTC) From: "Vladimir Rodionov (JIRA)" To: issues@hbase.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Commented] (HBASE-15493) Default ArrayList size may not be optimal for Mutation 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-15493?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15204796#comment-15204796 ] Vladimir Rodionov commented on HBASE-15493: ------------------------------------------- {quote} Is it supposed to go in branch-1 as well? {quote} All memory optimizations will be back - ported to 1.1 + . > Default ArrayList size may not be optimal for Mutation > ------------------------------------------------------ > > Key: HBASE-15493 > URL: https://issues.apache.org/jira/browse/HBASE-15493 > Project: HBase > Issue Type: Improvement > Components: Client, regionserver > Affects Versions: 2.0.0 > Reporter: Vladimir Rodionov > Assignee: Vladimir Rodionov > Fix For: 2.0.0 > > Attachments: HBASE-15493-v1.patch > > > {code} > List getCellList(byte[] family) { > List list = this.familyMap.get(family); > if (list == null) { > list = new ArrayList(); > } > return list; > } > {code} > Creates list of size 10, this is up to 80 bytes per column family in mutation object. > Suggested: > {code} > List getCellList(byte[] family) { > List list = this.familyMap.get(family); > if (list == null) { > list = new ArrayList(CELL_LIST_INITIAL_CAPACITY); > } > return list; > } > {code} > CELL_LIST_INITIAL_CAPACITY = 2 in the patch, this is debatable. For mutation where every CF has 1 cell, this gives decent reduction in memory allocation rate in both client and server during write workload. ~2%, not a big number, but as I said, already, memory optimization will include many small steps. -- This message was sent by Atlassian JIRA (v6.3.4#6332)