Hi, i’ve had spikes in my homey load since forever.
im using Prometheus and grafana to get metrics of my home, but it also shows me spikes on my homey load, like every 50 minutes to a load of 2.
There always there, when nobody is at home, when everybody is asleep, when all apps are disabled. (apart form the prometheus app, ive monitored that one via the homey logic). all my flows have logging via the papertrails in them, there is also nothing there every 50mins.
im really clueless what causes those spikes, so im hoping someone can point me in a right direction for troubleshooting this further on.
It is not something you can use, it is something I know periodically happens and causes temporary system load. Homey runs on node.js which has a garbage collector: that is a process that cleans up reserved memory that is no longer in use so it can be used again.
Homey displays system load by the amount of commands waiting for execution. So if the Homey processors are busy collecting garbage they will process less commands, which may show an increase in commands waiting. Garbage collection runs in the background, so commands will get executed (albeit a little slower).
Periodical garbage collection is normal system behavior and as long as the system runs normally I would not worry about it.
Node.js doesn’t perform garbage collection every 50 minutes, it collects garbage pretty much all the time. Either Athom is deliberately calling the garbage collector at that interval, or there are system processes (remember, Homey runs Linux) that are causing the load spikes.
Thanks for the explanation. i can see the garbage collection happening (i think, looking at the red line (system mem)) but its not aligned with the spikes.
I’d expect “Homey” to be the main Homey node.js process (which isn’t changing much) and “system” to be other system processes. It almost looks as if it’s restarting certain processes periodically.
There’s not much coincidence between the RAM usage and CPU usage graphs, which could also point to short-lived (but CPU-intensive) background processes that get fired up periodically.
But that said, it all depends on how these metrics are determined. Especially the “system” RAM can be tricky to get right (with things like system buffers, caches, swap, etc).