# Hardware Advice to run a simple data collection flow

**URL:** <https://discourse.nodered.org/t/hardware-advice-to-run-a-simple-data-collection-flow/79804>\
**Category:** General\
**Created:** [14 July 2023 01:51 UTC](https://discourse.nodered.org/t/hardware-advice-to-run-a-simple-data-collection-flow/79804 "2023-07-14T01:51:11Z")\
**Posts on this page:** 8\
**Page:** 1

<div class="post-metadata">

**Author:** ![smanjunath211](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/smanjunath211/32/95742_2.png) [@smanjunath211](https://discourse.nodered.org/u/smanjunath211)\
**Post date:** [14 July 2023 01:51 UTC](https://discourse.nodered.org/t/hardware-advice-to-run-a-simple-data-collection-flow/79804/1 "2023-07-14T01:51:12Z")

</div>

I have a very simple flow which collects and records around 30 inputs from a PLC register every minute and stores the data in a MySQL Database.  
The flow.json size is 50kb.  
The MySQL database is at 96 MB and has a years worth data (30 records /minute \* 365 days) approx 525,600 records x 30 columns  
the database size grows around 0.2 MB every day.  
current setup is one PC running windows 10 with no active users, and set to auto run a NR service to run the collect data from a PLC and database logging flow.

my question is: what is the minimum hardware specification required to run this  
(i am looking a at a Raspberry pi) , If i plan to take a backup of data on daily basis into a cloud storage, but still want to keep a years data on the device. (around 100MB size of data).

---

<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:** [14 July 2023 05:58 UTC](https://discourse.nodered.org/t/hardware-advice-to-run-a-simple-data-collection-flow/79804/2 "2023-07-14T05:58:57Z")

</div>

I run Node-red and MySQL (Mariadb) plus several other services very happily on a Raspberry Pi 4 with 2GB memory and 120GB SSD.  
My database is not as big as yours though, only 1 month's data.

You say 30 records per minute but 525 600 records is just 1 per minute?  
I guess you must have paid due attention to db indexing.  
How long does the daily backup take? I wonder how this will impact your inserts every 2 seconds.

_Minimum_ hardware - Mariadb will run on a Pi Zero 2, so will Node-red, but perhaps not on the same Zero 2.

---

<div class="post-metadata">

**Author:** ![smanjunath211](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/smanjunath211/32/95742_2.png) [@smanjunath211](https://discourse.nodered.org/u/smanjunath211)\
**Post date:** [14 July 2023 08:43 UTC](https://discourse.nodered.org/t/hardware-advice-to-run-a-simple-data-collection-flow/79804/3 "2023-07-14T08:43:58Z")

</div>

> [@jbudd](#):
>
> your inserts every 2 seconds

> [@jbudd](#):
>
> 30 records per minute

I wrote this wrong. 30 individual data register readings from from plc (modbus read), combined into one insert statement to update one row of data with 30 fields. insert statement triggered with cronplus at a once per minute frequency

525600 rows for one year

So a Pi-4 with 2GB should be OK ?

the current setup of a windows PC is fine, but i want to put the complete setup near the PLC module itself so in the event of a network failure i will not lose the data from plc. installing a computer unit near PLC is slightly difficult because of space issue there.

---

<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:** [14 July 2023 18:36 UTC](https://discourse.nodered.org/t/hardware-advice-to-run-a-simple-data-collection-flow/79804/4 "2023-07-14T18:36:35Z")

</div>

> [@smanjunath211](#):
>
> So a Pi-4 with 2GB should be OK ?

I think so but don't blame me if not!

My gut feeling is that between a 2G Pi with a good quality USB 3 SSD vs a 4G Pi with a micro SD card, the first would outperform the second.

---

<div class="post-metadata">

**Author:** ![smanjunath211](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/smanjunath211/32/95742_2.png) [@smanjunath211](https://discourse.nodered.org/u/smanjunath211)\
**Post date:** [15 July 2023 02:08 UTC](https://discourse.nodered.org/t/hardware-advice-to-run-a-simple-data-collection-flow/79804/5 "2023-07-15T02:08:47Z")

</div>

Say, if i do have the budget to go for higher specs on pi, would a 8gb be an overkill or better spend that money on cooling case, SSD etc..

---

<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:** [16 July 2023 08:56 UTC](https://discourse.nodered.org/t/hardware-advice-to-run-a-simple-data-collection-flow/79804/6 "2023-07-16T08:56:51Z")

</div>

> [@smanjunath211](#):
>
> would a 8gb be an overkill

Yes it would. A Pi 3 with a usb disc would handle that with no problems, so a 2GB Pi 4 (with USB disc) will be more than adequate.

---

<div class="post-metadata">

**Author:** ![magicfire](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/magicfire/32/93420_2.png) [@magicfire](https://discourse.nodered.org/u/magicfire)\
**Post date:** [16 July 2023 10:02 UTC](https://discourse.nodered.org/t/hardware-advice-to-run-a-simple-data-collection-flow/79804/7 "2023-07-16T10:02:32Z")

</div>

We company supply a kind of raspberryPi-like hardware.  
It has:  
Built-in NodeRED  
ubuntu system  
RJ45/AI/AO/DI/DO/485/232 ports

If you want more information, don’t hesitate to send mail to [dingning@chvda.com](mailto:dingning@chvda.com)

 ![d84f213e7a1f4e7fa4ff9f85d076a69c](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/0/b/0b3da69bc4461e36a085e4b779f100bd1711b7e7.jpeg)

---

<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:** [30 July 2023 10:02 UTC](https://discourse.nodered.org/t/hardware-advice-to-run-a-simple-data-collection-flow/79804/8 "2023-07-30T10:02:48Z")

</div>

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