From user-return-30473-apmail-cassandra-user-archive=cassandra.apache.org@cassandra.apache.org Wed Dec 5 14:40:57 2012 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 1A818E85C for ; Wed, 5 Dec 2012 14:40:57 +0000 (UTC) Received: (qmail 16647 invoked by uid 500); 5 Dec 2012 14:40:54 -0000 Delivered-To: apmail-cassandra-user-archive@cassandra.apache.org Received: (qmail 16044 invoked by uid 500); 5 Dec 2012 14:40:48 -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 16014 invoked by uid 99); 5 Dec 2012 14:40:47 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 05 Dec 2012 14:40:47 +0000 X-ASF-Spam-Status: No, hits=1.5 required=5.0 tests=HTML_MESSAGE,RCVD_IN_DNSWL_LOW,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (athena.apache.org: domain of adsicoe@gmail.com designates 209.85.223.172 as permitted sender) Received: from [209.85.223.172] (HELO mail-ie0-f172.google.com) (209.85.223.172) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 05 Dec 2012 14:40:43 +0000 Received: by mail-ie0-f172.google.com with SMTP id c13so8897242ieb.31 for ; Wed, 05 Dec 2012 06:40:22 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :content-type; bh=cP/rxk77dH5bHsnFz1bZ7jWAnX4y7bMDGJmXJYRaAmo=; b=RuDtFw12m62ABwj4XhwTal6bGmKFamfhN/8oXxARlu/tfDv9pVW79kLOgcKI2srOLr pOgoVDp++bWn5NJCWG5l+VHdvsUib9vGQi3PRihLNEtNqw9QGGIyYeoD7wri/6y0+6ft LsZvaiXoU3GWCyVwcdDFe9qwP23PcBnwm9slxI4TwDoyRj6lj9bIZbqgqAGXcE9DKatL VXJ8DuDdCqHmFkOxnUX2kNClnAzCjF+Z5lheliZrW8LE7cWKWF66X2U4FhYhJ6Jf3wYM KN6D2M1pYTloOYGDgTKalpJcdBvndKCKnKaKGXXoE5DF1Nimet+jHLWQYTRXvqv0XLXi MONg== MIME-Version: 1.0 Received: by 10.42.180.65 with SMTP id bt1mr14595292icb.41.1354718422426; Wed, 05 Dec 2012 06:40:22 -0800 (PST) Received: by 10.64.29.134 with HTTP; Wed, 5 Dec 2012 06:40:22 -0800 (PST) In-Reply-To: References: Date: Wed, 5 Dec 2012 15:40:22 +0100 Message-ID: Subject: Re: Freeing up disk space on Cassandra 1.1.5 with Size-Tiered compaction. From: Alexandru Sicoe To: user@cassandra.apache.org Content-Type: multipart/alternative; boundary=90e6ba6e81d856e5a204d01bf67e X-Virus-Checked: Checked by ClamAV on apache.org --90e6ba6e81d856e5a204d01bf67e Content-Type: text/plain; charset=ISO-8859-1 Hi guys, Sorry for the late follow-up but I waited to run major compactions on all 3 nodes at a time before replying with my findings. Basically we were successful on two of the nodes. They both took ~2 days and 11 hours to complete and at the end we saw one very large file ~900GB and the rest much smaller (the overall size decreased). This is what we expected! But on the 3rd node, we suspect major compaction didn't actually finish it's job. First of all nodetool compact returned much earlier than the rest - after one day and 15 hrs. Secondly from the 1.4TBs initially on the node only about 36GB were freed up (almost the same size as before). Saw nothing in the server log (debug not enabled). Below I pasted some more details about file sizes before and after compaction on this third node and disk occupancy. The situation is maybe not so dramatic for us because in less than 2 weeks we will have a down time till after the new year. During this we can completely delete all the data in the cluster and start fresh with TTLs for 1 month (as suggested by Aaron and 8GB heap as suggested by Alain - thanks). Questions: 1) Do you expect problems with the 3rd node during 2 weeks more of operations, in the conditions seen below? [Note: we expect the minor compactions to continue building up files but never really getting to compacting the large file and thus not needing much temporarily extra disk space]. 2) Should we restart with leveled compaction next year? [Note: Aaron was right, we have 1 week rows which get deleted after 1 month which means older rows end up in big files => to free up space with SizeTiered we will have no choice but run major compactions which we don't know if they will work provided that we get at ~1TB / node / 1 month. You can see we are at the limit!] 3) In case we keep SizeTiered: - How can we improve the performance of our major compactions? (we left all config parameters as default). Would increasing compactions throughput interfere with writes and reads? What about multi-threaded compactions? - Do we still need to run regular repair operations as well? Do these also do a major compaction or are they completely separate operations? [Note: we have 3 nodes with RF=2 and inserting at consistency level 1 and reading at consistency level ALL. We read primarily for exporting reasons - we export 1 week worth of data at a time]. 4) Should we consider increasing the cluster capacity? [We generate ~5million new rows every week which shouldn't come close to the hundreds of millions of rows on a node mentioned by Aaron which are the volumes that would create problems with bloom filters and indexes]. Cheers, Alex ------------------ The situation in the data folder before calling nodetool comapact: du -csh /data_bst/cassandra/data/ATLAS/Data/*-Data.db 444G /data_bst/cassandra/data/ATLAS/Data/ATLAS-Data-he-24370-Data.db 376G /data_bst/cassandra/data/ATLAS/Data/ATLAS-Data-he-46431-Data.db 305G /data_bst/cassandra/data/ATLAS/Data/ATLAS-Data-he-68959-Data.db 39G /data_bst/cassandra/data/ATLAS/Data/ATLAS-Data-he-7352-Data.db 78G /data_bst/cassandra/data/ATLAS/Data/ATLAS-Data-he-74076-Data.db 81G /data_bst/cassandra/data/ATLAS/Data/ATLAS-Data-he-79663-Data.db 205M /data_bst/cassandra/data/ATLAS/Data/ATLAS-Data-he-80370-Data.db 20G /data_bst/cassandra/data/ATLAS/Data/ATLAS-Data-he-80968-Data.db 20G /data_bst/cassandra/data/ATLAS/Data/ATLAS-Data-he-82330-Data.db 20G /data_bst/cassandra/data/ATLAS/Data/ATLAS-Data-he-83710-Data.db 4.9G /data_bst/cassandra/data/ATLAS/Data/ATLAS-Data-he-84015-Data.db 4.9G /data_bst/cassandra/data/ATLAS/Data/ATLAS-Data-he-84356-Data.db 4.9G /data_bst/cassandra/data/ATLAS/Data/ATLAS-Data-he-84696-Data.db 333M /data_bst/cassandra/data/ATLAS/Data/ATLAS-Data-he-84707-Data.db 92M /data_bst/cassandra/data/ATLAS/Data/ATLAS-Data-he-84712-Data.db 92M /data_bst/cassandra/data/ATLAS/Data/ATLAS-Data-he-84717-Data.db 99M /data_bst/cassandra/data/ATLAS/Data/ATLAS-Data-he-84722-Data.db 2.5G /data_bst/cassandra/data/ATLAS/Data/ATLAS-Data-tmp-he-84723-Data.db 1.4T total after nodetool comapact returned: du -csh /data_bst/cassandra/data/ATLAS/Data/*-Data.db 444G /data_bst/cassandra/data/ATLAS/Data/ATLAS-Data-he-24370-Data.db 910G /data_bst/cassandra/data/ATLAS/Data/ATLAS-Data-he-84723-Data.db 19G /data_bst/cassandra/data/ATLAS/Data/ATLAS-Data-he-86229-Data.db 19G /data_bst/cassandra/data/ATLAS/Data/ATLAS-Data-he-87639-Data.db 5.0G /data_bst/cassandra/data/ATLAS/Data/ATLAS-Data-he-87923-Data.db 4.8G /data_bst/cassandra/data/ATLAS/Data/ATLAS-Data-he-88261-Data.db 338M /data_bst/cassandra/data/ATLAS/Data/ATLAS-Data-he-88271-Data.db 339M /data_bst/cassandra/data/ATLAS/Data/ATLAS-Data-he-88292-Data.db 339M /data_bst/cassandra/data/ATLAS/Data/ATLAS-Data-he-88312-Data.db 98M Looking at the disk occupancy for the logical partition where the data folder is in: df /data_bst Filesystem 1K-blocks Used Available Use% Mounted on /dev/sdb1 2927242720 1482502260 1444740460 51% /data_bst and the situation in the cluster nodetool -h $HOSTNAME ring (before major compaction) Address DC Rack Status State Load Effective-Ownership Token 113427455640312821154458202477256070484 10.146.44.17 datacenter1 rack1 Up Normal 1.37 TB 66.67% 0 10.146.44.18 datacenter1 rack1 Up Normal 1.04 TB 66.67% 56713727820156410577229101238628035242 10.146.44.32 datacenter1 rack1 Up Normal 1.14 TB 66.67% 113427455640312821154458202477256070484 nodetool -h $HOSTNAME ring (after major compaction) (Note we were inserting data in the meantime) Address DC Rack Status State Load Effective-Ownership Token 113427455640312821154458202477256070484 10.146.44.17 datacenter1 rack1 Up Normal 1.38 TB 66.67% 0 10.146.44.18 datacenter1 rack1 Up Normal 1.08 TB 66.67% 56713727820156410577229101238628035242 10.146.44.32 datacenter1 rack1 Up Normal 1.19 TB 66.67% 113427455640312821154458202477256070484 On Fri, Nov 23, 2012 at 2:16 AM, aaron morton wrote: > > From what I know having too much data on one node is bad, not really > sure why, but I think that performance will go down due to the size of > indexes and bloom filters (I may be wrong on the reasons but I'm quite sure > you can't store too much data per node). > If you have many hundreds of millions of rows on a node the memory needed > for bloom filters and index sampling can be significant. These can both be > tuned. > > If you have 1.1T per node the time to do a compaction, repair or upgrade > may be very significant. Also the time taken to copy this data should you > need to remove or replace a node may be prohibitive. > > > 2. Switch to Leveled compaction strategy. > I would avoid making a change like that on an unstable / at risk system. > > > - Our usage pattern is write once, read once (export) and delete once! > > The column TTL may be of use to you, it removes the need to do a delete. > > > - We were thinking of relying on the automatic minor compactions to free > up space for us but as.. > There are some usage patterns which make life harder for STS. For example > if you have very long lived rows that are written to and deleted a lot. Row > fragments that have been around for a while will end up in bigger files, > and these files get compacted less often. > > In this situation, if you are running low on disk space and you think > there is a lot of deleted data in there, I would run a major compaction. A > word or warning though, if do this you will need to continue to do it > regularly. Major compaction creates a single big file, that will not get > compaction often. There are ways to resolve this, and moving to LDB may > help in the future. > > If you are stuck and worried about disk space it's what I would do. Once > you are stable again then look at LDB > http://www.datastax.com/dev/blog/when-to-use-leveled-compaction > > Cheers > > ----------------- > Aaron Morton > Freelance Cassandra Developer > New Zealand > > @aaronmorton > http://www.thelastpickle.com > > On 23/11/2012, at 9:18 AM, Alain RODRIGUEZ wrote: > > > Hi Alexandru, > > > > "We are running a 3 node Cassandra 1.1.5 cluster with a 3TB Raid 0 disk > per node for the data dir and separate disk for the commitlog, 12 cores, 24 > GB RAM" > > > > I think you should tune your architecture in a very different way. From > what I know having too much data on one node is bad, not really sure why, > but I think that performance will go down due to the size of indexes and > bloom filters (I may be wrong on the reasons but I'm quite sure you can't > store too much data per node). > > > > Anyway, I am 6 nodes with half of these resources (6 cores / 12GB) would > be better if you have the choice. > > > > "(12GB to Cassandra heap)." > > > > The max heap recommanded is 8GB because if you use more than these 8GB > the Gc jobs will start decreasing your performance. > > > > "We now have 1.1 TB worth of data per node (RF = 2)." > > > > You should use RF=3 unless one out of consistency or SPOF doesn't > matter to you. > > > > With RF=2 you are obliged to write at CL.one to remove the single point > of failure. > > > > "1. Start issuing regular major compactions (nodetool compact). > > - This is not recommended: > > - Stops minor compactions. > > - Major performance hit on node (very bad for us because > need to be taking data all the time)." > > > > Actually, major compaction *does not* stop minor compactions. What > happens is that due to the size of the size of the sstable that remains > after your major compaction, it will never be compacted with the upcoming > new sstables, and because of that, your read performance will go down until > you run an other major compaction. > > > > "2. Switch to Leveled compaction strategy. > > - It is mentioned to help with deletes and disk space usage. Can > someone confirm?" > > > > From what I know, Leveled compaction will not free disk space. It will > allow you to use a greater percentage of your total disk space (50% max for > sized tier compaction vs about 80% for leveled compaction) > > > > "Our usage pattern is write once, read once (export) and delete once! " > > > > In this case, I think that leveled compaction fits your needs. > > > > "Can anyone suggest which (if any) is better? Are there better > solutions?" > > > > Are your sstable compressed ? You have 2 types of built-in compression > and you may use them depending on the model of each of your CF. > > > > see: > http://www.datastax.com/docs/1.1/operations/tuning#configure-compression > > > > Alain > > > > 2012/11/22 Alexandru Sicoe > > We are running a 3 node Cassandra 1.1.5 cluster with a 3TB Raid 0 disk > per node for the data dir and separate disk for the commitlog, 12 cores, 24 > GB RAM (12GB to Cassandra heap). > > > > --90e6ba6e81d856e5a204d01bf67e Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Hi guys,
Sorry for the late follow-up but I waited to run major compacti= ons on all 3 nodes at a time before replying with my findings.

Basic= ally we were successful on two of the nodes. They both took ~2 days and 11 = hours to complete and at the end we saw one very large file ~900GB and the = rest much smaller (the overall size decreased). This is what we expected!
But on the 3rd node, we suspect major compaction didn't actually fi= nish it's job. First of all nodetool compact returned much earlier than= the rest - after one day and 15 hrs. Secondly from the 1.4TBs initially on= the node only about 36GB were freed up (almost the same size as before). S= aw nothing in the server log (debug not enabled). Below I pasted some more = details about file sizes before and after compaction on this third node and= disk occupancy.

The situation is maybe not so dramatic for us because in less than 2 we= eks we will have a down time till after the new year. During this we can co= mpletely delete all the data in the cluster and start fresh with TTLs for 1= month (as suggested by Aaron and 8GB heap as suggested by Alain - thanks).=

Questions:

1) Do you expect problems with the 3rd node during 2 = weeks more of operations, in the conditions seen below?
[Note: we expec= t the minor compactions to continue building up files but never really gett= ing to compacting the large file and thus not needing much temporarily extr= a disk space].

2) Should we restart with leveled compaction next year?
[Note: Aaro= n was right, we have 1 week rows which get deleted after 1 month which mean= s older rows end up in big files =3D> to free up space with SizeTiered w= e will have no choice but run major compactions which we don't know if = they will work provided that we get at ~1TB / node / 1 month. You can see w= e are at the limit!]

3) In case we keep SizeTiered:

=A0=A0=A0 - How can we improve th= e performance of our major compactions? (we left all config parameters as d= efault). Would increasing compactions throughput interfere with writes and = reads? What about multi-threaded compactions?

=A0=A0=A0 - Do we still need to run regular repair operations as well? = Do these also do a major compaction or are they completely separate operati= ons?

[Note: we have 3 nodes with RF=3D2 and inserting at consistenc= y level 1 and reading at consistency level ALL. We read primarily for expor= ting reasons - we export 1 week worth of data at a time].

4) Should we consider increasing the cluster capacity?
[We generate = ~5million new rows every week which shouldn't come close to the hundred= s of millions of rows on a node mentioned by Aaron which are the volumes th= at would create problems with bloom filters and indexes].

Cheers,
Alex
------------------

The situation in the data = folder

=A0=A0=A0 before calling nodetool comapact:

du -csh /= data_bst/cassandra/data/ATLAS/Data/*-Data.db
444G=A0=A0=A0 /data_bst/cas= sandra/data/ATLAS/Data/ATLAS-Data-he-24370-Data.db
376G=A0=A0=A0 /data_bst/cassandra/data/ATLAS/Data/ATLAS-Data-he-46431-Data.= db
305G=A0=A0=A0 /data_bst/cassandra/data/ATLAS/Data/ATLAS-Data-he-68959= -Data.db
39G=A0=A0=A0=A0 /data_bst/cassandra/data/ATLAS/Data/ATLAS-Data-= he-7352-Data.db
78G=A0=A0=A0=A0 /data_bst/cassandra/data/ATLAS/Data/ATLAS-Data-he-74076-Dat= a.db
81G=A0=A0=A0=A0 /data_bst/cassandra/data/ATLAS/Data/ATLAS-Data-he-7= 9663-Data.db
205M=A0=A0=A0 /data_bst/cassandra/data/ATLAS/Data/ATLAS-Dat= a-he-80370-Data.db
20G=A0=A0=A0=A0 /data_bst/cassandra/data/ATLAS/Data/ATLAS-Data-he-80968-Dat= a.db
20G=A0=A0=A0=A0 /data_bst/cassandra/data/ATLAS/Data/ATLAS-Data-he-8= 2330-Data.db
20G=A0=A0=A0=A0 /data_bst/cassandra/data/ATLAS/Data/ATLAS-D= ata-he-83710-Data.db
4.9G=A0=A0=A0 /data_bst/cassandra/data/ATLAS/Data/ATLAS-Data-he-84015-Data.= db
4.9G=A0=A0=A0 /data_bst/cassandra/data/ATLAS/Data/ATLAS-Data-he-84356= -Data.db
4.9G=A0=A0=A0 /data_bst/cassandra/data/ATLAS/Data/ATLAS-Data-he= -84696-Data.db
333M=A0=A0=A0 /data_bst/cassandra/data/ATLAS/Data/ATLAS-Data-he-84707-Data.= db
92M=A0=A0=A0=A0 /data_bst/cassandra/data/ATLAS/Data/ATLAS-Data-he-847= 12-Data.db
92M=A0=A0=A0=A0 /data_bst/cassandra/data/ATLAS/Data/ATLAS-Dat= a-he-84717-Data.db
99M=A0=A0=A0=A0 /data_bst/cassandra/data/ATLAS/Data/ATLAS-Data-he-84722-Dat= a.db
2.5G=A0=A0=A0 /data_bst/cassandra/data/ATLAS/Data/ATLAS-Data-tmp-he= -84723-Data.db
1.4T=A0=A0=A0 total

=A0=A0=A0 after nodetool comap= act returned:

du -csh /data_bst/cassandra/data/ATLAS/Data/*-Data.db<= br> 444G=A0=A0=A0 /data_bst/cassandra/data/ATLAS/Data/ATLAS-Data-he-24370-Data.= db
910G=A0=A0=A0 /data_bst/cassandra/data/ATLAS/Data/ATLAS-Data-he-84723= -Data.db
19G=A0=A0=A0=A0 /data_bst/cassandra/data/ATLAS/Data/ATLAS-Data-= he-86229-Data.db
19G=A0=A0=A0=A0 /data_bst/cassandra/data/ATLAS/Data/ATLAS-Data-he-87639-Dat= a.db
5.0G=A0=A0=A0 /data_bst/cassandra/data/ATLAS/Data/ATLAS-Data-he-879= 23-Data.db
4.8G=A0=A0=A0 /data_bst/cassandra/data/ATLAS/Data/ATLAS-Data-= he-88261-Data.db
338M=A0=A0=A0 /data_bst/cassandra/data/ATLAS/Data/ATLAS-Data-he-88271-Data.= db
339M=A0=A0=A0 /data_bst/cassandra/data/ATLAS/Data/ATLAS-Data-he-88292= -Data.db
339M=A0=A0=A0 /data_bst/cassandra/data/ATLAS/Data/ATLAS-Data-he= -88312-Data.db
98M=A0


Looking at the disk occupancy for the logical partition = where the data folder is in:

df /data_bst
Filesystem=A0=A0=A0=A0= =A0=A0=A0=A0=A0=A0 1K-blocks=A0=A0=A0=A0=A0 Used Available Use% Mounted on<= br>/dev/sdb1=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0 2927242720 1482502260 1444740= 460=A0 51% /data_bst


and the situation in the cluster

nodetool -h $HOSTNAME ring = (before major compaction)
Address=A0=A0=A0=A0=A0=A0=A0=A0 DC=A0=A0=A0=A0= =A0=A0=A0=A0=A0 Rack=A0=A0=A0=A0=A0=A0=A0 Status State=A0=A0 Load=A0=A0=A0= =A0=A0=A0=A0=A0=A0=A0=A0 Effective-Ownership Token=A0=A0=A0=A0=A0=A0=A0=A0= =A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0= =A0=A0=A0=A0=A0
=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0= =A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0= =A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0= =A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0 11342745564031282115445820247= 7256070484=A0=A0=A0=A0
10.146.44.17=A0=A0=A0 datacenter1 rack1=A0=A0=A0= =A0=A0=A0 Up=A0=A0=A0=A0 Normal=A0 1.37 TB=A0=A0=A0=A0=A0=A0=A0=A0 66.67%= =A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0 0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0= =A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0= =A0=A0=A0=A0=A0=A0
10.146.44.18=A0=A0=A0 datacenter1 rack1=A0=A0=A0=A0=A0=A0 Up=A0=A0=A0=A0 No= rmal=A0 1.04 TB=A0=A0=A0=A0=A0=A0=A0=A0 66.67%=A0=A0=A0=A0=A0=A0=A0=A0=A0= =A0=A0=A0=A0 56713727820156410577229101238628035242=A0=A0=A0=A0=A0
10.1= 46.44.32=A0=A0=A0 datacenter1 rack1=A0=A0=A0=A0=A0=A0 Up=A0=A0=A0=A0 Normal= =A0 1.14 TB=A0=A0=A0=A0=A0=A0=A0=A0 66.67%=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0= =A0=A0 113427455640312821154458202477256070484

nodetool -h $HOSTNAME ring (after major compaction) (Note we were inser= ting data in the meantime)
Address=A0=A0=A0=A0=A0=A0=A0=A0 DC=A0=A0=A0= =A0=A0=A0=A0=A0=A0 Rack=A0=A0=A0=A0=A0=A0=A0 Status State=A0=A0 Load=A0=A0= =A0=A0=A0=A0=A0=A0=A0=A0=A0 Effective-Ownership Token=A0=A0=A0=A0=A0=A0=A0= =A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0= =A0=A0=A0=A0=A0=A0
=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0= =A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0= =A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0= =A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0 11342745564031282115445820247= 7256070484=A0=A0=A0=A0
10.146.44.17=A0=A0=A0 datacenter1 rack1=A0=A0=A0= =A0=A0=A0 Up=A0=A0=A0=A0 Normal=A0 1.38 TB=A0=A0=A0=A0=A0=A0=A0=A0 66.67%= =A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0 0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0= =A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0= =A0=A0=A0=A0=A0=A0
10.146.44.18=A0=A0=A0 datacenter1 rack1=A0=A0=A0=A0=A0=A0 Up=A0=A0=A0=A0 No= rmal=A0 1.08 TB=A0=A0=A0=A0=A0=A0=A0=A0 66.67%=A0=A0=A0=A0=A0=A0=A0=A0=A0= =A0=A0=A0=A0 56713727820156410577229101238628035242=A0=A0=A0=A0=A0
10.1= 46.44.32=A0=A0=A0 datacenter1 rack1=A0=A0=A0=A0=A0=A0 Up=A0=A0=A0=A0 Normal= =A0 1.19 TB=A0=A0=A0=A0=A0=A0=A0=A0 66.67%=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0= =A0=A0 113427455640312821154458202477256070484




On Fr= i, Nov 23, 2012 at 2:16 AM, aaron morton <aaron@thelastpickle.com> wrote:
> = =A0From what I know having too much data on one node is bad, not really sur= e why, but =A0I think that performance will go down due to the size of inde= xes and bloom filters (I may be wrong on the reasons but I'm quite sure= you can't store too much data per node).
If you have many hundreds of millions of rows on a node the memory ne= eded for bloom filters and index sampling can be significant. These can bot= h be tuned.

If you have 1.1T per node the time to do a compaction, repair or upgrade ma= y be very significant. Also the time taken to copy this data should you nee= d to remove or replace a node may be prohibitive.

> 2. Switch to Leveled compaction strategy.
I would avoid making a change like that on an unstable / at risk syst= em.

> - Our usage pattern is write once, read once (export) and delete once!=

=A0The column TTL may be of use to you, it removes the need to do a delete.=

> - We were thinking of relying on the automatic minor compactions to fr= ee up space for us but as..
There are some usage patterns which make life harder for STS. For example i= f you have very long lived rows that are written to and deleted a lot. Row = fragments that have been around for a while will end up in bigger files, an= d these files get compacted less often.

In this situation, if you are running low on disk space and you think there= is a lot of deleted data in there, I would run a major compaction. A word = or warning though, if do this you will need to continue to do it regularly.= Major compaction creates a single big file, that will not get compaction o= ften. There are ways to resolve this, and moving to LDB may help in the fut= ure.

If you are stuck and worried about disk space it's what I would do. Onc= e you are stable again then look at LDB
http://www.datas= tax.com/dev/blog/when-to-use-leveled-compaction

Cheers

-----------------
Aaron Morton
Freelance Cassandra Developer
New Zealand

@aaronmorton
http://www.thela= stpickle.com

On 23/11/2012, at 9:18 AM, Alain RODRIGUEZ <arodrime@gmail.com> wrote:

> Hi Alexandru,
>
> "We are running a 3 node Cassandra 1.1.5 cluster with a 3TB Raid = 0 disk per node for the data dir and separate disk for the commitlog, 12 co= res, 24 GB RAM"
>
> I think you should tune your architecture in a very different way. Fro= m what I know having too much data on one node is bad, not really sure why,= but =A0I think that performance will go down due to the size of indexes an= d bloom filters (I may be wrong on the reasons but I'm quite sure you c= an't store too much data per node).
>
> Anyway, I am 6 nodes with half of these resources (6 cores / 12GB) wou= ld be better if you have the choice.
>
> "(12GB to Cassandra heap)."
>
> The max heap recommanded is 8GB because if you use more than these 8GB= the Gc jobs will start decreasing your performance.
>
> "We now have 1.1 TB worth of data per node (RF =3D 2)."
>
> You should use RF=3D3 unless one out of consistency or SPOF =A0doesn&#= 39;t matter to you.
>
> With RF=3D2 you are obliged to write at CL.one to remove the single po= int of failure.
>
> "1. Start issuing regular major compactions (nodetool compact). > =A0 =A0 =A0- This is not recommended:
> =A0 =A0 =A0 =A0 =A0 =A0 - Stops minor compactions.
> =A0 =A0 =A0 =A0 =A0 =A0 - Major performance hit on node (very bad for = us because need to be taking data all the time)."
>
> Actually, major compaction *does not* stop minor compactions. What hap= pens is that due to the size of the size of the sstable that remains after = your major compaction, it will never be compacted with the upcoming new sst= ables, and because of that, your read performance will go down until you ru= n an other major compaction.
>
> "2. Switch to Leveled compaction strategy.
> =A0 =A0 =A0 - It is mentioned to help with deletes and disk space usag= e. Can someone confirm?"
>
> From what I know, Leveled compaction will not free disk space. It will= allow you to use a greater percentage of your total disk space (50% max fo= r sized tier compaction vs about 80% for leveled compaction)
>
> "Our usage pattern is write once, read once (export) and delete o= nce! "
>
> In this case, I think that leveled compaction fits your needs.
>
> "Can anyone suggest which (if any) is better? Are there better so= lutions?"
>
> Are your sstable compressed ? You have 2 types of built-in compression= and you may use them depending on the model of each of your CF.
>
> see: http://www.datastax.com/docs/1.1/oper= ations/tuning#configure-compression
>
> Alain
>
> 2012/11/22 Alexandru Sicoe <ad= sicoe@gmail.com>
> We are running a 3 node Cassandra 1.1.5 cluster with a 3TB Raid 0 disk= per node for the data dir and separate disk for the commitlog, 12 cores, 2= 4 GB RAM (12GB to Cassandra heap).
>


--90e6ba6e81d856e5a204d01bf67e--