如何更改cassandra的刷新队列大小

How to change the flush queue size of cassandra

如何在 Cassandra 中为 memtable 和 sstable 之间的刷新队列分配更多内存。我收到超时错误,堆和年轻区域的使用似乎在限制范围内。除了机器中的 Cassandra 之外,没有其他处理发生。还有如何找到是否有任何请求被丢弃在以太网卡上而不是被 Cassandra 丢弃。 我使用 Cassandra Datastax 4.7 和 Java 1.8.

How to change the flush queue size of cassandra

您可以通过编辑 cassandra.yaml 文件中的 memtable_flush_writers 来增加刷新写入器的数量。请参阅 related docs.

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

您没有为队列分配内存。您只能增加队列的线程。您可以整体增加 JVM 的内存。 Cassandra 的堆大小通常建议为 8GB,但有些会随着特定的 JVM 调优而变得更高。

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.

如果您对丢弃的网络数据包特别感兴趣,请查看以下输出:

# 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 在 NIC 级别记录已出错、已丢弃等的数据包计数。