哪些Cassandra指标显示每秒的读取和写入次数?

huangapple go评论67阅读模式
英文:

Which Cassandra metrics expose the reads and writes per second?

问题

我有一个v3.9的非托管Cassandra服务器。
为了迁移到另一个系统,我对了解我们每秒(或每天)执行多少读取和写入操作很感兴趣。
我已将指标导出到Prometheus,使用JMX,但我无法找到计算读取/写入次数的指标。
这个答案(https://stackoverflow.com/a/58373711)推荐了一些方法,但我在我的指标中找不到它,不确定是我没有找对地方还是我的服务器太旧了。

我是否漏掉了一些明显的东西?

英文:

I have a v3.9 unmanaged Cassandra server.
In preparation to migrating to another system, I'm interested in discovering how many reads and writes per second (or day) we're doing.
I've exported the metrics to Prometheus using JMX, but I can't discover a metric that counts the reads/writes.
This answer (https://stackoverflow.com/a/58373711) recommends something, but I can't find it in my metrics, not sure whether I'm not looking in the right place or my server is too old.

Am I missing something obvious?

答案1

得分: 1

链接的答案是正确的,读/写延迟直方图包括一个计数。您还应该能够在nodetool cfstats输出中看到相同的计数。

检查一下nodetool cfstats中是否有读取计数/写入计数,如果有的话,那么它将在JMX中。

作为参考,此计数在节点重新启动时从零开始,因此在集群内,您需要计算每个节点的每日读取/写入次数,然后将它们相加。

英文:

The answer you linked is correct, the read / write latency histograms include a count. You should also be able to see the same count within the nodetool cfstats output.

Check if you see a read count / write count on the nodetool cfstats if you do, then it will be within the JMX.

For reference, this count starts at zero when a node is restarted, so within a cluster, the number of reads / writes per day you would have to calculate per node, and then add those together.

答案2

得分: 1

查看名为Latency的指标报告的计数,类型为ClientRequest。具体的MBeans是:

org.apache.cassandra.metrics:type=ClientRequest,scope=Read,name=Latency
org.apache.cassandra.metrics:type=ClientRequest,scope=Write,name=Latency

这些指标报告协调节点上每秒的读取/写入请求数量,这相当于来自客户端应用程序的读取/写入请求。

请注意,Latency指标记录了TimerCounter,分别跟踪(1)延迟的持续时间和(2)请求的数量。祝好!

英文:

Look at the counts reported by the metrics called Latency of type ClientRequest. The specific mbeans are:

org.apache.cassandra.metrics:type=ClientRequest,scope=Read,name=Latency
org.apache.cassandra.metrics:type=ClientRequest,scope=Write,name=Latency

These metrics report the number of read/write requests per second on the coordinator nodes which is equivalent to the read/write requests from the client application(s).

Note that Latency metrics record both Timer and Counter which track (1) the duration of the latency and (2) the number of requests. Cheers!

huangapple
  • 本文由 发表于 2023年6月19日 15:56:46
  • 转载请务必保留本文链接:https://go.coder-hub.com/76504664.html
匿名

发表评论

匿名网友

:?: :razz: :sad: :evil: :!: :smile: :oops: :grin: :eek: :shock: :???: :cool: :lol: :mad: :twisted: :roll: :wink: :idea: :arrow: :neutral: :cry: :mrgreen:

确定