Compaction and periodic spikes in the CPU usage

do you know if is there some way to optimize the influx CPU usage?
As you can see from the attachment the CPU load periodically increases, i read due to compaction processes internal to influx itself. I’m running influx 1.7.10, on all databases i have usually 3 retention policies.



You can get rid of the spikes if you use the output jitter within telegraf. Maybe also input collection jitter. The point seems to be, that you don’t write a huge amount of data with exactly the same timestamp. A view seconds jitter are enough. With this I was able to reduce the spikes from >100 load to something in the single digit range.

Hello SWalter,
yes i have a lots of data ingested with other tools different from telegraf, and unfortunately with different timestamp for the same type of metric. But it’s not totally clear to me in which way this could affect the influxdb performance… could you kindly explain me?


sorry, but I have no knowledge about the root cause of this behavior.

My assumption is just, that during compaction the scope of compression is larger with the same timestamp and therefore more data is loaded and processed. But maybe this is completely wrong…

Thanks SWalter,
i also cannot see the correlation, but i’ve no competence about this