On Mon, Mar 16, 2015 at 6:12 PM, Ben Bromhead <b...@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.

Reply via email to