Return-Path: X-Original-To: apmail-cassandra-user-archive@www.apache.org Delivered-To: apmail-cassandra-user-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id A55AD91FE for ; Thu, 15 Mar 2012 22:40:11 +0000 (UTC) Received: (qmail 15653 invoked by uid 500); 15 Mar 2012 22:40:09 -0000 Delivered-To: apmail-cassandra-user-archive@cassandra.apache.org Received: (qmail 15601 invoked by uid 500); 15 Mar 2012 22:40:09 -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 15590 invoked by uid 99); 15 Mar 2012 22:40:09 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 15 Mar 2012 22:40:09 +0000 X-ASF-Spam-Status: No, hits=3.2 required=5.0 tests=FRT_ADOBE2,HTML_MESSAGE,RCVD_IN_DNSWL_LOW,SPF_NEUTRAL X-Spam-Check-By: apache.org Received-SPF: neutral (nike.apache.org: local policy) Received: from [209.85.214.44] (HELO mail-bk0-f44.google.com) (209.85.214.44) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 15 Mar 2012 22:40:00 +0000 Received: by bkuw5 with SMTP id w5so2938028bku.31 for ; Thu, 15 Mar 2012 15:39:40 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :content-type:x-gm-message-state; bh=FCZxMLw+C/mu/wviNdKzTFI8KDEtmu5juWhrRh7iJW4=; b=phEFAImuPIBi2XQXs7ShzTZauoypTC48qoxdkQzhmdtXTSHLkd6w+exMti4YIun5RF AX1Pl5Dwl0EdBorsyEXdqpfJ3mtHlyS7x+CTReInrLxjfeA9b7tysiyDTCnz44PDkZLK AHekK7MNsBs3znw2Jxs+Kl6iE0a8SowSQPHW3uXCzu92oBjPDkVJiO/biXa1sXgRKIoW 3QS994zPmailuf4Zztl1wzPoVUPCeVOdsDmhlFL6Zp8UtbBBye8EfIhF1K7BeFr2JVSP b6GIxWP0Ta49bDomNPx0sfJsGIJUu1hlfDqGUTtdk6TZ9JesZUrwsbzxLci5HG3+1h8i AHgA== MIME-Version: 1.0 Received: by 10.205.117.15 with SMTP id fk15mr94401bkc.133.1331851179868; Thu, 15 Mar 2012 15:39:39 -0700 (PDT) Received: by 10.204.197.66 with HTTP; Thu, 15 Mar 2012 15:39:39 -0700 (PDT) In-Reply-To: <1331849116.29548.135.camel@cph-drift2.eur.adobe.com> References: <1331849116.29548.135.camel@cph-drift2.eur.adobe.com> Date: Thu, 15 Mar 2012 22:39:39 +0000 Message-ID: Subject: Re: 1.0.8 with Leveled compaction - Possible issues From: Thomas van Neerijnen To: user@cassandra.apache.org, jelmerfj@adobe.com Content-Type: multipart/alternative; boundary=0015174781fe7842e504bb4fc488 X-Gm-Message-State: ALoCoQloWOLsLanheAKL3FlmWBxh/+wKZkLTl6duond47sfXyLJIc0Yt26IwxYO+E0S5r8/Cf/W0 X-Virus-Checked: Checked by ClamAV on apache.org --0015174781fe7842e504bb4fc488 Content-Type: text/plain; charset=ISO-8859-1 Heya I'd suggest staying away from Leveled Compaction until 1.0.9. For the why see this great explanation I got from Maki Watanabe on the list: http://mail-archives.apache.org/mod_mbox/cassandra-user/201203.mbox/%3CCALqbeQbQ=d-hORVhA-LHOo_a5j46fQrsZMm+OQgfkgR=4RRQJQ@mail.gmail.com%3E Keep an eye on that one because I'm busy testing one of his suggestions, I'll post back with the results soon. My understanding is after a change in compaction or compression, until you run an upgradesstables on all the nodes the current sstables will have the old schema settings, only new ones get the new format. Obviously this compounds the issue I mentioned above tho. Be warned, an upgradesstables can take a long time so maybe keep an eye on the number of files around vs over 5MB to get an idea of progress. Maybe someone else knows a better way? You can change back and forth between compression and compaction options quite safely, but again you need an upgradesstables to remove it from current sstables. In my experience I've safely applied compression and leveled compaction to the same CF at the same time without issue so I guess it's ok:) On Thu, Mar 15, 2012 at 10:05 PM, Johan Elmerfjord wrote: > ** > Hi, I'm testing the community-version of Cassandra 1.0.8. > We are currently on 0.8.7 in our production-setup. > > We have 3 Column Families that each takes between 20 and 35 GB on disk per > node. (8*2 nodes total) > We would like to change to Leveled Compaction - and even try compression > as well to reduce the space needed for compactions. > We are running on SSD-drives as latency is a key-issue. > > As test I have imported one Column Family from 3 production-nodes to a 3 > node test-cluster. > The data on the 3 nodes ranges from 19-33GB. (with at least one large > SSTable (Tiered size - recently compacted)). > > After loading this data to the 3 test-nodes, and running scrub and repair, > I took a backup of the data so I have good test-set of data to work on. > Then I changed changed to leveled compaction, using the cassandra-cli: > > UPDATE COLUMN FAMILY TestCF1 WITH > compaction_strategy=LeveledCompactionStrategy; > I could see the change being written to the logfile on all nodes. > > Then I don't know for for sure if I need to run anything else to make the > change happen - or if it's just to wait. > My test-cluster does not receive new data. > > For this KS & CF and on each of the nodes I have tried some or several > of: upgradesstable, scrub, compact, cleanup and repair - each task taking > between 40 minutes and 4 hours. > With the exception of compact that returns almost immediately with no > visible compactions made. > > On some node I ended up with over 30000 files with the default 5MB size > for leveled compaction, on another node it didn't look like anything has > been done and I still have a 19GB SSTable. > > I then made another change. > UPDATE COLUMN FAMILY TestCF1 WITH > compaction_strategy=LeveledCompactionStrategy AND > compaction_strategy_options=[{sstable_size_in_mb: 64}]; > WARNING: [{}] strategy_options syntax is deprecated, please use {} > Which is probably wrong in the documentation - and should be: > UPDATE COLUMN FAMILY TestCF1 WITH > compaction_strategy=LeveledCompactionStrategy AND > compaction_strategy_options={sstable_size_in_mb: 64}; > > I think that we will be able to find the data in 3 searches with a 64MB > size - and still only use around 700MB while doing compactions - and keep > the number of files ~3000 per CF. > > A few days later it looks like I still have a mix between original huge > SStables, 5MB once - and some nodes has 64MB files as well. > Do I need to do something special to clean this up? > I have tried another scrub /upgradesstables/clean - but nothing seems to > do any change to me. > > Finally I have also tried to enable compression: > UPDATE COLUMN FAMILY TestCF1 WITH > compression_options=[{sstable_compression:SnappyCompressor, > chunk_length_kb:64}]; > - which results in the same [{}] - warning. > > As you can see below - this created CompressionInfo.db - files on some > nodes - but not on all. > > *Is there a way I can force Teired sstables to be converted into Leveled > once - and then to compression as well?* > *Why are the original file (Tiered Sized SSTables still present on > testnode1 - when is it supposed to delete them?* > > *Can I change back and forth between compression (on/off - or chunksizes) > - and between Leveled vs Size Tiered compaction?* > *Is there a way to see if the node is done - or waiting for something?* > *When is it safe to apply another setting - does it have to complete one > reorg before moving on to the next?* > > *Any input or own experiences are warmly welcome.* > > Best regards, Johan > > > Some lines of example directory-listings below.: > > Some files for testnode 3. (looks like it's still have the original Size > Tiered files around, and a mixture of compressed 64MB files - and 5MB > files? > > total 19G > drwxr-xr-x 3 cass cass 4.0K Mar 13 17:11 snapshots > -rw-r--r-- 1 cass cass 6.0G Mar 13 18:42 TestCF1-hc-6346-Index.db > -rw-r--r-- 1 cass cass 1.3M Mar 13 18:42 TestCF1-hc-6346-Filter.db > -rw-r--r-- 1 cass cass 13G Mar 13 18:42 TestCF1-hc-6346-Data.db > -rw-r--r-- 1 cass cass 2.4M Mar 13 18:42 TestCF1-hc-6346-CompressionInfo.db > -rw-r--r-- 1 cass cass 4.3K Mar 13 18:42 TestCF1-hc-6346-Statistics.db > -rw-r--r-- 1 cass cass 195K Mar 13 18:42 TestCF1-hc-6347-Filter.db > -rw-r--r-- 1 cass cass 4.9M Mar 13 18:42 TestCF1-hc-6347-Index.db > -rw-r--r-- 1 cass cass 9.0M Mar 13 18:42 TestCF1-hc-6347-Data.db > -rw-r--r-- 1 cass cass 4.3K Mar 13 18:42 TestCF1-hc-6347-Statistics.db > -rw-r--r-- 1 cass cass 2.0K Mar 13 18:42 TestCF1-hc-6347-CompressionInfo.db > -rw-r--r-- 1 cass cass 11K Mar 13 18:43 TestCF1-hc-6351-CompressionInfo.db > -rw-r--r-- 1 cass cass 52M Mar 13 18:43 TestCF1-hc-6351-Data.db > -rw-r--r-- 1 cass cass 1.1M Mar 13 18:43 TestCF1-hc-6351-Filter.db > -rw-r--r-- 1 cass cass 28M Mar 13 18:43 TestCF1-hc-6351-Index.db > -rw-r--r-- 1 cass cass 4.3K Mar 13 18:43 TestCF1-hc-6351-Statistics.db > -rw-r--r-- 1 cass cass 401 Mar 13 18:43 TestCF1.json > -rw-r--r-- 1 cass cass 950 Mar 13 18:43 TestCF1-hc-6350-CompressionInfo.db > -rw-r--r-- 1 cass cass 4.3M Mar 13 18:43 TestCF1-hc-6350-Data.db > -rw-r--r-- 1 cass cass 93K Mar 13 18:43 TestCF1-hc-6350-Filter.db > -rw-r--r-- 1 cass cass 2.3M Mar 13 18:43 TestCF1-hc-6350-Index.db > -rw-r--r-- 1 cass cass 4.3K Mar 13 18:43 TestCF1-hc-6350-Statistics.db > -rw-r--r-- 1 cass cass 400 Mar 13 18:43 TestCF1-old.json > > > > Some DB-files ordered by size for testnode1: > No compressed files - but has the original Size-tiered files - as well as > 5MB Leveled compaction-files - but no 64 MB once. > > total 83G > -rw-r--r-- 1 cass cass 33G Mar 13 07:14 TestCF1-hc-33504-Data.db > -rw-r--r-- 1 cass cass 11G Mar 13 07:14 TestCF1-hc-33504-Index.db > -rw-r--r-- 1 cass cass 407M Mar 13 07:14 TestCF1-hc-33504-Filter.db > -rw-r--r-- 1 cass cass 5.1M Mar 13 05:27 TestCF1-hc-33338-Data.db > -rw-r--r-- 1 cass cass 5.1M Mar 13 08:54 TestCF1-hc-38997-Data.db > -rw-r--r-- 1 cass cass 5.1M Mar 13 07:15 TestCF1-hc-33513-Data.db > > > > -- > > *Johan Elmerfjord* | Sr. Systems Administration/Mgr, EMEA | Adobe > Systems, Product Technical Operations | p. +45 3231 6008 | x86008 | cell. +46 > 735 101 444 | Jelmerfj@adobe.com > > --0015174781fe7842e504bb4fc488 Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Heya

I'd suggest staying away from Leveled Compaction until 1.0.= 9.
For the why see this great explanation I got from Maki Watanabe on th= e list: http://mail-archives.apache.org/mod_mbox/cassandra-user/2012= 03.mbox/%3CCALqbeQbQ=3Dd-hORVhA-LHOo_a5j46fQrsZMm+OQgfkgR=3D4RRQJQ@mail.gma= il.com%3E
Keep an eye on that one because I'm busy testing one of his suggestions= , I'll post back with the results soon.

My understanding is afte= r a change in compaction or compression, until you run an upgradesstables o= n all the nodes the current sstables will have the old schema settings, onl= y new ones get the new format. Obviously this compounds the issue I mention= ed above tho.
Be warned, an upgradesstables can take a long time so maybe keep an eye on = the number of files around vs over 5MB to get an idea of progress. Maybe so= meone else knows a better way?

You can change back and forth between= compression and compaction options quite safely, but again you need an upg= radesstables to remove it from current sstables.

In my experience I've safely applied compression and leveled compac= tion to the same CF at the same time without issue so I guess it's ok:)=

On Thu, Mar 15, 2012 at 10:05 PM, Johan = Elmerfjord <jelm= erfj@adobe.com> wrote:
=20 =20
Hi, I'm testing the community-version of Cassandra 1.0.8.
We are currently on 0.8.7 in our production-setup.

We have 3 Column Families that each takes between 20 and 35 GB on disk per = node. (8*2 nodes total)
We would like to change to Leveled Compaction - and even try compression as= well to reduce the space needed for compactions.
We are running on SSD-drives as latency is a key-issue.

As test I have imported one Column Family from 3 production-nodes to a 3 no= de test-cluster.
The data on the 3 nodes ranges from 19-33GB. (with at least one large SSTab= le (Tiered size - recently compacted)).

After loading this data to the 3 test-nodes, and running scrub and repair, = I took a backup of the data so I have good test-set of data to work on.
Then I changed changed to leveled compaction, using the cassandra-cli:

UPDATE COLUMN FAMILY TestCF1 WITH compaction_strategy=3DLeveledCompactionSt= rategy;
I could see the change being written to the logfile on all nodes.

Then I don't know for for sure if I need to run anything else to make t= he change happen - or if it's just to wait.
My test-cluster does not receive new data.

For this=A0 KS & CF and on each of the nodes I have tried some or sever= al of: upgradesstable, scrub, compact, cleanup and repair - each task takin= g between 40 minutes and 4 hours.
With the exception of compact that returns almost immediately with no visib= le compactions made.

On some node I ended up with over 30000 files with the default 5MB size for= leveled compaction, on another node it didn't look like anything has b= een done and I still have a 19GB SSTable.

I then made another change.
UPDATE COLUMN FAMILY TestCF1 WITH compaction_strategy=3DLeveledCompactionSt= rategy AND compaction_strategy_options=3D[{sstable_size_in_mb: 64}];
WARNING: [{}] strategy_options syntax is deprecated, please use {}
Which is probably wrong in the documentation - and should be:
UPDATE COLUMN FAMILY TestCF1 WITH compaction_strategy=3DLeveledCompactionSt= rategy AND compaction_strategy_options=3D{sstable_size_in_mb: 64};

I think that we will be able to find the data in 3 searches with a 64MB siz= e - and still only use around 700MB while doing compactions - and keep the = number of files ~3000 per CF.

A few days later it looks like I still have a mix between original huge SSt= ables, 5MB once - and some nodes has 64MB files as well.
Do I need to do something special to clean this up?
I have tried another scrub /upgradesstables/clean - but nothing seems to do= any change to me.

Finally I have also tried to enable compression:
UPDATE COLUMN FAMILY TestCF1 WITH compression_options=3D[{sstable_compressi= on:SnappyCompressor, chunk_length_kb:64}];
- which results in the same [{}] - warning.

As you can see below - this created CompressionInfo.db - files on some node= s - but not on all.

Is there a way I can force Teired sstables to be converted into Leveled = once - and then to compression as well?
Why are the original file (Tiered Sized SSTables still present on testno= de1 - when is it supposed to delete them?

Can I change back and forth between compression (on/off - or chunksizes)= - and between Leveled vs Size Tiered compaction?
Is there a way to see if the node is done - or waiting for something?
When is it safe to apply another setting - does it have to complete one = reorg before moving on to the next?

Any input or own experiences are warmly welcome.

Best regards, Johan


Some lines of example directory-listings below.:

Some files for testnode 3. (looks like it's still have the original Siz= e Tiered files around, and a mixture of compressed 64MB files - and 5MB fil= es?
total 19G
drwxr-xr-x 3 cass cass 4.0K Mar 13 17:11 snapshots
-rw-r--r-- 1 cass cass 6.0G Mar 13 18:42 TestCF1-hc-6346-Index.db
-rw-r--r-- 1 cass cass 1.3M Mar 13 18:42 TestCF1-hc-6346-Filter.db
-rw-r--r-- 1 cass cass=A0 13G Mar 13 18:42 TestCF1-hc-6346-Data.db
-rw-r--r-- 1 cass cass 2.4M Mar 13 18:42 TestCF1-hc-6346-CompressionInfo.db
-rw-r--r-- 1 cass cass 4.3K Mar 13 18:42 TestCF1-hc-6346-Statistics.db
-rw-r--r-- 1 cass cass 195K Mar 13 18:42 TestCF1-hc-6347-Filter.db
-rw-r--r-- 1 cass cass 4.9M Mar 13 18:42 TestCF1-hc-6347-Index.db
-rw-r--r-- 1 cass cass 9.0M Mar 13 18:42 TestCF1-hc-6347-Data.db
-rw-r--r-- 1 cass cass 4.3K Mar 13 18:42 TestCF1-hc-6347-Statistics.db
-rw-r--r-- 1 cass cass 2.0K Mar 13 18:42 TestCF1-hc-6347-CompressionInfo.db
-rw-r--r-- 1 cass cass=A0 11K Mar 13 18:43 TestCF1-hc-6351-CompressionInfo.=
db
-rw-r--r-- 1 cass cass=A0 52M Mar 13 18:43 TestCF1-hc-6351-Data.db
-rw-r--r-- 1 cass cass 1.1M Mar 13 18:43 TestCF1-hc-6351-Filter.db
-rw-r--r-- 1 cass cass=A0 28M Mar 13 18:43 TestCF1-hc-6351-Index.db
-rw-r--r-- 1 cass cass 4.3K Mar 13 18:43 TestCF1-hc-6351-Statistics.db
-rw-r--r-- 1 cass cass=A0 401 Mar 13 18:43 TestCF1.json
-rw-r--r-- 1 cass cass=A0 950 Mar 13 18:43 TestCF1-hc-6350-CompressionInfo.=
db
-rw-r--r-- 1 cass cass 4.3M Mar 13 18:43 TestCF1-hc-6350-Data.db
-rw-r--r-- 1 cass cass=A0 93K Mar 13 18:43 TestCF1-hc-6350-Filter.db
-rw-r--r-- 1 cass cass 2.3M Mar 13 18:43 TestCF1-hc-6350-Index.db
-rw-r--r-- 1 cass cass 4.3K Mar 13 18:43 TestCF1-hc-6350-Statistics.db
-rw-r--r-- 1 cass cass=A0 400 Mar 13 18:43 TestCF1-old.json


Some DB-files ordered by size for testnode1:
No compressed files - but has the original Size-tiered files - as well as 5= MB Leveled compaction-files - but no 64 MB once.
total 83G
-rw-r--r-- 1 cass cass=A0=A0 33G Mar 13 07:14 TestCF1-hc-33504-Data.db
-rw-r--r-- 1 cass cass=A0=A0 11G Mar 13 07:14 TestCF1-hc-33504-Index.db
-rw-r--r-- 1 cass cass=A0 407M Mar 13 07:14 TestCF1-hc-33504-Filter.db
-rw-r--r-- 1 cass cass=A0 5.1M Mar 13 05:27 TestCF1-hc-33338-Data.db
-rw-r--r-- 1 cass cass=A0 5.1M Mar 13 08:54 TestCF1-hc-38997-Data.db
-rw-r--r-- 1 cass cass=A0 5.1M Mar 13 07:15 TestCF1-hc-33513-Data.db


--
=A0
Johan Elmerfjord | Sr. Systems Adminis= tration/Mgr, EMEA | Adobe Systems, Product Technical Operations | p. +45 3= 231 6008 | x86008 | cell. +46 735 101 444 | Jelmerfj@adobe.com


--0015174781fe7842e504bb4fc488--