Skip to content
New issue

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

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

Already on GitHub? # to your account

Influxdb - Grafana stack is not scalable due to unsupported time roll up #4605

Open
PaulKuiper opened this issue Oct 28, 2015 · 14 comments
Open

Comments

@PaulKuiper
Copy link

Influxdb has the nice feature to roll up time serie data into larger time buckets via continous queries. This can tremendously speed up a query that needs to display two years of data that was originally sampled at 1Hz.

Grafana will however creates a select query on the original time serie and request a dynamic groupby time based on how far it is zoomed out. Influx will thus crunch all data points in that two year interval. There is no way in Grafana to specify to switch to the time rolled up continous query based on the groupby interval. This could potentially fixed in Grafana, however...

Grafana points out that Graphite automatically rollup its measurements as part of there measurement definition. An queries will thus automatically pick the best internally precalculated time roll up table to execute the query. Graphite therefore always answers within about 100ms. My experience with Influx is that it can take 30sec easily to return the result of a very zoomed out time serie. See grafana/grafana#420 for more details.

This is basically a very nasty interface problem between Grafana and Influxdb and I see no urgency on either side to solve it while it is the number one performance bottleneck in this popular stack as far as I'm concerned.

The question:
Can the influx query engine use the knowledge its continous queries definitions to optimise the query engine path to use the pre calculated continous query data when a time groupby is requested on the original serie?

@PaulKuiper PaulKuiper changed the title influxdn - Grafana stack is not scalable due to unsupported time roll up Influxdb - Grafana stack is not scalable due to unsupported time roll up Oct 28, 2015
@beckettsean
Copy link
Contributor

Highly related to #2625. Not quite a duplicate, but likely a fix for one addresses the other.

@beckettsean
Copy link
Contributor

Tangentially related to #1994 as well.

@elnappo
Copy link

elnappo commented Nov 17, 2015

I also think this should be fixed in InfluxDB. Maybe we could use a dedicated tag which defines the function (mean, count, sum, ...) to use for aggregation? E.g.:

cpu,host=server01,region=uswest,aggregate=mean value=1 1434055562000000000

This would lead to better performance on all queries with include a GROUP BY statement, but increases the database size. It could be difficult to figure out what's the optimal size/interval for these precomputed roll ups. I don't know what's Graphite is doing here.

@sslupsky
Copy link

+1. In my view, Grafana could address this by making a conditional query based on the time span. Here are a couple marked up screen shots:
screen shot 2016-02-10 at 8 36 04 am
screen shot 2016-02-10 at 8 36 04 am v2

So, you would create additional queries for each case where you would like to use a down sampled time series. In either case, each additional query would reference the proper continuous query for the given time span.

@sslupsky
Copy link

Here is an example of what I mean:

influx continuous query mockup

@beckettsean
Copy link
Contributor

Largely addressed by #6910

@rbetts rbetts added pm/review and removed pm/review labels Nov 2, 2017
@dgnorton dgnorton added the 1.x label Jan 7, 2019
@stale
Copy link

stale bot commented Jul 23, 2019

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

@stale stale bot added the wontfix label Jul 23, 2019
@friesoft
Copy link

Still relevant imho as intelligent rollups didn't land

@stale stale bot removed the wontfix label Jul 25, 2019
@stale
Copy link

stale bot commented Oct 23, 2019

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

@stale stale bot added the wontfix label Oct 23, 2019
@friesoft
Copy link

Still relevant as can be seen in #7198

@stale stale bot removed the wontfix label Oct 24, 2019
@Apollon77
Copy link

Yes, I also would like to see a solution in Grafana because I do not think InfuxDB will add that feature soon :-(

@stale
Copy link

stale bot commented Jan 24, 2020

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

@stale stale bot added the wontfix label Jan 24, 2020
@Apollon77
Copy link

I see that still relevant

@stale stale bot removed the wontfix label Jan 24, 2020
@piwi447
Copy link

piwi447 commented Jan 8, 2021

I like this simple proposal of having conditional query in Grafana but is it the right place to request this?

# for free to join this conversation on GitHub. Already have an account? # to comment
Projects
None yet
Development

No branches or pull requests

10 participants