InfluxDB Query Time Spikes - Seeking Insights

Hello everyone,

I’ve been encountering a puzzling issue with InfluxDB that I hope some of you might have insights on. When I’m writing data to InfluxDB on my localhost machine, I’ve noticed significant variations in query times, and I’m struggling to pinpoint the cause.

On average, the queries look something like this:

user_agent=influxdb-client-python took=13.775ms
user_agent=influxdb-client-python took=14.205ms

However, there are moments when the query time inexplicably spikes, like this:

user_agent=influxdb-client-python took=314.792ms
user_agent=influxdb-client-python took=296.491ms

This inconsistency is quite concerning, and I’m eager to understand why it’s happening and how I can mitigate it. Has anyone else encountered similar fluctuations write time with InfluxDB on a local machine? If so, what could be the potential reasons behind such drastic variations in query performance?