cassandra-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From David Wahler <dwah...@indeed.com>
Subject Re: Deleted snapshot files filling up /var/lib/cassandra
Date Mon, 16 Mar 2015 23:33:37 GMT
On Mon, Mar 16, 2015 at 6:12 PM, Ben Bromhead <ben@instaclustr.com> wrote:
> Cassandra will by default snapshot your data directory on the following
> events:
>
> TRUNCATE and DROP schema events
> when you run nodetool repair
> when you run nodetool snapshot
>
> Snapshots are just hardlinks to existing SSTables so the only disk space
> they take up is for files that have since been compacted away. Disk space
> for snapshots will be freed when the last link to the files are removed. You
> can remove all snapshots in a cluster using nodetool clearsnapshot
>
> Snapshots will fail if you are out of disk space (this is counterintuitive
> to the above, but it is true), if you have not increased the number of
> available file descriptors or if there are permissions issues.
>
> Out of curiosity, how often are you running repair?

Thanks for the information. We're running repair once per week, as
recommended by the Datastax documentation. The repair is staggered to
run on one machine at a time with the --partitioner-range option in
order to spread out the load.

Running "nodetool clearsnapshot" doesn't free up any space. I'm
guessing that because the snapshot files have been deleted from the
filesystem, Cassandra thinks the snapshots are already gone. But
because it still has the file descriptors open, the disk space hasn't
actually been reclaimed.

Mime
View raw message