For my home automation I have the following system.
HW: RPi 3
OS: Raspbian V11
Node-Red: v2.2.2
NodeRed Dashboard: v3.1.6
I started with my project years ago and builded it up step by step. In the beginning the system responded well below the 100ms mark, what allowed me to control some relays over MQTT that need to switch in a defined time frame for dimming some led spots.
Sins some months I got bigger performance issues and my led spots stopped to work correctly because the switching command for the relays can have delays up to 2-3s. Because I did many things in parallel at that time (not optimal, I know), I cannot tell exactly if it was a Node-Red update a new installed node or something I have programmed that caused this big performance problems. At that point I figured out that the RAM is over 90% "used", but the CPU use is most of the time very low. So my first steps were to uninstall InfluxDB that was in use for experimental stuff, then I uninstalled some extra nodes I had installed (TTS Nodes had a bigger negative impact on my performance) and because it was still not below 1s possible delay times, I reinstalled the full system on a new faster 64GB SD-Card and imported my flows again.
From the following thread I had learned how to interpret the RAM use correctly. In general my problem sounds similar to this one.
Now I have the situation that if my system is rebooted the performance is acceptable (~500ms delay’s) but as the RAM starts to fill up the performance goes down again to around 1s delay’s.
Somehow it looks like it has a connection to the RAM use. But still I believe that the RPi3 with 1GB RAM should be enough to run my project within 100ms response time. Do you have any Idea how I can debug such performance problems? How can I proceed to solve this problem?
It would be very helpful if we could see what needs how much RAM and what needs how long to process.
PS: RPi4 with more RAM is ordered, but as you may know… delivery time…