cassandra-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From aaron morton <>
Subject Re: Restart cassandra every X days?
Date Thu, 26 Jan 2012 01:14:35 GMT
That disk usage pattern is to be expected in pre 1.0 versions. Disk usage is far less interesting
than disk free space, if it's using 60 GB and there is 200GB thats ok. If it's using 60Gb
and there is 6MB free thats a problem.

In pre 1.0 the compacted files are deleted on disk by waiting for the JVM do decide to GC
all remaining references. If there is not enough space (to store the total size of the files
it is about to write or compact) on disk GC is forced and the files are deleted. Otherwise
they will get deleted at some point in the future. 

In 1.0 files are reference counted and space is freed much sooner. 

With regard to regular maintenance, node tool cleanup remvos data from a node that it is no
longer a replica for. This is only of use when you have done a token move. 

I would not recommend a daily restart of the cassandra process. You will lose all the run
time optimizations the JVM has made (i think the mapped files pages will stay resident). As
well as adding additional entropy to the system which must be repaired via HH, RR or nodetool

If you want to see compacted files purged faster the best approach would be to upgrade to

Hope that helps. 

Aaron Morton
Freelance Developer

On 26/01/2012, at 9:51 AM, R. Verlangen wrote:

> In his message he explains that it's for " Forcing a GC ". GC stands for garbage collection.
For some more background see:

> Cheers!
> 2012/1/25 <>
> Karl,
> Can you give a little more details on these 2 lines, what do they do?
> java -jar cmdline-jmxclient-0.10.3.jar - localhost:8080
> java.lang:type=Memory gc
> Thank you,
> Mike
> -----Original Message-----
> From: Karl Hiramoto []
> Sent: Wednesday, January 25, 2012 12:26 PM
> To:
> Subject: Re: Restart cassandra every X days?
> On 01/25/12 19:18, R. Verlangen wrote:
> > Ok thank you for your feedback. I'll add these tasks to our daily
> > cassandra maintenance cronjob. Hopefully this will keep things under
> > controll.
> I forgot to mention that we found that Forcing a GC also cleans up some
> space.
> in a cronjob you can do this with
> my cronjob looks more like
> nodetool repair
> nodetool cleanup
> nodetool compact
> java -jar cmdline-jmxclient-0.10.3.jar - localhost:8080
> java.lang:type=Memory gc
> --
> Karl
> This email was sent to you by Thomson Reuters, the global news and information company.
Any views expressed in this message are those of the individual sender, except where the sender
specifically states them to be the views of Thomson Reuters.

View raw message