3

From the docs it is given

commitlog_total_space_in_mb (Default: 32MB for 32-bit JVMs, 8192MB for 64-bit JVMs)note Total space used for commitlogs. If the used space goes above this value, Cassandra rounds up to the next nearest segment multiple and flushes memtables to disk for the oldest commitlog segments, removing those log segments. This reduces the amount of data to replay on start-up, and prevents infrequently-updated tables from indefinitely keeping commitlog segments. A small total commitlog space tends to cause more flush activity on less-active tables.

And from the Cassandra.yaml it is specified :

Total space to use for commit logs on disk.

If space gets above this value, Cassandra will flush every dirty CF in the oldest segment and remove it. So a small total commitlog space will tend to cause more flush activity on less-active columnfamilies.

The default value is the smaller of 8192, and 1/4 of the total space of the commitlog volume.

commitlog_total_space_in_mb: 8192

The query i have is What does the following statement mean :

The default value is the smaller of 8192, and 1/4 of the total space of the commitlog volume.

I have my commitlog in the same hard drive but different drive I have allocated the volume of commit log to 70 GB. Should I reduce it to 8gb or should i reduce it to 32 GB as 1/4 of the volume space confuses me to consider that partition space.

I have the default value for commitlog_total_space_in_mb , so what should be the ideal commit log partition size ??

P.s : I know that these 2 should be on different drives for better performance.

Community
  • 1
  • 1
Hiteshdua1
  • 2,126
  • 18
  • 29

1 Answers1

0

As for your first question about Cassandra.yaml statement - the commit log size will be:

Min(8GB, 0.25*total_disk_size)

In your case since you have allocated 70 GB, the commit log size will be 8 GB. You can avoid those calculation be setting the size at Cassandra.yaml

As for your second question, what is the optimal size, from my testing when setting the commit log directory under 8GB you will get a warning for insufficient disk size for it, so set it more than 8GB and remember that you can always increase that size.

guy dadon
  • 282
  • 1
  • 2
  • 13