You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@cassandra.apache.org by Thorsten von Eicken <tv...@rightscale.com> on 2012/01/28 08:48:15 UTC
how to delete data with level compaction
I'm using level compaction and I have about 200GB compressed in my
largest CFs. The disks are getting full. This is time-series data so I
want to drop data that is a couple of months old. It's pretty easy for
me to iterate through the relevant keys and delete the rows. But will
that do anything?
I currently have the majority of sstables at generation 4. Deleting rows
will initially just create a ton of tombstones. For them to actually
free up significant space they need to get promoted to gen 4 and cause a
compaction there, right? nodetool compact doesn't do anything with level
compaction, it seems. Am I doomed?
(Ok, I'll whip out my CC and order more disk ;-)
Thanks!
Thorsten
Re: how to delete data with level compaction
Posted by Peter Schuller <pe...@infidyne.com>.
> I'm at 80%, so not quite panic yet ;-)
>
> I'm wondering, in the steady state, how much of the space used will
> contain deleted data.
That depends entirely on your workload, including:
* How big the data that you are deleting is in relation to the size of
tombstones
* How long the average piece of data lives before being deleted
* How much other data never being deleted you have in relation to the
data that gets deleted
* How it varies over time and where you are in your "cycle"
I can't offer any mathematics that will give you the actual answered
for leveled compaction (and I don't have a good feel for it as I
haven't used leveled compaction in production systems yet). It's
strongly recommend graphing disk space for your particular
workload/application and see how it behaves over time. And *have
alerts* on disk space running out. Have a good amount of margin. Less
so with leveled compaction than size tiered compaction, but still
important.
--
/ Peter Schuller (@scode, http://worldmodscode.wordpress.com)
Re: how to delete data with level compaction
Posted by Thorsten von Eicken <tv...@rightscale.com>.
On 1/28/2012 9:34 AM, Peter Schuller wrote:
>> I'm using level compaction and I have about 200GB compressed in my
>> largest CFs. The disks are getting full. This is time-series data so I
>> want to drop data that is a couple of months old. It's pretty easy for
>> me to iterate through the relevant keys and delete the rows. But will
>> that do anything?
>> I currently have the majority of sstables at generation 4. Deleting rows
>> will initially just create a ton of tombstones. For them to actually
>> free up significant space they need to get promoted to gen 4 and cause a
>> compaction there, right? nodetool compact doesn't do anything with level
>> compaction, it seems. Am I doomed?
>> (Ok, I'll whip out my CC and order more disk ;-)
> There is a delay before you will see the effects of deletions in terms
> of disk space, yes. However, this is not normally a problem because
> you effectively reach a steady state of disk usage. It only becomes a
> problem if you're almost *entirely* full and are trying to delete data
> in a panic.
>
> How far away are you from entirely full? Are you just worried about
> the future or are you about to run out of disk space right now?
I'm at 80%, so not quite panic yet ;-)
I'm wondering, in the steady state, how much of the space used will
contain deleted data.
Thorsten
Re: how to delete data with level compaction
Posted by Peter Schuller <pe...@infidyne.com>.
> I'm using level compaction and I have about 200GB compressed in my
> largest CFs. The disks are getting full. This is time-series data so I
> want to drop data that is a couple of months old. It's pretty easy for
> me to iterate through the relevant keys and delete the rows. But will
> that do anything?
> I currently have the majority of sstables at generation 4. Deleting rows
> will initially just create a ton of tombstones. For them to actually
> free up significant space they need to get promoted to gen 4 and cause a
> compaction there, right? nodetool compact doesn't do anything with level
> compaction, it seems. Am I doomed?
> (Ok, I'll whip out my CC and order more disk ;-)
There is a delay before you will see the effects of deletions in terms
of disk space, yes. However, this is not normally a problem because
you effectively reach a steady state of disk usage. It only becomes a
problem if you're almost *entirely* full and are trying to delete data
in a panic.
How far away are you from entirely full? Are you just worried about
the future or are you about to run out of disk space right now?
--
/ Peter Schuller (@scode, http://worldmodscode.wordpress.com)