Many commitlog files with Cassandra

I have a basically inactive (so far) 4 node cassandra cluster that connects to opscenter. There is a table that writes very little in the last week or so (test cluster). It works 2.1.0. It happened with ssh in and out of curiosity, du -sh * was launched in the data directory. Here is what I get:

4.2G commitlog 851M data 188K saved_caches 

The commit log directory contains 136 files. I blushed and then drained the cassandra, stopped and began the service. These files still exist. What is the best way to get rid of them? Most of the material is related to opscenter, and I tend to just blow them away because I don't need test data. Wondering what to do if it pops up again. Rate all the tips.

+6
source share
1 answer

The files in the commit log directory have a fixed size defined by your settings in the cassandra.yaml file. All files have a pre-allocated size, so you cannot change it by performing a reset, leak, or other operations in the cluster.

You must change the configuration if you want to reduce your size.

Check the configuration options "commitlog_total_space_in_mb" and "commitlog_segment_size_in_mb" to configure the size of each file and the total space occupied by all of them.

+2
source

Source: https://habr.com/ru/post/977561/


All Articles