Closed ssunny1081 closed 2 weeks ago
Minimal repro using inch:
influx bucket create --name fluxtime --org-id ${ORGID} -t ${TOKEN}
)inch -v2 -db fluxtime -t 1 -p 1000000 -token ${TOKEN} -start-time 2024-08-12T00:00:00Z -time 24h
time influx query --org-id ${ORGID} -t ${TOKEN} -r 'from(bucket: "fluxtime") |> range(start: 2024-08-12) |> difference(nonNegative: true)' > /dev/null
Back to normal, fixed in current Version
I'm using InfluxDBv2 to gather my SolarPower Statistics. With the update from 2.7.6-1 to 2.7.8-1 I suddenly got timeouts on my Grafana Dashboards. As I have increasing counters, I use difference.
Turns out after the update it takes now about 8 seconds what took 300ms before.
Downgrade to 2.7.6-1 brings back the original performance, of around 300ms.
Steps to reproduce:
Query Used: `from(bucket: "nrdb") |> range(start: 2023-08-17) |> filter(fn: (r) => r["_measurement"] == "Solarpower" or r["_measurement"] == "Powermeter") |> filter(fn: (r) => r["_field"] == "SHTC" or r["_field"] == "SVTC" or r["_field"] == "SMTC" or r["_field"] == "TD" or r["_field"] == "TC")
|> difference(nonNegative: true)`
`
Expected behaviour:
difference() should finish in <= 300ms for a set of 500k Datapoints
Actual behaviour:
difference() takes 8s to finish a set of 500k Datapoints
Environment info:
Debian 12 11th Gen Intel(R) Core(TM) i3-1115G4 12GB RAM, less than 5GB in use NVMe SSD
Slow: influxdb2:amd64 2.7.8-1 Working as expected: influxdb2:amd64 2.7.6-1
Config: All default
Logs: