Hardware Advice to run a simple data collection flow

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).

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.

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.

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.

2 Likes

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..

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.

1 Like

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

1 Like

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