Return-Path: Delivered-To: apmail-hadoop-hbase-dev-archive@minotaur.apache.org Received: (qmail 8427 invoked from network); 13 May 2010 05:23:08 -0000 Received: from unknown (HELO mail.apache.org) (140.211.11.3) by 140.211.11.9 with SMTP; 13 May 2010 05:23:08 -0000 Received: (qmail 94585 invoked by uid 500); 13 May 2010 05:23:06 -0000 Delivered-To: apmail-hadoop-hbase-dev-archive@hadoop.apache.org Received: (qmail 94497 invoked by uid 500); 13 May 2010 05:23:06 -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 94488 invoked by uid 99); 13 May 2010 05:23:05 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 13 May 2010 05:23:05 +0000 X-ASF-Spam-Status: No, hits=-1421.0 required=10.0 tests=ALL_TRUSTED,AWL X-Spam-Check-By: apache.org Received: from [140.211.11.22] (HELO thor.apache.org) (140.211.11.22) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 13 May 2010 05:23:04 +0000 Received: from thor (localhost [127.0.0.1]) by thor.apache.org (8.13.8+Sun/8.13.8) with ESMTP id o4D5MiZT016730 for ; Thu, 13 May 2010 05:22:44 GMT Message-ID: <10520195.13831273728164242.JavaMail.jira@thor> Date: Thu, 13 May 2010 01:22:44 -0400 (EDT) From: "stack (JIRA)" To: hbase-dev@hadoop.apache.org Subject: [jira] Resolved: (HBASE-1246) BloomFilter's use of BitSet is too inefficient In-Reply-To: <108811871.1236333957584.JavaMail.jira@brutus> 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-1246?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] stack resolved HBASE-1246. -------------------------- Resolution: Fixed Resolving > BloomFilter's use of BitSet is too inefficient > ---------------------------------------------- > > Key: HBASE-1246 > URL: https://issues.apache.org/jira/browse/HBASE-1246 > Project: Hadoop HBase > Issue Type: Bug > Affects Versions: 0.20.0 > Environment: Java 1.6, OSX 64 bit > Reporter: ryan rawson > Assignee: Nicolas Spiegelberg > Fix For: 0.22.0 > > Attachments: ByteBloomFilter.java > > > From the logfile run of TestBloomFilter with special SizeOf agent jar: > Writing bloom filter for: hdfs://localhost:64003/user/ryan/testComputedParameters/1278366260/contents/6159869037185296839 for size: 100 > 2009-03-06 01:54:25,491 DEBUG [RegionServer:0.cacheFlusher] regionserver.StoreFile$StoreFileWriter(319): New bloom filter: vectorSize: 1175 hash_count: 5 numKeys: 100 > Serialized bloomfilter size: 160 > In memory bf size: 1248 > As we can see, the bit vector is 1175 bits, and the serialized size is fairly compact - 160 bytes. > But the in-memory size is nearly 10x bigger than it has to be. Looking in BloomFilter we see: > BitSet bits; > is the only field. > Clearly it seems the BitSet is using 1 byte = 1 bit. That is an 8 time expansion of where we should be. > Considering every HFile could potentially have a bloom filter, and bloom filters are more likely to have bit vector sizes of 10,000-100,000, we should do something about this. Aka: write our own bit-set that uses byte[] and bit ops. -- This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online.