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 80C6C722F for ; Tue, 13 Dec 2011 19:47:00 +0000 (UTC) Received: (qmail 52517 invoked by uid 500); 13 Dec 2011 19:47:00 -0000 Delivered-To: apmail-hbase-issues-archive@hbase.apache.org Received: (qmail 52480 invoked by uid 500); 13 Dec 2011 19:47:00 -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 52472 invoked by uid 99); 13 Dec 2011 19:47:00 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 13 Dec 2011 19:47:00 +0000 X-ASF-Spam-Status: No, hits=-2001.5 required=5.0 tests=ALL_TRUSTED,RP_MATCHES_RCVD X-Spam-Check-By: apache.org Received: from [140.211.11.116] (HELO hel.zones.apache.org) (140.211.11.116) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 13 Dec 2011 19:46:51 +0000 Received: from hel.zones.apache.org (hel.zones.apache.org [140.211.11.116]) by hel.zones.apache.org (Postfix) with ESMTP id F1ED0110D1E for ; Tue, 13 Dec 2011 19:46:30 +0000 (UTC) Date: Tue, 13 Dec 2011 19:46:30 +0000 (UTC) From: "Jean-Daniel Cryans (Commented) (JIRA)" To: issues@hbase.apache.org Message-ID: <1518437234.6989.1323805590992.JavaMail.tomcat@hel.zones.apache.org> In-Reply-To: <1507702777.60786.1323474759985.JavaMail.tomcat@hel.zones.apache.org> Subject: [jira] [Commented] (HBASE-5001) Improve the performance of block cache keys 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-5001?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13168651#comment-13168651 ] Jean-Daniel Cryans commented on HBASE-5001: ------------------------------------------- Stack is pegging one of my test machines (with a constant load fortunately), so I had to first retest the old patch and then did the new one. The difference I saw was it went from 215-225k to 220-230k. I'll do the test with only the other 14 machines to make sure. > Improve the performance of block cache keys > ------------------------------------------- > > Key: HBASE-5001 > URL: https://issues.apache.org/jira/browse/HBASE-5001 > Project: HBase > Issue Type: Improvement > Affects Versions: 0.90.4 > Reporter: Jean-Daniel Cryans > Assignee: Lars Hofhansl > Priority: Minor > Fix For: 0.94.0 > > Attachments: 5001-0.92.txt, 5001-v1.txt, 5001-v2.txt > > > Doing a pure random read test on data that's 100% block cache, I see that we are spending quite some time in getBlockCacheKey: > {quote} > "IPC Server handler 19 on 62023" daemon prio=10 tid=0x00007fe0501ff800 nid=0x6c87 runnable [0x00007fe0577f6000] > java.lang.Thread.State: RUNNABLE > at java.util.Arrays.copyOf(Arrays.java:2882) > at java.lang.AbstractStringBuilder.expandCapacity(AbstractStringBuilder.java:100) > at java.lang.AbstractStringBuilder.append(AbstractStringBuilder.java:390) > at java.lang.StringBuilder.append(StringBuilder.java:119) > at org.apache.hadoop.hbase.io.hfile.HFile.getBlockCacheKey(HFile.java:457) > at org.apache.hadoop.hbase.io.hfile.HFileReaderV2.readBlock(HFileReaderV2.java:249) > at org.apache.hadoop.hbase.io.hfile.HFileBlockIndex$BlockIndexReader.seekToDataBlock(HFileBlockIndex.java:209) > at org.apache.hadoop.hbase.io.hfile.HFileReaderV2$ScannerV2.seekTo(HFileReaderV2.java:521) > at org.apache.hadoop.hbase.io.hfile.HFileReaderV2$ScannerV2.seekTo(HFileReaderV2.java:536) > at org.apache.hadoop.hbase.regionserver.StoreFileScanner.seekAtOrAfter(StoreFileScanner.java:178) > at org.apache.hadoop.hbase.regionserver.StoreFileScanner.seek(StoreFileScanner.java:111) > at org.apache.hadoop.hbase.regionserver.StoreFileScanner.seekExactly(StoreFileScanner.java:219) > at org.apache.hadoop.hbase.regionserver.StoreScanner.(StoreScanner.java:80) > at org.apache.hadoop.hbase.regionserver.Store.getScanner(Store.java:1689) > at org.apache.hadoop.hbase.regionserver.HRegion$RegionScannerImpl.(HRegion.java:2857) > {quote} > Since the HFile name size is known and the offset is a long, it should be possible to allocate exactly what we need. Maybe use byte[] as the key and drop the separator too. -- This message is automatically generated by JIRA. If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa For more information on JIRA, see: http://www.atlassian.com/software/jira