geerlingguy / drupal-pi

Drupal on Docker on a Raspberry Pi. Pi Dramble's little brother.
https://www.pidramble.com
MIT License
110 stars 25 forks source link

Performance/Lifespan Considerations #9

Closed nateswart closed 9 years ago

nateswart commented 9 years ago

Would it be worth trying to configure drupal-pi to rely less on the sd card and instead run out of memory as much as possible?

I saw this concept while reading about extending the lifespan of sd cards here: http://www.makeuseof.com/tag/extend-life-raspberry-pis-sd-card/

but perhaps it would have performance gains as well, especially when users have a slower sd card?

geerlingguy commented 9 years ago

True; I actually explore this concept a lot more in the Raspberry Pi Dramble project and wiki. I was testing using an external USB 3.0 SSD connected to one Pi, accessed via the network as an NFS share, for Drupal's filesystem operations. This did show a tiny bit of a performance gain, and it would definitely make sure the microSD cards in the Pis had less write activity.

However, if you're looking into increasing the longevity of <$10 microSD cards, I'd rather recommend purchasing a few backup cards or have a 'hot spare' Raspberry Pi. Having a slower computer with a flaky storage system is a great way to learn the lesson of having reliable and easily-restorable backups!

And it's something I might add to the Drupal Pi project—some role that sets up automated backups to some cloud provider for the installed Drupal site.

One note: of the 25 or so microSD cards I've purchased for the 12 Pis, Banana Pi, Orange Pi, etc. over the past three years, only one has had any flakiness... and it still works, but I retired it because there were a couple instances where a file corrupted. For the Dramble, I'm reconfiguring it to have a MySQL master/slave so the DB is reliable, and the filesystem for the webservers is shared/redundant via GlusterFS. Software solutions > extra hardware, imo :)