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 63E62EC99 for ; Fri, 7 Dec 2012 13:15:52 +0000 (UTC) Received: (qmail 11160 invoked by uid 500); 7 Dec 2012 13:15:49 -0000 Delivered-To: apmail-cassandra-user-archive@cassandra.apache.org Received: (qmail 10011 invoked by uid 500); 7 Dec 2012 13:15:43 -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 9980 invoked by uid 99); 7 Dec 2012 13:15:42 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 07 Dec 2012 13:15:42 +0000 X-ASF-Spam-Status: No, hits=-2.8 required=5.0 tests=HTML_MESSAGE,RCVD_IN_DNSWL_HI,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (nike.apache.org: local policy) Received: from [134.134.136.24] (HELO mga09.intel.com) (134.134.136.24) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 07 Dec 2012 13:15:30 +0000 Received: from orsmga002.jf.intel.com ([10.7.209.21]) by orsmga102.jf.intel.com with ESMTP; 07 Dec 2012 05:14:19 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="4.84,237,1355126400"; d="scan'208,217";a="253573783" Received: from fmsmsx106.amr.corp.intel.com ([10.19.9.37]) by orsmga002.jf.intel.com with ESMTP; 07 Dec 2012 05:15:04 -0800 Received: from FMSMSX109.amr.corp.intel.com (10.19.9.28) by FMSMSX106.amr.corp.intel.com (10.19.9.37) with Microsoft SMTP Server (TLS) id 14.1.355.2; Fri, 7 Dec 2012 05:15:04 -0800 Received: from fmsmsx101.amr.corp.intel.com ([169.254.1.247]) by fmsmsx109.amr.corp.intel.com ([169.254.11.8]) with mapi id 14.01.0355.002; Fri, 7 Dec 2012 05:15:04 -0800 From: "Poziombka, Wade L" To: "user@cassandra.apache.org" Subject: RE: Freeing up disk space on Cassandra 1.1.5 with Size-Tiered compaction. Thread-Topic: Freeing up disk space on Cassandra 1.1.5 with Size-Tiered compaction. Thread-Index: AQHN0vaJphMaevv4o0K06ASBDuuJMJgLoh6AgAA5+JCAAJO2AIAAyk8AgAAZX6A= Date: Fri, 7 Dec 2012 13:15:04 +0000 Message-ID: References: <584110EF-2349-4785-91CA-25BF9EE21C1E@thelastpickle.com> In-Reply-To: <584110EF-2349-4785-91CA-25BF9EE21C1E@thelastpickle.com> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-originating-ip: [10.1.200.107] Content-Type: multipart/alternative; boundary="_000_BEF40F3557A6B24CB87D1F17775EA4FD2ACCACB9FMSMSX101amrcor_" MIME-Version: 1.0 X-Virus-Checked: Checked by ClamAV on apache.org --_000_BEF40F3557A6B24CB87D1F17775EA4FD2ACCACB9FMSMSX101amrcor_ Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable So if my calculations are correct a terabyte sized database would require a= minimum of 15 nodes (RF =3D 3). That sound about right? 2000 / 400 * RF From: aaron morton [mailto:aaron@thelastpickle.com] Sent: Thursday, December 06, 2012 9:43 PM To: user@cassandra.apache.org Subject: Re: Freeing up disk space on Cassandra 1.1.5 with Size-Tiered comp= action. Meaning terabyte size databases. Lots of people have TB sized systems. Just add more nodes. 300 to 400 Gb is just a rough guideline. The bigger picture is considering = how routine and non routine maintenance tasks are going to be carried out. Cheers ----------------- Aaron Morton Freelance Cassandra Developer New Zealand @aaronmorton http://www.thelastpickle.com On 7/12/2012, at 4:38 AM, Edward Capriolo > wrote: http://wiki.apache.org/cassandra/LargeDataSetConsiderations On Thu, Dec 6, 2012 at 9:53 AM, Poziombka, Wade L > wrote: "Having so much data on each node is a potential bad day." Is this discussed somewhere on the Cassandra documentation (limits, practic= es etc)? We are also trying to load up quite a lot of data and have hit me= mory issues (bloom filter etc.) in 1.0.10. I would like to read up on big = data usage of Cassandra. Meaning terabyte size databases. I do get your point about the amount of time required to recover downed nod= e. But this 300-400MB business is interesting to me. Thanks in advance. Wade From: aaron morton [mailto:aaron@thelastpickle.com] Sent: Wednesday, December 05, 2012 9:23 PM To: user@cassandra.apache.org Subject: Re: Freeing up disk space on Cassandra 1.1.5 with Size-Tiered comp= action. Basically we were successful on two of the nodes. They both took ~2 days an= d 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 expect= ed! I would recommend having up to 300MB to 400MB per node on a regular HDD wit= h 1GB networking. But on the 3rd node, we suspect major compaction didn't actually finish it'= s job... The file list looks odd. Check the time stamps, on the files. You should no= t have files older than when compaction started. 8GB heap The default is 4GB max now days. 1) Do you expect problems with the 3rd node during 2 weeks more of operatio= ns, in the conditions seen below? I cannot answer that. 2) Should we restart with leveled compaction next year? I would run some tests to see how it works for you workload. 4) Should we consider increasing the cluster capacity? IMHO yes. You may also want to do some experiments with turing compression on if it n= ot already enabled. Having so much data on each node is a potential bad day. If instead you had= to move or repair one of those nodes how long would it take for cassandra = to stream all the data over ? (Or to rsync the data over.) How long does it= take to run nodetool repair on the node ? With RF 3, if you lose a node you have lost your redundancy. It's important= to have a plan about how to get it back and how long it may take. Hope that helps. ----------------- Aaron Morton Freelance Cassandra Developer New Zealand @aaronmorton http://www.thelastpickle.com On 6/12/2012, at 3:40 AM, Alexandru Sicoe > wrote: 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 an= d 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 expect= ed! 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 on= ly about 36GB were freed up (almost the same size as before). Saw nothing i= n the server log (debug not enabled). Below I pasted some more details abou= t file sizes before and after compaction on this third node and disk occupa= ncy. 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 comple= tely delete all the data in the cluster and start fresh with TTLs for 1 mon= th (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 operatio= ns, in the conditions seen below? [Note: we expect the minor compactions to continue building up files but ne= ver really getting to compacting the large file and thus not needing much t= emporarily 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 =3D> to free up space with Size= Tiered 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 s= ee 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 a= lso do a major compaction or are they completely separate operations? [Note: we have 3 nodes with RF=3D2 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 th= e hundreds of millions of rows on a node mentioned by Aaron which are the v= olumes 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 fold= er 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 Effe= ctive-Ownership Token = 113427455640312821154458202477256070484 10.146.44.17 datacenter1 rack1 Up Normal 1.37 TB 66.6= 7% 0 10.146.44.18 datacenter1 rack1 Up Normal 1.04 TB 66.6= 7% 56713727820156410577229101238628035242 10.146.44.32 datacenter1 rack1 Up Normal 1.14 TB 66.6= 7% 113427455640312821154458202477256070484 nodetool -h $HOSTNAME ring (after major compaction) (Note we were inserting= data in the meantime) Address DC Rack Status State Load Effe= ctive-Ownership Token = 113427455640312821154458202477256070484 10.146.44.17 datacenter1 rack1 Up Normal 1.38 TB 66.6= 7% 0 10.146.44.18 datacenter1 rack1 Up Normal 1.08 TB 66.6= 7% 56713727820156410577229101238628035242 10.146.44.32 datacenter1 rack1 Up Normal 1.19 TB 66.6= 7% 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 sur= e why, but I think that performance will go down due to the size of indexe= s and bloom filters (I may be wrong on the reasons but I'm quite sure you c= an't store too much data per node). If you have many hundreds of millions of rows on a node the memory needed f= or bloom filters and index sampling can be significant. These can both be t= uned. 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 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 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. Once yo= u are stable again then look at LDB http://www.datastax.com/dev/blog/when-t= o-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 p= er 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 w= hat I know having too much data on one node is bad, not really sure why, bu= t I think that performance will go down due to the size of indexes and blo= om filters (I may be wrong on the reasons but I'm quite sure you can't stor= e 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 th= e 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 doesn't matt= er to you. > > With RF=3D2 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 happen= s is that due to the size of the size of the sstable that remains after you= r major compaction, it will never be compacted with the upcoming new sstabl= es, and because of that, your read performance will go down until you run a= n other major compaction. > > "2. Switch to Leveled compaction strategy. > - It is mentioned to help with deletes and disk space usage. Can so= meone confirm?" > > From what I know, Leveled compaction will not free disk space. It will al= low you to use a greater percentage of your total disk space (50% max for s= ized 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 an= d you may use them depending on the model of each of your CF. > > see: http://www.datastax.com/docs/1.1/operations/tuning#configure-compres= sion > > Alain > > 2012/11/22 Alexandru Sicoe > > We are running a 3 node Cassandra 1.1.5 cluster with a 3TB Raid 0 disk pe= r node for the data dir and separate disk for the commitlog, 12 cores, 24 G= B RAM (12GB to Cassandra heap). > --_000_BEF40F3557A6B24CB87D1F17775EA4FD2ACCACB9FMSMSX101amrcor_ Content-Type: text/html; charset="us-ascii" Content-Transfer-Encoding: quoted-printable

So if my calculations are= correct a terabyte sized database would require a minimum of 15 nodes (RF = =3D 3).  That sound about right?

 <= /p>

2000 / 400 * RF

 <= /p>

From: aaron mo= rton [mailto:aaron@thelastpickle.com]
Sent: Thursday, December 06, 2012 9:43 PM
To: user@cassandra.apache.org
Subject: Re: Freeing up disk space on Cassandra 1.1.5 with Size-Tier= ed compaction.

 

Meaning terabyte size databases. 

Lots of people have TB sized systems. Just add more = nodes. 

300 to 400 Gb is just a rough guideline. The bigger = picture is considering how routine and non routine maintenance tasks are go= ing to be carried out. 

 

Cheers

  

-----------------

Aaron Morton

Freelance Cassandra Devel= oper

New Zealand

 <= /p>

@aaronmorton

 

On 7/12/2012, at 4:38 AM, Edward Capriolo <edlinuxguru@gmail.com> wrote:



http://wiki.apache.org/c= assandra/LargeDataSetConsiderations

On Thu, Dec 6, 2012 at 9:53 AM, Poziombka, Wade L &l= t;wade.l.po= ziombka@intel.com> wrote:

Having so much data on ea= ch node is a potential bad day.”

 

Is this discussed somewhere on the Cassandra documentation (limits= , practices etc)?  We are also trying to load up quite a lot of data a= nd have hit memory issues (bloom filter etc.) in 1.0.10.  I would like to read up on big data usage of Cassandra.&n= bsp; Meaning terabyte size databases. 

 

I do get your point about the amount of time required to recover d= owned node. But this 300-400MB business is interesting to me.

 

Thanks in advance.

 

Wade

 

From: aaron morton [mailto:<= a href=3D"mailto:aaron@thelastpickle.com" target=3D"_blank">aaron@thelastpi= ckle.com]
Sent: Wednesday, December 05, 2012 9:23 PM
To: u= ser@cassandra.apache.org
Subject: Re: Freeing up disk space on Cassandra 1.1.5 with Size-Tier= ed compaction.

 

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!

I would recommend having up to 300MB to 400MB per node on a regula= r HDD with 1GB networking. 

 

But on the 3rd node, we suspect major compaction didn't actually f= inish it's job…

The file list looks odd. Check the time stamps, on the files. You = should not have files older than when compaction started. <= /p>

 

8GB heap 

The default is 4GB max now days. 

 

1) Do you expect problems with the 3rd node during 2 weeks more of= operations, in the conditions seen below? 

I cannot answer that. 

 

2) Should we restart with leveled compaction next year? =

I would run some tests to see how it works for you workload. =

 

4) Should we consider increasing the cluster capacity?<= /p>

IMHO yes.

You may also want to do some experiments with turing compression o= n if it not already enabled. 

 

Having so much data on each node is a potential bad day. If instea= d you had to move or repair one of those nodes how long would it take for c= assandra to stream all the data over ? (Or to rsync the data over.) How long does it take to run nodetool repai= r on the node ?

 

With RF 3, if you lose a node you have lost your redundancy. It's = important to have a plan about how to get it back and how long it may take.=   

 

Hope that helps. 

 

-----------------

Aaron Morton

Freelance Cassandra Developer

New Zealand

 

@aaronmorton

 

On 6/12/2012, at 3:40 AM, Alexandru Sicoe <adsicoe@gmail.com> wrote:

 

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 an= d 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 expect= ed!

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 on= ly 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 compa= ction 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 comple= tely delete all the data in the cluster and start fresh with TTLs for 1 mon= th (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 operatio= ns, in the conditions seen below?
[Note: we expect the minor compactions to continue building up files but ne= ver really getting to compacting the large file and thus not needing much t= emporarily 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 =3D> to free up space with S= izeTiered we will have no choice but run major compactions which we don't k= now 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 compac= tions? (we left all config parameters as default). Would increasing compact= ions throughput interfere with writes and reads? What about multi-threaded = compactions?

    - Do we still need to run regular repair operations as w= ell? Do these also do a major compaction or are they completely separate op= erations?

[Note: we have 3 nodes with RF=3D2 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 th= e hundreds of millions of rows on a node mentioned by Aaron which are the v= olumes 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-24= 370-Data.db
376G    /data_bst/cassandra/data/ATLAS/Data/ATLAS-Data-he-46= 431-Data.db
305G    /data_bst/cassandra/data/ATLAS/Data/ATLAS-Data-he-68= 959-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-80= 370-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-84= 015-Data.db
4.9G    /data_bst/cassandra/data/ATLAS/Data/ATLAS-Data-he-84= 356-Data.db
4.9G    /data_bst/cassandra/data/ATLAS/Data/ATLAS-Data-he-84= 696-Data.db
333M    /data_bst/cassandra/data/ATLAS/Data/ATLAS-Data-he-84= 707-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-h= e-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-24= 370-Data.db
910G    /data_bst/cassandra/data/ATLAS/Data/ATLAS-Data-he-84= 723-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-87= 923-Data.db
4.8G    /data_bst/cassandra/data/ATLAS/Data/ATLAS-Data-he-88= 261-Data.db
338M    /data_bst/cassandra/data/ATLAS/Data/ATLAS-Data-he-88= 271-Data.db
339M    /data_bst/cassandra/data/ATLAS/Data/ATLAS-Data-he-88= 292-Data.db
339M    /data_bst/cassandra/data/ATLAS/Data/ATLAS-Data-he-88= 312-Data.db
98M 


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

df /data_bst
Filesystem           1K-b= locks      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     &nb= sp;  Status State   Load      =       Effective-Ownership Token   &= nbsp;           &nbs= p;            &= nbsp;         
            &nb= sp;            =             &nb= sp;            =             &nb= sp;            =             &nb= sp;   113427455640312821154458202477256070484   &n= bsp;
10.146.44.17    datacenter1 rack1    &nb= sp;  Up     Normal  1.37 TB   =       66.67%      &n= bsp;       0     &nb= sp;            =             &nb= sp;           
10.146.44.18    datacenter1 rack1    &nb= sp;  Up     Normal  1.04 TB   =       66.67%      &n= bsp;       5671372782015641057722910123862803= 5242     
10.146.44.32    datacenter1 rack1    &nb= sp;  Up     Normal  1.14 TB   =       66.67%      &n= bsp;       1134274556403128211544582024772560= 70484

nodetool -h $HOSTNAME ring (after major compaction) (Note we were inserting= data in the meantime)
Address         DC   = ;       Rack     &nb= sp;  Status State   Load      =       Effective-Ownership Token   &= nbsp;           &nbs= p;            &= nbsp;         
            &nb= sp;            =             &nb= sp;            =             &nb= sp;            =             &nb= sp;   113427455640312821154458202477256070484   &n= bsp;
10.146.44.17    datacenter1 rack1    &nb= sp;  Up     Normal  1.38 TB   =       66.67%      &n= bsp;       0     &nb= sp;            =             &nb= sp;           
10.146.44.18    datacenter1 rack1    &nb= sp;  Up     Normal  1.08 TB   =       66.67%      &n= bsp;       5671372782015641057722910123862803= 5242     
10.146.44.32    datacenter1 rack1    &nb= sp;  Up     Normal  1.19 TB   =       66.67%      &n= bsp;       1134274556403128211544582024772560= 70484

 

On Fri, Nov 23, 2012 at 2:16 AM, aaron morton <aaron@thelastpickle.com>= ; wrote:

>  From what I know having too much data on one node is ba= d, 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 p= er 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 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 s= ystem.

> - 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 dele= te.

> - 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 often. There are ways to resolve th= is, 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 yo= u 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.thel= astpickle.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  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) 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  does= n'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). >      - This is not recommended:
>             - Stops minor compactions. >             - Major performance hit on n= ode (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 run an other major compaction.
>
> "2. Switch to Leveled compaction strategy.
>       - It is mentioned to help with deletes and disk s= pace 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 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/operations/tuning#configure-compression
>
> Alain
>
> 2012/11/22 Alexandru Sicoe <
adsicoe@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).
>

 

 

 

 

--_000_BEF40F3557A6B24CB87D1F17775EA4FD2ACCACB9FMSMSX101amrcor_--