首先,CPU 不是 20%。当 CPU 系统为 20% 时,用户 CPU 为 70% 左右。这是用户 CPU 和系统 CPU 之间的解释:用户 CPU 时间与系统 CPU 时间?
其次,不带参数调用 iostat 并不是查看磁盘使用情况的最佳方式。来自:Linux 上的基本 I/O 监控
如果没有指定的时间间隔,iostat 会显示自系统启动然后退出以来的统计信息,这在我们的示例中没有用。
要更全面地了解系统,请使用
dstat -rcdgilmnps 60

现在我们清楚地看到了最后一分钟的平均值。CPU 空闲率为 1-4%,我们有大约 340 个 ios 和 15M 写入速度。
下一个有用的工具是 nodetool cfstats:

我们可以在哪里看到特定表的一些统计信息。写入延迟统计数据特别有趣,等于 1.5 毫秒。
最后,执行写入跟踪:
id: 12345 -> host NodeAsked:9042, achieved consistency: LocalOne
Sending MUTATION message to /NodeA on NodeAsked[MessagingService-Outgoing-/NodeA] at 0
Sending MUTATION message to /NodeB on NodeAsked[MessagingService-Outgoing-/NodeB] at 0
REQUEST_RESPONSE message received from /NodeA on NodeAsked[MessagingService-Incoming-/NodeA] at 0
Processing response from /NodeA on NodeAsked[SharedPool-Worker-32] at 0
MUTATION message received from /NodeAsked on NodeA[MessagingService-Incoming-/NodeAsked] at 12
Determining replicas for mutation on NodeAsked[SharedPool-Worker-45] at 114
Appending to commitlog on NodeAsked[SharedPool-Worker-45] at 183
Adding to mytable memtable on NodeAsked[SharedPool-Worker-45] at 241
Appending to commitlog on NodeA[SharedPool-Worker-5] at 5360
Adding to mytable memtable on NodeA[SharedPool-Worker-5] at 5437
Enqueuing response to /NodeAsked on NodeA[SharedPool-Worker-5] at 5527
Sending REQUEST_RESPONSE message to /NodeAsked on NodeA[MessagingService-Outgoing-/NodeAsked] at 5739
表明限制我们的是存储速度。在正常写入负载上启用跟踪以查看一些模式是最好的执行几个自发写入。
如果您同意,请投票。