Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[RFE] read/write latency by table name #998

Closed
dyasny opened this issue Jul 21, 2020 · 6 comments · Fixed by #1497
Closed

[RFE] read/write latency by table name #998

dyasny opened this issue Jul 21, 2020 · 6 comments · Fixed by #1497
Labels
enhancement New feature or request

Comments

@dyasny
Copy link

dyasny commented Jul 21, 2020

Please make sure that this is a feature request.

System information

  • Scylla version (you are using): 4.x/ 2019.1.x
  • Are you willing to contribute it (Yes/No): No

Describe the feature and the current behavior/state.
The customer would like to be able to monitor read and write latencies (avg/95/99) on a per table basis

Who will benefit with this feature?
This is a customer RFE from the field

Any Other info.
Ent. ticket 1358

@dyasny dyasny added the enhancement New feature or request label Jul 21, 2020
@amnonh
Copy link
Collaborator

amnonh commented Jul 21, 2020

Data per table is not exposed by default and is not part of the monitoring stack

@amnonh amnonh added this to the Monitoring 4.0 milestone Jul 21, 2020
@slivne
Copy link

slivne commented Jul 21, 2020 via email

@nyh
Copy link
Contributor

nyh commented Jul 21, 2020

Here is an excerpt from scylla.git's docs/metrics.md which tries to describe the current situation:

Most of Scylla's metrics are global (in each shard). Scylla also supports per-table metrics, which are maintained separately for each table in the database.

On a deployment with a large number of tables, this can result in a very large number of metrics at each time, and overwhelm Scylla's HTTP server and/or the Prometheus server collecting these metrics. For this reason, the per-table metrics are currently disabled by default:

To enable this flag and the per-table metrics, you can pass the parameters--enable-keyspace-column-family-metrics 1 in the Scylla command line, or set this parameter in Scylla's configuration file.

We are planning to rethink this approach in the future. In particular, it's not great that we currently need to restart Scylla to make these metrics available. Scylla already maintains these per-table metrics in per-table memory variables, and we just need a way to optionally expose them through the HTTP request.

To tell the metrics of the different tables apart, each metric's identifier contains the "ks" (keyspace) and "cf" (column family - the old name for table) as labels. For example,

scylla_column_family_pending_compaction{cf="IndexInfo",ks="system",shard="0",type="gauge"} 0.000000

Here we can see the "scylla_column_family_pending_compactions" metric measured in shard 0 of this node, for the table "IndexInfo" in keyspace "system".

@amnonh
Copy link
Collaborator

amnonh commented Jul 21, 2020

@slivne As I wrote in my answer it is disabled by default and not part of the monitoring stack.

@nyh
Copy link
Contributor

nyh commented Jul 21, 2020

@amnonh this is a feature request... I guess the feature is to enable it? This will require a change to Scylla to allow enabling monitoring per table - at least for a specific table, so this repository might not be the best place for it (do we have an open issue in scylla.git?), but will also require the monitoring stack recognizing and showing these per-table statistics.

@amnonh
Copy link
Collaborator

amnonh commented Jul 21, 2020

It will probably require support from the metrics layer (seastar) I had a few suggestions for supporting either dynamic enable and disable of metrics or for supporting multiple prometheus endpoint so we can have something like verbosity levels, the default prometheus will return everything, metrics like per-table will be on a different endpoint (different path) and will use the option to select specific metrics in a request.

So far all those attempts got rejected, I've marked this request for future monitoring release.

See also #285

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants