Return-Path: Delivered-To: apmail-cassandra-user-archive@www.apache.org Received: (qmail 3434 invoked from network); 27 Oct 2010 16:41:24 -0000 Received: from unknown (HELO mail.apache.org) (140.211.11.3) by 140.211.11.9 with SMTP; 27 Oct 2010 16:41:24 -0000 Received: (qmail 98687 invoked by uid 500); 27 Oct 2010 16:37:54 -0000 Delivered-To: apmail-cassandra-user-archive@cassandra.apache.org Received: (qmail 98401 invoked by uid 500); 27 Oct 2010 16:37:53 -0000 Mailing-List: contact user-help@cassandra.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: user@cassandra.apache.org Delivered-To: mailing list user@cassandra.apache.org Received: (qmail 98339 invoked by uid 99); 27 Oct 2010 16:37:53 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 27 Oct 2010 16:37:53 +0000 X-ASF-Spam-Status: No, hits=2.9 required=10.0 tests=HTML_MESSAGE,RCVD_IN_DNSWL_NONE,SPF_NEUTRAL X-Spam-Check-By: apache.org Received-SPF: neutral (nike.apache.org: local policy) Received: from [209.85.213.44] (HELO mail-yw0-f44.google.com) (209.85.213.44) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 27 Oct 2010 16:37:37 +0000 Received: by ywp6 with SMTP id 6so588246ywp.31 for ; Wed, 27 Oct 2010 09:37:16 -0700 (PDT) MIME-Version: 1.0 Received: by 10.42.214.209 with SMTP id hb17mr640879icb.388.1288197435945; Wed, 27 Oct 2010 09:37:15 -0700 (PDT) Received: by 10.42.131.137 with HTTP; Wed, 27 Oct 2010 09:37:15 -0700 (PDT) In-Reply-To: References: Date: Wed, 27 Oct 2010 16:37:15 +0000 Message-ID: Subject: Re: High BloomFilterFalseRation From: Mike Malone To: user@cassandra.apache.org Content-Type: multipart/alternative; boundary=20cf301cc39a91f12704939bd6d5 X-Virus-Checked: Checked by ClamAV on apache.org --20cf301cc39a91f12704939bd6d5 Content-Type: text/plain; charset=ISO-8859-1 I think he was asking about queries, not data. The data may be randomly distributed by way of a hash on the key, but if your queries are heavily skewed (e.g., if you query for "foo" a lot more than "foo/bar", and "foo" randomly happens to trigger a false positive) the skew in your query pattern could cause a seemingly strange spike in false positives. With a hierarchical data model it's not unlikely that this sort of skew exists since you'd tend to query for items towards the root of the hierarchy more frequently. Mike On Wed, Oct 27, 2010 at 2:14 PM, Daniel Doubleday wrote: > Hm - > > not sure if I understand the random question. We are using RP. But I > wouldn't know why that should matter. > I thought that the bloom filter hash function should evenly distribute no > matter what keys come in. > > Keys are '/' separated strings (aka paths :-)) > > I do bulk inserts like: (1000 rows at a time, with ~ 50 cols each) > > [ > {'a/b/foo': cols}, > {'a/b/bar': cols}, > {'a/b/baz': cols} > ] > > and before that I would query for 'a/b'. Recursively as in mkdir -p > > If parent paths are missing they would be inserted with the bulk insert. > > The value for BloomFilterFalseRatio has been in the range of 0.19 - 0.59 in > the last couple of hours. Mostly around 0.3 > > We're on 0.6.6 btw > > > On Oct 27, 2010, at 3:58 PM, Jonathan Ellis wrote: > > > This is not expected, no. How random are your queries? If you have a > > couple outlier rows causing the false positives that are being queried > > over and over then that could just be the luck of the draw. > > > > On Wed, Oct 27, 2010 at 5:24 AM, Daniel Doubleday > > wrote: > >> Hi people > >> > >> We are currently moving our second use case from mysql to cassandra. > While importing the data (ongoing) I noticed that the BloomFilterFalseRation > seems to be pretty high compared to another CF which is in used in > production right now. > >> > >> Its a hierarchical data model and I cannot avoid to do a read before > inserting multiple columns. > >> > >> I see a false positive ration of 0.28 while in my other CF it is > 0.00025. > >> > >> The CF has 5 live sstables whiel I read that ratio. At that time I > inserted ~ 200k rows with a total of 1M cols. Row keys are pretty large > unfortunately (key.length() ~ 60) > >> > >> Just wanted to check if this value is to be expected. > >> > >> > >> > >> Thanks, > >> Daniel > > > > > > > > -- > > Jonathan Ellis > > Project Chair, Apache Cassandra > > co-founder of Riptano, the source for professional Cassandra support > > http://riptano.com > > --20cf301cc39a91f12704939bd6d5 Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable I think he was asking about queries, not data. The data may be randomly dis= tributed by way of a hash on the key, but if your queries are heavily skewe= d (e.g., if you query for "foo" a lot more than "foo/bar&quo= t;, and "foo" randomly happens to trigger a false positive) the s= kew in your query pattern could cause a seemingly strange spike in false po= sitives.

With a hierarchical data model it's not unlikely that th= is sort of skew exists since you'd tend to query for items towards the = root of the hierarchy more frequently.

Mike

On Wed, Oct 27, 2010 at 2:14 PM, Daniel Doub= leday <dan= iel.doubleday@gmx.net> wrote:
Hm -

not sure if I understand the random question. We are using RP. But I wouldn= 't know why that should matter.
I thought that the bloom filter hash function should evenly distribute no m= atter what keys come in.

Keys are '/' separated strings (aka paths :-))

I do bulk inserts like: (1000 rows at a time, with ~ 50 cols each)

[
=A0 =A0 =A0 =A0{'a/b/foo': cols},
=A0 =A0 =A0 =A0{'a/b/bar': cols},
=A0 =A0 =A0 =A0{'a/b/baz': cols}
]

and before that I would query for 'a/b'. Recursively as in mkdir -p=

If parent paths are missing they would be inserted with the bulk insert.
The value for BloomFilterFalseRatio has been in the range of 0.19 - 0.59 in= the last couple of hours. Mostly around 0.3

We're on 0.6.6 btw


On Oct 27, 2010, at 3:58 PM, Jonathan Ellis wrote:

> This is not expected, no. =A0How random are your queries? =A0If you ha= ve a
> couple outlier rows causing the false positives that are being queried=
> over and over then that could just be the luck of the draw.
>
> On Wed, Oct 27, 2010 at 5:24 AM, Daniel Doubleday
> <daniel.doubleday@gmx.n= et> wrote:
>> Hi people
>>
>> We are currently moving our second use case from mysql to cassandr= a. While importing the data (ongoing) I noticed that the BloomFilterFalseRa= tion seems to be pretty high compared to another CF which is in used in pro= duction right now.
>>
>> Its a hierarchical data model and I cannot avoid to do a read befo= re inserting multiple columns.
>>
>> I see a false positive ration of 0.28 while in my other CF it is 0= .00025.
>>
>> The CF has 5 live sstables whiel I read that ratio. At that time I= inserted ~ 200k rows with a total of 1M cols. Row keys are pretty large un= fortunately (key.length() ~ 60)
>>
>> Just wanted to check if this value is to be expected.
>>
>>
>>
>> Thanks,
>> Daniel
>
>
>
> --
> Jonathan Ellis
> Project Chair, Apache Cassandra
> co-founder of Riptano, the source for professional Cassandra support > http://riptano.com


--20cf301cc39a91f12704939bd6d5--