# 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:** 20\
**Page:** 1

<div class="post-metadata">

**Author:** ![ScheepersJohan](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/scheepersjohan/32/39556_2.png) [@ScheepersJohan](https://discourse.nodered.org/u/ScheepersJohan)\
**Post date:** [19 February 2021 14:38 UTC](https://discourse.nodered.org/t/pi-zero-performance-tips-please/41305/1 "2021-02-19T14:38:26Z")

</div>

Hi,

I have a PI Zero W and are running node-red with 32 nodes on it, it is very slow. Takes a good 15 to 30 sec to deploy the flow if not longer (most of the time longer and the dashboard even longer).

Is this normal or not?

What are you experience with the Pi Zero W?

Any one with some performance TIPs for the Pi Zero?

(I do understand the limitations of the processor in the Zero, Just seems very slow to me)

---

<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:** [19 February 2021 14:46 UTC](https://discourse.nodered.org/t/pi-zero-performance-tips-please/41305/2 "2021-02-19T14:46:16Z")

</div>

What else is running on the Pi?

I assume you are not running a desktop?

Can you show us the output from the `top` command?

---

<div class="post-metadata">

**Author:** ![LosinIt](https://avatars.discourse-cdn.com/v4/letter/l/439d5e/32.png) [@LosinIt](https://discourse.nodered.org/u/LosinIt)\
**Post date:** [19 February 2021 15:35 UTC](https://discourse.nodered.org/t/pi-zero-performance-tips-please/41305/3 "2021-02-19T15:35:43Z")

</div>

The Zero W is very limited in processing power and with only Wi-Fi for connectivity it makes a poor choice for NR. I suggest replacing it with a Pi3, or better, and connecting via Ethernet.

---

<div class="post-metadata">

**Author:** ![ScheepersJohan](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/scheepersjohan/32/39556_2.png) [@ScheepersJohan](https://discourse.nodered.org/u/ScheepersJohan)\
**Post date:** [19 February 2021 15:45 UTC](https://discourse.nodered.org/t/pi-zero-performance-tips-please/41305/4 "2021-02-19T15:45:22Z")

</div>

I have a very small application switching one relay based on time and on based on temperature.

---

<div class="post-metadata">

**Author:** ![ScheepersJohan](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/scheepersjohan/32/39556_2.png) [@ScheepersJohan](https://discourse.nodered.org/u/ScheepersJohan)\
**Post date:** [19 February 2021 15:48 UTC](https://discourse.nodered.org/t/pi-zero-performance-tips-please/41305/5 "2021-02-19T15:48:01Z")

</div>

> [@TotallyInformation](#):
>
> Can you show us the output from the `top` command?

Top command?

Have desktop running as I want to show one page on the dashboard to set time for my relay and temp for the other relay.

---

<div class="post-metadata">

**Author:** ![JGKK](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/jgkk/32/18515_2.png) [@JGKK](https://discourse.nodered.org/u/JGKK)\
**Post date:** [19 February 2021 15:55 UTC](https://discourse.nodered.org/t/pi-zero-performance-tips-please/41305/6 "2021-02-19T15:55:17Z")

</div>

> [@ScheepersJohan](#):
>
> Have desktop running as I want to show one page

Thats a very bad idea on a pi zero. Its only really useful running with a minimal headless installation as running the full desktop environment on it especially with something like a browser running will make it nearly unusable for things such as nodered.  
Its really quite useable for simple nodered flows if you use the lite version of the os and run it headless and remote operate it but if you want to run anything like a desktop on it as well id recommend at least a raspberry pi 3a+ which is often overlooked. Its still cheaper and has a smaller form factor than a normal Pi 3 or 4 but is quite adequate for a simple set up even non headless.

Johannes

---

<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:** [19 February 2021 16:01 UTC](https://discourse.nodered.org/t/pi-zero-performance-tips-please/41305/7 "2021-02-19T16:01:38Z")

</div>

`top` is a Linux command line app that shows you what is running and the performance metrics of your OS.

> [@ScheepersJohan](#):
>
> Have desktop running

Yup, there's the problem. A Pi Zero is nowhere near powerful enough to run a Linux desktop along with everything else and have any kind of useful performance.

> [@JGKK](#):
>
> recommend at least a raspberry pi 3a+ which is often overlooked

Yup.

---

<div class="post-metadata">

**Author:** ![krambriw](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/krambriw/32/5429_2.png) [@krambriw](https://discourse.nodered.org/u/krambriw)\
**Post date:** [19 February 2021 17:55 UTC](https://discourse.nodered.org/t/pi-zero-performance-tips-please/41305/8 "2021-02-19T17:55:37Z")

</div>

Add MQTT to your PiZero, then publish the data to a broker and use a separate computer to connect and visualize the data

---

<div class="post-metadata">

**Author:** ![ScheepersJohan](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/scheepersjohan/32/39556_2.png) [@ScheepersJohan](https://discourse.nodered.org/u/ScheepersJohan)\
**Post date:** [19 February 2021 19:33 UTC](https://discourse.nodered.org/t/pi-zero-performance-tips-please/41305/9 "2021-02-19T19:33:41Z")

</div>

> [@JGKK](#):
>
> like a browser running will make it nearly unusable for things such as nodered

How do you mange you flows without a browser?

Suppose you could just replace the \*.json file, but not to easy to fault find.

---

<div class="post-metadata">

**Author:** ![ScheepersJohan](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/scheepersjohan/32/39556_2.png) [@ScheepersJohan](https://discourse.nodered.org/u/ScheepersJohan)\
**Post date:** [19 February 2021 19:37 UTC](https://discourse.nodered.org/t/pi-zero-performance-tips-please/41305/10 "2021-02-19T19:37:18Z")

</div>

> [@krambriw](#):
>
> MQTT to your PiZero

I do have a 3B+ I mqtt the data to an wright the metrics to Influx BD and visualize on Grafana.

Suppose I can mqtt the metrics for controlling the relay from the 3B+ as well.

---

<div class="post-metadata">

**Author:** ![JGKK](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/jgkk/32/18515_2.png) [@JGKK](https://discourse.nodered.org/u/JGKK)\
**Post date:** [19 February 2021 19:46 UTC](https://discourse.nodered.org/t/pi-zero-performance-tips-please/41305/11 "2021-02-19T19:46:50Z")

</div>

The browser that you access the flow editor with doesn’t have to run on the pi that node-red runs on. On the pi only the server side code has to run. All my Raspberries are actually headless setups and I do most of the flow editing from the browser on my iPad-pro if that’s what you mean. Just point any browser on a machine in the same network at the pi and port of the machine running node-red.

---

<div class="post-metadata">

**Author:** ![aderici](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/aderici/32/37279_2.png) [@aderici](https://discourse.nodered.org/u/aderici)\
**Post date:** [19 February 2021 19:54 UTC](https://discourse.nodered.org/t/pi-zero-performance-tips-please/41305/12 "2021-02-19T19:54:10Z")

</div>

Hi,

I had a similar problem, turns out the sd card i have chosen sucked.

Sd cards are in very different performance categories.

After changing that it started performing fine

My new one said

class 10  
A1  
U3  
V30

---

<div class="post-metadata">

**Author:** ![ScheepersJohan](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/scheepersjohan/32/39556_2.png) [@ScheepersJohan](https://discourse.nodered.org/u/ScheepersJohan)\
**Post date:** [19 February 2021 19:54 UTC](https://discourse.nodered.org/t/pi-zero-performance-tips-please/41305/13 "2021-02-19T19:54:43Z")

</div>

Thanks, yes, slipped me, just point from any device on same network to the IP (xx.xx.xx.xx:1880)

---

<div class="post-metadata">

**Author:** ![ScheepersJohan](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/scheepersjohan/32/39556_2.png) [@ScheepersJohan](https://discourse.nodered.org/u/ScheepersJohan)\
**Post date:** [19 February 2021 19:58 UTC](https://discourse.nodered.org/t/pi-zero-performance-tips-please/41305/14 "2021-02-19T19:58:26Z")

</div>

I have see that the SD are critical in good performance on the PI, I use class 10 or better and only manufactured by the better know houses. The no name brands are really no name no performance.

---

<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:** [19 February 2021 21:13 UTC](https://discourse.nodered.org/t/pi-zero-performance-tips-please/41305/15 "2021-02-19T21:13:10Z")

</div>

> [@ScheepersJohan](#):
>
> I have see that the SD are critical in good performance on the PI

I don't think the SD card performance is likely to be significant on a Zero. They should be good quality (not unbranded cheap ones) though. The problem here is trying to run a browser on a Zero. Even on Pi3 it is marginal. You really need a 4 to run a full desktop and browser.  
For running node-red though there is not problem, just don't connect a display and even better disable the GUI in raspi-config. I think you can do that can't you?

---

<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:** [19 February 2021 23:39 UTC](https://discourse.nodered.org/t/pi-zero-performance-tips-please/41305/16 "2021-02-19T23:39:43Z")

</div>

T o counter all the posts saying don't run a desktop on a PiZero - I have 6 of them running the standard desktop and Node-RED at same time 🙂

What you can't really do, is run a broswer on a Pi Zero, to edit Node-RED at the same time.

As others have said, run a browser on another computer to do that

I don't run Dashboards, so don't know about the impact of running them

---

<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:05 UTC](https://discourse.nodered.org/t/pi-zero-performance-tips-please/41305/17 "2021-02-20T12:05:17Z")

</div>

> [@cymplecy](#):
>
> I don't run Dashboards, so don't know about the impact of running the

They are heavyweight because they do so much hand-holding for you. Also the Angular v1 framework is very heavy - Until Dave optimised things, it wouldn't run at all on mobile browsers for example.

---

<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:09 UTC](https://discourse.nodered.org/t/pi-zero-performance-tips-please/41305/18 "2021-02-20T12:09:34Z")

</div>

> [@cymplecy](#):
>
> T o counter all the posts saying don't run a desktop on a PiZero - I have 6 of them running the standard desktop and Node-RED at same time

That is interesting, perhaps the desktop is now more efficient than it was when I try tried it (quite a long time ago I must admit).

---

<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:10 UTC](https://discourse.nodered.org/t/pi-zero-performance-tips-please/41305/19 "2021-02-20T12:10:59Z")

</div>

I think provided the browser is not being run on the pi then the overhead of running the dashboard in node-red should not be an issue, unless it is complex.

---

<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:14 UTC](https://discourse.nodered.org/t/pi-zero-performance-tips-please/41305/20 "2021-02-20T12:14:42Z")

</div>

3 of them are running Jessie so they've been running for quite a long time 🙂

They are not running real-time reactor control systems 🙂 but do interpret and relay IR codes from one to another via central MQTT server

So short messages no greater than 100ms intervals

Or applying a sweep colour change to 100 Neopixels when Cheerlightscolour changes

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