Cassandra 4 - Virtual table metrics

44 Views Asked by At

When I query virtual tables for metrics like the following in Cassandra 4.1

select * from system_views.local_read_latency;
select * from system_views.coordinator_read_latency;

All I can see is the count and no values for P50,P99,Max etc. Do we need to enable any settings to see these values?

keyspace_name : test
table_name : test_ordernumber
count:4146258
max_ms:0
p50th_ms:0
p99th_ms:0
per_second:0
1

There are 1 best solutions below

1
Andrew On

Spinning up a docker container of Cassandra 4.1.2 shows the same behaviour, but I notice that on some other system tables I do get some decimal values although they also changed and zero'ed on some tables. (Cover this later)

The values are a resolution to 3 decimal places of milliseconds, and for a very small amount of test data, the latency of the queries was not sufficient to generate 0.001 ms latency show up - checking nodetool tablestats also gave the same, showing that the Local read latency: NaN ms.

In your test table, while you have read it 4 million times, how much data is being read? If its a very small amount, that is just sitting in memory cache, the latency could be quick enough that it does not register a high enough latency to show.

With reference to the changing values on the system tables, when it first started up, I did have p50/p99 values showing, but they were very small, as the read count increased, the average I believe was pulled lower, and below the 0.001 ms threshold.

You could also check this by pulling the JMX for your test table, and see what values the JMX show against the table, the JMX is going to show the microseconds.