Apache Cassandra:显示 Memtable 刷新频率的 Nodetool Stats

Apache Cassandra: Nodetool Stats Which shows Memtable Flush Frequency

目前我正在调试 Apache Cassandra 的性能问题。当列族的 Memtable 被填满时,它会排队等待刷新到 SSTable。当您执行大量写入时,经常会发生这种刷新。 当此队列已满时,写入将被阻塞,直到下一次成功完成刷新。这表明您的节点无法处理它正在接收的写入。

nodetool 中是否有指示此行为的矩阵?换句话说,我想要一个表明节点无法跟上它正在接收的写入的数据。

谢谢!!

我相信您正在寻找 tp(线程池)统计信息。

nodetool tpstats

通常阻塞的 FlushWriters 表示您的存储系统无法跟上写入工作负载。您是否偶然使用了旋转磁盘?在这种情况下,您还需要关注 iostat。

这是 tpstats 的文档:https://docs.datastax.com/en/cassandra/2.1/cassandra/tools/toolsTPstats.html

I want a data indicating a node cannot keep up with writes it is receiving.

您的问题可能与磁盘有关I/O 无法处理吞吐量 --> 内存表刷新排队 --> 写入被阻塞

命令 dstat 是您调查 I/O 问题的朋友。其他一些 linux 命令可能也很方便。阅读来自 Amy Tobey 的精彩博客 post:https://tobert.github.io/pages/als-cassandra-21-tuning-guide.html

Is there a matrix in nodetool indicating this behaviour?

nodetool tpstats

几年来情况并非如此。活动的内存表被切换,一个新的内存表占据了它的位置。当 "to be flushed" 内存表包含在本地读取中时,此实时内存表会发生新的突变。 MemtableFlushWriter 线程池中有刷新任务在其上排队。因此,您可以看到有多少待处理(在 tpstats 下)。您还可以在 MutationStage 下看到备份的突变。

最终

nodetool tpstats

可能是您要找的东西。