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

collectd disk metrics are showing distorted rates #77

Closed
tgrabiec opened this issue Oct 28, 2016 · 4 comments
Closed

collectd disk metrics are showing distorted rates #77

tgrabiec opened this issue Oct 28, 2016 · 4 comments
Labels
bug Something isn't working right

Comments

@tgrabiec
Copy link
Contributor

tgrabiec commented Oct 28, 2016

Example:

disk_stats

The actual rate is around 400 and doesn't vary as much in reality as it is shown on the graph.

The rates are calculated by taking difference between consecutive samples of monotonic counters. Collectd emits samples with 10 second period, while prometheus samples them by default with 15 second period. So half of the time the period between prometheus samples will cover 1 collectd sample and half of the time it will cover 2 samples. The former will underestimate the rate and the latter will over estimate it.

To avoid this, the sampling period used by prometheus must be a multiply of collectd period. We can set the scraping interval to 10s, or modify the collectd plugin to export stats with 1s period. The latter approach is better because it gives better accuracy and works with any scrape period.

@tgrabiec tgrabiec added the bug Something isn't working right label Oct 28, 2016
@tgrabiec
Copy link
Contributor Author

Current value of 15s scrape period is probably chosen so that there is no distortion in Scylla metrics, which are exported by default with 3s period. So 10s period wouldn't work with that.

@tgrabiec
Copy link
Contributor Author

Related collectd_exporter issue prometheus/collectd_exporter#24

@tzach
Copy link
Contributor

tzach commented Oct 30, 2016

Scylla 1.4 will not use collectd_exporter, so this issue might not be relevant looking forward

@amnonh
Copy link
Collaborator

amnonh commented Nov 27, 2016

Can we close that?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working right
Projects
None yet
Development

No branches or pull requests

3 participants