InfluxDB is showing a peculiar behavior in which same query is taking variable amount of time to execute.
I have a simple “select” query over a measurement with 79 million records. Usually the query takes 180 seconds to complete but if I execute the same query 6 to 8 times, the response time increases by around a factor of 10. Meanwhile, the system does not show any signs of stress. Problem gets fixed on its own after a couple of hours.
I have tried restarting the influx process and the server it is hosted on but that didn’t make any difference. the cpu and memory utilization of machine are very low even when query is running. I am not even running more than one query at a time.
Here is the query I am running:
SELECT max(float_value) FROM may_data WHERE time >= 1525132800000000000 AND time < 1527811200000000000 AND float_value >= 0 AND float_value <= 9999 GROUP BY dev_id my_data
I am getting the same response time with “min” and “count” function as well.I have also tried running these queries without WHERE clause and GROUP BY clause but it also took approx 10x more time then usual execution time.
InfluxDB version 1.5.3
OS: CentOS 7
kernel version: (3.10.0-862.3.3.el7.x86_64)
2 VCPU cores
Would really appreciate if someone could explain how I can further debug or fix this problem.