How to calculate "Concurrent_reads" parameter in cassandra DB

Viewed 346

How to calculate and set the "concurrent_read" parameter in cassandra.yaml file in cassandra DB. It shows "cassandra_read" is calculated as 16*num of drives. My question is ,what exactly this "num of drives" is and how to calculate it?? Assuming system has 8 cores, 32 GB RAM and 1TB of hard disk.

1 Answers

One way to configure Apache Cassandra's data directories, was to use multiple data drives. In the bare metal world of a few years ago, this was usually multiple, physical disks. The way to configure them in the cassandra.yaml would be like this:

data_file_directories:
    - /data01
    - /data02
    - /data03
    - /data04

This assumes that the Cassandra instance has four physical drives, attached on the data0[1-4] mount points. Cassandra would then treat these directories in a JBOD (just a bunch of disks) fashion, spreading data evenly across them.

In this case, computing concurrent_reads with your formula above would be 16 x 4, as there are four drives. Given the emergence of solid state drives, the use of multiple, physical (or logical) disks isn't done much today (in my experience).

tl;dr;

If you're unsure of how many drives you have, check your mount points (df -h, /etc/fstab, etc...). Or you will probably be fine assuming one, and adjusting that calculation based on your available compute resources.

Related