Page 1 of 1

High CPU usage with node

Posted: Thursday 26 December 2019 1:05
by jeffreygek1
A few days ago i started using Domoticz. I installed nodejs to make use of my nefit easy(https://github.com/robertklep/nefit-easy-core). Today is was checking the cpu usage with the 'top' command and saw that it went up to 100%. When I uninstall Node the usage goes back down.

How can i check if the node usage has something to do with my nefit easy or with another application?

Image

Re: High CPU usage with node

Posted: Thursday 26 December 2019 11:48
by FireWizard
Hi,

What version of NodeJS do you use?

I noticed also, that, after an upgrade of both NodeJs (to version 11.15.0) and Node Red
(to version 1.0.3) on a Raspberry Pi 1 last week, I had a somewhat higher process load.
I even had to increase the thresholds in the Monit config file.

After looking into the graphs of the Motherboard sensors of that Pi, I saw that the load touched the 100%, multiple times over the past year.
I would not worry about it that much, as long as your device runs fine.

P.S. Be aware, that last week, security updates has been posted for all versions.

Regards

Re: High CPU usage with node

Posted: Thursday 26 December 2019 16:18
by jeffreygek1
I have been running mutliple versions of nodejs(both 10 and 13). But on further research the logged cpu usage seems fine around 30%?

Image

Re: High CPU usage with node

Posted: Monday 09 March 2020 20:46
by krizzz
Sorry to come back on this topic, but I am experiencing exactly the same. I just installed node to get my NEST thermostat working again. But coming from a 3% average CPU usage and now its multiplied with a factor 10x, this is something I have to ask. Does it harm the Pi on the longer run?

Re: High CPU usage with node

Posted: Tuesday 10 March 2020 12:10
by FireWizard
Hello

@ krizzz

As said earlier I have a average CPU load of about 50%, since I upgraded in December to Node-Red 1.0.3.
Node Red and a number of flows and MQTT is running on a Pi 1B, so single core.
No problems at all, but yes to average CPU load has increased since then.

Regards

Re: High CPU usage with node

Posted: Tuesday 10 March 2020 12:10
by FireWizard
Hello

@ krizzz

As said earlier I have a average CPU load of about 50%, since I upgraded in December to Node-Red 1.0.3.
Node Red and a number of flows and MQTT is running on a Pi 1B, so single core.
No problems at all, but yes to average CPU load has increased since then.

Regards