I'am currently investigating read and writes operations on cassandra. I would like to know about the read and writes that cassandra performs on the memtable and sstable. What is the closest value of the cassandra metrics? All I found are latency metrics, but this isn't what I'm searching for.
I would rather like to know how many real reads and writes occurs to build an abstract cost model for some specific operations.
Thank you!
Edit:
So it looks like ReadLatency and WriteLatency (Table Metrics) are what I've been searching for. However, if I want to read the metrics the Read Count is always 0.
My setup:
- PopOS! 20.04 / Lenovo P1 G2 (512GB nvme SSD, 16GB Ram)
- Cassandra 3.11.7 (Docker Container)
- Datastax 4.5.1 Java Driver
- Gathering metrics through Nodetools (been using the executable inside of the docker container) or with Telegraf 1.15.2 + Jolokina 1.6.2
My Telegraf config:
[[inputs.jolokia2_agent.metric]]
name = "TableRead"
mbean = "org.apache.cassandra.metrics:keyspace=*,name=ReadLatency,scope=*,type=Table"
tag_keys = ["keyspace", "name", "scope"]
field_prefix = "$2_"
[[inputs.jolokia2_agent.metric]]
name = "TableWrite"
mbean = "org.apache.cassandra.metrics:keyspace=*,name=WriteLatency,scope=*,type=Table"
tag_keys = ["keyspace", "name", "scope"]
field_prefix = "$2_"
Both are showing the Read Count as Zero on my Table (Write Counter is incrementing as expected) when running a query through my Java Application like this:
ResultSet rs = cqlSession.execute("SELECT * from myTable");
for(Row r : rs) {
int id = rs.getObject("someColumn");
}
Why is the Read counter not incrementing?