CPU spikes - fresh install in docker

Here is a similar thread, that hasn't really been resolved:

I am running a totally blank instance of Node-RED on an e2 shared core GCE VM (their free tier offer for compute).

I am seeing CPU spikes every 30s, and I was wondering if there is some kind of polling happening that I could turn off, or generally if there is a way to reduce or fully remove this from happening. Here is a visualization from lazydocker that I believe they are pulling from docker stats.

Here is an image from GCP VM monitoring showing the difference with nodered off vs on:

Avg CPU utilization goes from 1.8% (running Traefik and Portainer) to 8.2% when nodered is running.

Any thoughts on why this would be? Again, there are no nodes running at all, this is a fresh install.

Hi @singletonerik,

I have had a look at a Node-RED container running on my Windows portable, but I don't see such spikes unfortunately so cannot reproduce it. You might try my node-red-contrib-v8-cpu-profiler node to analyze the CPU usage. Not sure it will reveal the root cause...

The github repo contains also a wiki page with a step-by-step tutorial.

I have runned it now for 5 minutes:

image

So after that time, a .profile file is generated.
When I analyze that profile file with Chrome Developer tools (as described in the wiki), I see only very small peaks in my case. So the resulting flame chart is almost invisible (in the ellipse). But at least I can see from which Node-RED statements these peaks are triggered:

But perhaps it can help you during troubleshoothing...
Bart

2 Likes

This topic was automatically closed 60 days after the last reply. New replies are no longer allowed.