Improve request-time from InfluxDB

  • What Grafana version and what operating system are you using?
    OS: Windows 10
    Docker version 20.10.5
    Docker-Container: Grafana v7.5.5
    Docker-Container: InfluxDB Version 2.0.5

  • What are you trying to achieve?

Improve the response-time from influxDB.

Insidea Granfa-Dashboard are 24 Graph-Panels.

With a refresh-rate of 500ms,1s,2s should the Graph-Panels be updated fast

  • How are you trying to achieve it?

I measured the time with Google Chrome and see some query states are “cancel”, “pending” or response time takes to 500 ms.
Grafana and InfluxDB running on the same server.

I tested this with 500ms refresh-rate and 1h time-range:

  • What happened?

Some Graph-Panels takes too much time to show the values.

  • What did you expect to happen?

To avoid long waiting and improve the usability of the Dashboards

  • Can you copy/paste the configuration(s) that you are having problems with?

  • Did you receive any errors in the Grafana UI or in related logs? If so, please tell us exactly what they were.

  • Did you follow any online instructions? If so, what is the URL?

Thx in advance

you need to share your query for real help. But if I had to guess I’d say you are requesting way too many data points and that is slowing things down. You can also use things like library panels or the special Dashboard datasourece to reuse queries. This can also improve response time.

In addition to what @mattabrams said, I found this webinar from Influxdb about Schema Design for IoT to be extremely helpful. When we migrated from InfluxQL to Flux, I spent time thinking about the 50+ queries we would eventually make, and came up with new field names & tag names that made sense to use in our data structure. As a result, the Flux queries (vs. InfluxQL, where we did not use tags) made our queries much, much faster.

1 Like

the following is critical to understand for performance issues

InfluxDB lets you specify fields and tags, both being key/value pairs where the difference is that tags are automatically indexed.

Because fields are not being indexed at all, on every query where InfluxDB is asked to find a specified field, it needs to sequentially scan every value of the field column.


InfluxDB design guidelines to avoid performance issues – Service Engineering (ICCLab & SPLab).