Return-Path: Delivered-To: apmail-hadoop-hbase-dev-archive@minotaur.apache.org Received: (qmail 6090 invoked from network); 3 Jul 2009 17:20:51 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.3) by minotaur.apache.org with SMTP; 3 Jul 2009 17:20:51 -0000 Received: (qmail 49232 invoked by uid 500); 3 Jul 2009 17:20:47 -0000 Delivered-To: apmail-hadoop-hbase-dev-archive@hadoop.apache.org Received: (qmail 49075 invoked by uid 500); 3 Jul 2009 17:20:47 -0000 Mailing-List: contact hbase-dev-help@hadoop.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: hbase-dev@hadoop.apache.org Delivered-To: mailing list hbase-dev@hadoop.apache.org Received: (qmail 48642 invoked by uid 99); 3 Jul 2009 17:18:09 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 03 Jul 2009 17:18:09 +0000 X-ASF-Spam-Status: No, hits=-2000.0 required=10.0 tests=ALL_TRUSTED X-Spam-Check-By: apache.org Received: from [140.211.11.140] (HELO brutus.apache.org) (140.211.11.140) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 03 Jul 2009 17:18:07 +0000 Received: from brutus (localhost [127.0.0.1]) by brutus.apache.org (Postfix) with ESMTP id 3CB5C234C053 for ; Fri, 3 Jul 2009 10:17:47 -0700 (PDT) Message-ID: <1871476146.1246641467247.JavaMail.jira@brutus> Date: Fri, 3 Jul 2009 10:17:47 -0700 (PDT) From: "stack (JIRA)" To: hbase-dev@hadoop.apache.org Subject: [jira] Commented: (HBASE-1597) Prevent unnecessary caching of blocks during compactions In-Reply-To: <1146530730.1246424567169.JavaMail.jira@brutus> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 X-Virus-Checked: Checked by ClamAV on apache.org [ https://issues.apache.org/jira/browse/HBASE-1597?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12727054#action_12727054 ] stack commented on HBASE-1597: ------------------------------ This seems odd: {code} + public CompactionReader(Reader reader) { + super(reader.istream, reader.fileSize, reader.cache); + super.blockIndex = reader.blockIndex; + super.trailer = reader.trailer; + super.lastkey = reader.lastkey; + super.avgKeyLen = reader.avgKeyLen; + super.avgValueLen = reader.avgValueLen; + super.comparator = reader.comparator; + super.metaIndex = reader.metaIndex; + super.fileInfoLoaded = reader.fileInfoLoaded; + super.compressAlgo = reader.compressAlgo; + } {code} Why not make a constructor that takes above args? Too much of readBlock is duplicated in CompactionReader. Would suggest changing backing readBlock so it makes call to a new method that does the add-to-cache... then subclass this new method only. Otherwise, nice patch. > Prevent unnecessary caching of blocks during compactions > -------------------------------------------------------- > > Key: HBASE-1597 > URL: https://issues.apache.org/jira/browse/HBASE-1597 > Project: Hadoop HBase > Issue Type: Bug > Affects Versions: 0.20.0 > Reporter: Jonathan Gray > Assignee: Jonathan Gray > Fix For: 0.20.0 > > Attachments: HBASE-1597-v1.patch > > > When running any kind of compaction, we read every block of every storefile being compacted into the block cache. > We would like to reuse any already cached blocks, if available, but otherwise we should not bog down the LRU with unnecessary blocks. > This is not as bad as it was with the old LRU because the latest LRU implementation (HBASE-1460) is scan-resistant. This ensures that we are not causing massive eviction of the blocks that are being read multiple times or from in-memory tables. However, this does add to the GC-woes of an import because each block gets further referenced, and for longer periods of time. There is also overhead in running the LRU evictions. -- This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online.