NAS Best Implementation Practices

Hello there! I would like to move a running Ignition db (PostgreSQL) to a RAID configuration in a NAS to get a more fault tolerant system, but I didn’t find any documentation about this. Do you have any recommendations or considerations to have in mind before I mess up?

Thanks.

Databases (in general, including PostgreSQL) generate a lot of random sector accesses, both read and write. This can produce pathologically slow performance when a parity-type raid array is running degraded (raid4/5/6 w/ failed/missing member). It can be mitigated somewhat by choosing an unusually small chunk size, sacrificing some of the array’s sequential throughput. Use a mirroring raid technology if you can afford the extra disks. (I’m a fan of Linux’s optimized striped-mirror “raid10” implementation, in triple-copy mode.)

Random access also suffers if the network between the DB cpus and the NAS has any conflicting traffic or adds latency.

1 Like

Yes, I’m planning use 4 disk and a Raid10 configuration. I did a few local test before, and I have a little dilemma. The NAS itself has an MySQL Server built in, and I could use this option to host the db, but I would have to migrate from Postgres to MySQL. It shouldn’t be a heavy load for the nas since Ignition uses about 3 queries/sec.
The other option would be use the NAS as a mapped network drive, and move the db file location to this new disk.

I wouldn’t give up PostgreSQL, but I’m known to be somewhat biased… (-:

1 Like