# PI zero - performance Tips Please

**URL:** <https://discourse.nodered.org/t/pi-zero-performance-tips-please/41305>\
**Category:** General\
**Created:** [19 February 2021 14:38 UTC](https://discourse.nodered.org/t/pi-zero-performance-tips-please/41305 "2021-02-19T14:38:26Z")\
**Posts on this page:** 7\
**Page:** 2

<div class="post-metadata">

**Author:** ![Colin](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/colin/32/17040_2.png) [@Colin](https://discourse.nodered.org/u/Colin)\
**Post date:** [20 February 2021 12:19 UTC](https://discourse.nodered.org/t/pi-zero-performance-tips-please/41305/21 "2021-02-20T12:19:59Z")

</div>

Perhaps I had some other problem that I assumed was the GUI.  
It doesn't bother me as all my rpis run headless and most have never even had a display plugged in. I burn Raspbian Lite and have a script that puts in the wifi credentials, host name, etc for me so I can just plug it in and do the rest via ssh.

---

<div class="post-metadata">

**Author:** ![TotallyInformation](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/totallyinformation/32/31_2.png) [@TotallyInformation](https://discourse.nodered.org/u/TotallyInformation)\
**Post date:** [20 February 2021 12:21 UTC](https://discourse.nodered.org/t/pi-zero-performance-tips-please/41305/22 "2021-02-20T12:21:16Z")

</div>

> [@cymplecy](#):
>
> They are not running real-time reactor control systems

Simon, we all know that you use SCRATCH for your reactor controls 🤣

---

<div class="post-metadata">

**Author:** ![cymplecy](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/cymplecy/32/2773_2.png) [@cymplecy](https://discourse.nodered.org/u/cymplecy)\
**Post date:** [20 February 2021 12:34 UTC](https://discourse.nodered.org/t/pi-zero-performance-tips-please/41305/23 "2021-02-20T12:34:09Z")

</div>

I used to 🙂 But I saw the light and moved onto Node-RED 🙂

Of course, I mainly use @BartButenaers Scratch inspired Blockly node for most of my logic so I never really switched 🙂

Detect number in Alexa received text

 ![image](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/5/e/5e92b89c0cd5022a2528fbccf7c9340cec9689fe.jpeg)

Transcode IR Signals

 ![image](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/f/5/f53f6d4acb382a7ad8c4cd2678fb3b73367f7593.jpeg)

---

<div class="post-metadata">

**Author:** ![StephanStS](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/stephansts/32/28514_2.png) [@StephanStS](https://discourse.nodered.org/u/StephanStS)\
**Post date:** [21 February 2021 16:34 UTC](https://discourse.nodered.org/t/pi-zero-performance-tips-please/41305/24 "2021-02-21T16:34:58Z")

</div>

I propose to use DietPi on the Pi Zero. I have all my Node-RED instances running on it.  
DietPi is optimized for small footprint (e.g. RAM) and easy installation processes, especially for headless applications.  
See there:

- [https://dietpi.com/](https://dietpi.com/)
- [DietPi Documentation - DietPi.com Docs](https://dietpi.com/docs/)

DietPi comes with special "one-click" installers, also for Node-RED: [Hardware Projects - DietPi.com Docs](https://dietpi.com/docs/software/hardware_projects/#node-red).

---

<div class="post-metadata">

**Author:** ![clickworkorange](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/clickworkorange/32/12109_2.png) [@clickworkorange](https://discourse.nodered.org/u/clickworkorange)\
**Post date:** [21 February 2021 23:01 UTC](https://discourse.nodered.org/t/pi-zero-performance-tips-please/41305/25 "2021-02-21T23:01:09Z")

</div>

Just to provide a data point: I have been running a fairly complex house automation system based on Node-RED for the last four years on a Pi2 without any performance or stability issues. I do try to keep message frequency low (how often do you need to check the water temperature?), but some things are polled at second intervals. Flow deployments take maybe 10-15 seconds, and both admin and dashboard UI feel responsive enough not to bother me. RAM usage is high; around 80%, but I think that's slightly misleading; Linux likes to use what RAM is available and there's no (or very little) swap being used. Despite running off a cheap 16 GB MicroSD mounted R/W, and having the occasional "sudden death", I have I have not experienced any reboot failures. I do have a beefy (18 Ah) lead-acid battery backed UPS power supply, but even that runs flat from time to time (mains power can disappear for _days_ here).

---

<div class="post-metadata">

**Author:** ![greggwon](https://avatars.discourse-cdn.com/v4/letter/g/3be4f8/32.png) [@greggwon](https://discourse.nodered.org/u/greggwon)\
**Post date:** [24 February 2021 15:47 UTC](https://discourse.nodered.org/t/pi-zero-performance-tips-please/41305/26 "2021-02-24T15:47:19Z")

</div>

Slow deployment can really be based on how fast nodes shutdown and start up. The shutdown event needs to be asynchronous behavior and then just allow NodeJS management of events to manage the final cleanup. If you are using sockets or other I/O on a limited environment, such as the pi-zero, it make sense to keep I/O close events away from the main flow of shutdown. For any nodes you have created, watch for close events and output some text to show the flow of shutdown so you can evaluate where the real slowdown is occurring. One of the ways to really make it slow is to forget to send back the "done()" call back from close.

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/1X/d073cd938eafa2e558d7c2cd59003b3ef4963033.png) [@system](https://discourse.nodered.org/u/system)\
**Post date:** [25 April 2021 15:47 UTC](https://discourse.nodered.org/t/pi-zero-performance-tips-please/41305/27 "2021-04-25T15:47:32Z")

</div>

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

[Previous page](https://discourse.nodered.org/t/pi-zero-performance-tips-please/41305.md?page=1)
