Load on my RPI seems a bit high

Sorry folks if it is not covered by NodeRed, but I have to start somewhere.

I have a RPI and after recent problems things have gone ..... weird.

This is the machine specs:

alias sysinfo='cat /sys/firmware/devicetree/base/model;echo "";echo"";cat /etc/os-release;echo "";cat /etc/rpi-issue'

pi@TimePi:~ $ sysinfo
Raspberry Pi Model B Rev 2

PRETTY_NAME="Raspbian GNU/Linux 9 (stretch)"
NAME="Raspbian GNU/Linux"
VERSION_ID="9"
VERSION="9 (stretch)"
ID=raspbian
ID_LIKE=debian
HOME_URL="http://www.raspbian.org/"
SUPPORT_URL="http://www.raspbian.org/RaspbianForums"
BUG_REPORT_URL="http://www.raspbian.org/RaspbianBugs"

Raspberry Pi reference 2018-03-13
Generated using pi-gen, https://github.com/RPi-Distro/pi-gen, 00013d7972122d1304aacda8fff5098f073ceb43, stage5

The flows have not really changed. If anything I have re-written a few of the nodes and taken out a lot of old code/nodes.

But looking at the RPI, it is running 100% most of the time.
Originally it was pulsing up and down from abut 70% to 100% every 10 or so seconds.
Now it just seems to be stuck on 100% load.
This is a screen shot via a virtual network.

This is what TOP says:

The question as I see it is:
Am I flogging a dead horse? (Expecting too much from that RPI?)

So, you are running on a Pi2 - same as my current live device which also runs InfluxDB, Mosquitto, Grafana, Telegraf. The big difference for me is that I don't run the desktop GUI, I run headless which saves a ton of resources. I use Kitty (a nicer clone of PUTTY) on a Windows 10 PC as a remote SSH client.

Even so, you can see that Node-RED is using 30% memory - that is massive. Mine is running at 14%. Also, my CPU for NR runs up to about 10%. Swap is fine so it isn't that that is causing an issue.

So you probably want to kill off the desktop and run headless. Then you need to know what is maxing out your CPU. This can be challenging to work out with Node-RED. Mainly involves trying to turn things off or delete parts of your flow until you find the culprit.

1 Like

Thanks.

(Again: sorry in advance and post....)

I was mucking about with VNC and the like.

I was using TightVNC but it was not playing nicely and so I tried X11VNC.

That brought its own set of problems.
As the RPI is headless when I got the VNC working and connected, (at 1366x768) the RPI was being flogged.

In the mean time I dropped the resolution back to 1120x630.

WOW! Now the load is a lot less.

Seems X11VNC was causing the problem.

Now the load is back to about 50-70%, peaking now and then when tasks are scheduled.

Not running 100% 100% of the time.

Sorry about that.

I am only keeping the GUI active because I sometimes like to log in and see things from the GUI perspective to do things.

This is because I am not good enough to do all things from the CLI/Terminal.

Maybe when time goes by, I can get better at CLI stuff and won't need the GUI/Desktop.

Picture to show the reduced load now.

Oh, (and AGAIN: SORRY......)

As you have the same RPI, I am hoping you could maybe save me some pain with another problem that I still can't find enough confidence to tackle.....

WAP.

I used to have it working until it died one day after an update and was running Jessie.

That prompted me to update the entire system to Stretch and "get with the program".

The WAP is an EDIMAX which I know is supported and I have the stuff to help with that.
It is just I have seen 3 versions of the RPI O/S. Wheezy - just - Jessie, and Stretch.

Somewhere I was reading (way back) that "systemd is being deprecated". Ok. What ever.
I am searching threads on how to set up a WAP on Stretch and some say that you DO NOT EDIT ...... a file.
Another thread says you do.
Because neither really specify which O/S they refer, I am at a loss.
(Though I have a slight feeling they were both for Stretch.)
So I am really confused about the "right way" to do it.

Would you mind showing me a known working way to do it?

I am reluctant to start because I have also read that: "if you do it wrong, you are in for a whole lot of pain fixing things." and as I am not too smart with that stuff I am cautious about starting it again.

Any VNC app causes a copy of the desktop to be run. I'd ditch it altogether, what do you really need it for? There are gui desktop apps for remote file management and for remote command lines - that's 90%+ of all needs. I also run Webmin but only on my Pi3 - that gives me other alternatives for remote management of files and services but the best feature is the auto- apt updates.

Here is the CPU utilisation over time for my Pi2

And the memory utilisation:

System Load is a decent measure of overall load on the system:

The system has been up for well over 9 weeks - last reboot was after a major set of apt updates.

1 Like

Thanks.

Well, as is now: I don't have X11VNC running.
Haven't go the "autostart" working.
If I need it, I will SSH to the machine and start it.
It stops when I close the CLI, so that's something that helps keep the load down.

1 Like

Does not this work to enable autostart?

sudo systemctl enable nodered

The autostart for the VNC.

Given that VNC increases the load unnecesserally (spelling?) I will leave it as is.

If I need the VNC, I will SSH and start it.