In Cassandra 3.x, metrics with type=ColumnFamily where renamed to type=Table, and an alias for ColumnFamily was created (and subsequently deprecated). By Cassandra version 3.7, some of the deprecated metrics have already been removed (latency for example), so [[ https://github.com/wikimedia/cassandra-metrics-collector/commit/6a52eff6a0562feff174c32a714850351e62e176 | support for type=Table was added to cassandra-metrics-collector ]]. However, since the bulk of type=ColumnFamily metrics are still present, this amounts to collecting the data twice, and since this where the bulk of metrics come from, the utilization that results is significant.
It is worth mentioning that this only impacts nodes running Cassandra 3.x (2.2.6 clusters do not have the type=Table metrics). Also worth mentioning is that since we are traditionally not CPU bound, the added utilization might not be a high priority (certainly worth fixing, but not necessarily worth blocking deployment of 3.x).
Possible approaches
- Create a branch of c-m-c for Cassandra 3.x that removes [[ https://github.com/wikimedia/cassandra-metrics-collector/blob/3.1.4/src/main/java/org/wikimedia/cassandra/metrics/JmxCollector.java#L291 | ColumnFamily ]] from collection (we already have a branch used to retain compatibility for Cassandra 2.1)
- Detect when the release version >= 3, and collect Table instead of ColumnFamily
- Optionally rewrite metrics (s/Table/ColumnFamily/) to retain compatibility