How to change the flush queue size of cassandra

553 views Asked by At

How to assign more memory for the flush queue between memtable and sstable in Cassandra. I have getting timeout errors and the heap and young region usage seems to within limits. There is no other processing happening except Cassandra in the machine. Also how to find if any requests are dropped at the ethernet card and not by Cassandra. I use Cassandra Datastax 4.7 and Java 1.8.

1

There are 1 answers

0
phact On BEST ANSWER

How to change the flush queue size of cassandra

You can increase the number of flush writers by editing memtable_flush_writers in your cassandra.yaml file. See the related docs.

How to assign more memory for the flush queue between memtable and sstable in Cassandra.

You don't assign memory to a queue. You can only increase the threads for the queue. You can increase the memory for the JVM in it's entirety. Heap size for Cassandra is usually recommended to be 8GB though some will go higher with specific JVM tuning.

Also how to find if any requests are dropped at the ethernet card and not by Cassandra. Depending on your Consistency Level, your reads or writes may fail if not enough replicas acknowledge back.

If you're interested on network packets dropped specifically take a look at the output of:

# ifconfig
eth0      Link encap:Ethernet  HWaddr XX:34:XX:XX:10:03
          inet addr:xxx.xxx.xxx.xxx  Bcast:xxx.xxx.xxx.xxx  Mask:255.255.240.0
          UP BROADCAST RUNNING MULTICAST  MTU:9001  Metric:1
          RX packets:89549235 errors:0 dropped:0 overruns:0 frame:0
          TX packets:100307025 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000
          RX bytes:757464549909 (757.4 GB)  TX bytes:27216611814 (27.2 GB)

ifconfig keeps counts of packets that have errored out, been dropped, etc. at the NIC level.