# Raspberry Pi Zero W with mosquitto, node-red, influxdb, grafana, pivpn

**URL:** <https://discourse.nodered.org/t/raspberry-pi-zero-w-with-mosquitto-node-red-influxdb-grafana-pivpn/64634>\
**Category:** Hardware\
**Created:** [3 July 2022 14:27 UTC](https://discourse.nodered.org/t/raspberry-pi-zero-w-with-mosquitto-node-red-influxdb-grafana-pivpn/64634 "2022-07-03T14:27:53Z")\
**Posts on this page:** 10\
**Page:** 1

<div class="post-metadata">

**Author:** ![mojgithub](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/mojgithub/32/63532_2.png) [@mojgithub](https://discourse.nodered.org/u/mojgithub)\
**Post date:** [3 July 2022 14:27 UTC](https://discourse.nodered.org/t/raspberry-pi-zero-w-with-mosquitto-node-red-influxdb-grafana-pivpn/64634/1 "2022-07-03T14:27:53Z")

</div>

Hi,

i would like to put these(mosquitto, node-red, influxdb, grafana, pivpn) on my Rasp Pi hardware.

i have tried with my Raspberry Pi Zero W but i guess it is not capable of handling all this stuff(single CPU). After some time it gets really hot and it shutdown. So i have used cmd "top" to see load average. After some time it is above 5. Good is under 1. See image.

So my question is which hardware do i need to run all this stuff.

In my local store i can get Rasp Pi 4 with 1Gb. Is this enough? It is in stock.

or

I can wait for Rasp Pi 4 with 2gb. There is no stock.

 ![top](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/d/6/d62a02336f2c90cc4b2b268901b92e0e595cf214.png)

---

<div class="post-metadata">

**Author:** ![grant1](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/grant1/32/49890_2.png) [@grant1](https://discourse.nodered.org/u/grant1)\
**Post date:** [3 July 2022 15:01 UTC](https://discourse.nodered.org/t/raspberry-pi-zero-w-with-mosquitto-node-red-influxdb-grafana-pivpn/64634/2 "2022-07-03T15:01:38Z")

</div>

To free up space & resources on your Pi Zero, and assuming your Pi Zero is connected to the Internet, have you considered using the free cloud versions of [InfluxDB](https://www.influxdata.com/influxdb-cloud-pricing/) and [Grafana](https://grafana.com/pricing/)?

---

<div class="post-metadata">

**Author:** ![mojgithub](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/mojgithub/32/63532_2.png) [@mojgithub](https://discourse.nodered.org/u/mojgithub)\
**Post date:** [3 July 2022 15:08 UTC](https://discourse.nodered.org/t/raspberry-pi-zero-w-with-mosquitto-node-red-influxdb-grafana-pivpn/64634/3 "2022-07-03T15:08:18Z")

</div>

No i will not use any free cloud ever again. I want to have everything local.

My question is if Pi Zero is capable of handling all mentioned services or not. And if not is Pi 4 1Gb enough or i need Pi 4 2gb or more?

---

<div class="post-metadata">

**Author:** ![jbudd](https://avatars.discourse-cdn.com/v4/letter/j/5f8ce5/32.png) [@jbudd](https://discourse.nodered.org/u/jbudd)\
**Post date:** [3 July 2022 15:20 UTC](https://discourse.nodered.org/t/raspberry-pi-zero-w-with-mosquitto-node-red-influxdb-grafana-pivpn/64634/4 "2022-07-03T15:20:26Z")

</div>

I found node-red, grafana and influx was more than my Pi (3B) was happy with but I have no actual measurements of memory/CPU usage or I/O.

I think a Pi 4 would handle all these services, especially if you run it on a well matched SATA SSD.  
Don't know about memory requirements though; I dropped influxdb and grafana.

---

<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:** [3 July 2022 15:31 UTC](https://discourse.nodered.org/t/raspberry-pi-zero-w-with-mosquitto-node-red-influxdb-grafana-pivpn/64634/5 "2022-07-03T15:31:20Z")

</div>

A pi4 should do it with no problems, though as always it depends on the data rate. If you were trying to save thousands of points a second to influx, for example, then probably not. 1GB would likely be enough, but the extra cost for 2GB is small, if I remember correctly, so probably worth going for that, for future proofing.

---

<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:** [3 July 2022 15:34 UTC](https://discourse.nodered.org/t/raspberry-pi-zero-w-with-mosquitto-node-red-influxdb-grafana-pivpn/64634/6 "2022-07-03T15:34:21Z")

</div>

Further to this I advise against using influx on the SD card, use an external USB disk.

---

<div class="post-metadata">

**Author:** ![mudwalker](https://avatars.discourse-cdn.com/v4/letter/m/47e85d/32.png) [@mudwalker](https://discourse.nodered.org/u/mudwalker)\
**Post date:** [4 July 2022 12:56 UTC](https://discourse.nodered.org/t/raspberry-pi-zero-w-with-mosquitto-node-red-influxdb-grafana-pivpn/64634/7 "2022-07-04T12:56:20Z")

</div>

Not sure if this is of use...

I have had Node-Red, Mosquitto, Influxdb and Grafana running on my 2Gb RPi 4 since January 2021, this was to replace the RPi 3 Model B. Installed OS on external disk drive to save wear on an SD card and it has run with no problems. Batch of data sent to Influxdb about every second (on average).

 ![Screenshot from 2022-07-04 13-51-35](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/4/e/4e0dcbac096b57332b9aab63dd809bebbfe17ba7.png)

---

<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:** [4 July 2022 20:33 UTC](https://discourse.nodered.org/t/raspberry-pi-zero-w-with-mosquitto-node-red-influxdb-grafana-pivpn/64634/8 "2022-07-04T20:33:02Z")

</div>

There really is no need to install the OS on an external disc. It is the influx data that is better there, unless you have only a small database that is not updated too rapidly.

---

<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:** [4 July 2022 20:51 UTC](https://discourse.nodered.org/t/raspberry-pi-zero-w-with-mosquitto-node-red-influxdb-grafana-pivpn/64634/9 "2022-07-04T20:51:49Z")

</div>

> [@jbudd](#):
>
> I found node-red, grafana and influx was more than my Pi (3B) was happy with but I have no actual measurements of memory/CPU usage or I/O.

As mentioned in another thread, I've had a lot more than that running happily on a Pi2. My Pi3 ran the whole stack minus the VPN for some years.

The VPN I wouldn't personally try to run with everything else. It is likely to be quite heavy on resources since it has to handle the encryption in software as well has all of the routing of the network traffic. I don't believe that the smaller Pi's handle network traffic well along side dealing with the SD-Card interface (share the same bus?)

> [@Colin](#):
>
> Further to this I advise against using influx on the SD card, use an external USB disk.

Again, I had no issues running this on an SD-Card for several years. Just get an oversized card that has wear levelling such as the Samsung EVO/EVO-Pro.

Of course this was a fairly small requirement with a dozen or so sensors and switches plus all of the Pi system data, MQTT, etc.

---

<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:** [2 September 2022 20:51 UTC](https://discourse.nodered.org/t/raspberry-pi-zero-w-with-mosquitto-node-red-influxdb-grafana-pivpn/64634/10 "2022-09-02T20:51:52Z")

</div>

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