7

I've got a mostly idle (till now) 4 node cassandra cluster that's hooked up with opscenter. There's a table that's had very little writes in the last week or so (test cluster). It's running 2.1.0. Happened to ssh in, and out of curiosity, ran du -sh * on the data directory. Here's what I get:

4.2G    commitlog
851M    data
188K    saved_caches

There's 136 files in the commit log directory. I flushed, and then drained cassandra, stopped and started the service. Those files are still there. What's the best way to get rid of these? Most of the stuff is opscenter related, and I'm inclined to just blow them away as I don't need the test data. Wondering what to do in case this pops up again. Appreciate any tips.

4

1 回答 1

2

提交日志目录中的文件具有固定大小,由您在 cassandra.yaml 中的设置确定。所有文件都有一个预先分配的大小,因此您无法通过在集群上进行刷新、排水或其他操作来更改它。

如果要减小它们的大小,则必须更改配置。

查看配置设置“commitlog_total_space_in_mb”和“commitlog_segment_size_in_mb”来配置每个文件的大小以及所有文件占用的总空间。

于 2014-12-10T19:10:56.437 回答