SD card life on the Pi

Hi all.

I just wondering for those who has been running the R Pi for some time. What is the failure rate on the SD cards as I see some people complain about it ?


That depends on a number of variables;

  • What mode is it being run in - low write or not
  • How reliable is your power supply
  • How many inputs/feeds/feed update interval

Generally speaking if you run the full-write version on a SD card, you are talking a lifespan of months. If you are running in Low-write mode then years.


Also what brand of card I’d say

As amateur photographer I use several brands of cards (cheaper and less cheaper) and that also influences life. As they say, you get what you pay for.

How do I know the mode ?

Lets say the database logs data of 6 inputs every 20 seconds. Its about 7mb per week.

And the what the os needs.

You haven’t told us anything about your installation, but… if you are using Low Write mode, it will say so at the bottom of each emoncms page.
Have a read of the installation guides in Github, it will tell you how to setup Low-Write.


I am talking more of using the Raspberry Pi in general. Not just about EmonCMS on the Pi. As OpenEnergyMonitor is using the Pi assume it is good enough for general data logging. I am just trying to see if failures are really as bad as some peolpe tend to make it to be. But what I have found is that those who do say it fails use the Pi as a media centre using cheap SD cards.

So as Emon runs on the Pi I thought let me ask those who do use it for data logging.

Thank you for you answers.

The standard emonPi / emonBase come with a pre-loaded emonSD SD card which includes Emoncms low write pre-installed with a lot of low-write optimisations. Many users (including myself) have been running Emoncms with low write for several years. There has not been any known SD card failures with low-write emonSD emonBase / emonPi.

However we would recomend you perform regular backups and post data to for backup (free service).


I never lost a SD card and am running on the same SD card for years now. Logging my kWh since 09 Feb 2013 11:00:00 GMT.
I’m not running a low write version as I am running emoncms for web viewing and not the input (emonhub?) as I’m writing directly to mySQL from the same script that reads the meter. (so more a nowrite version).

So that is including running apache and mySQL and the input scrip plus other domotica things (switching lights on and off).


Another alternative is to switch to booting from a USB HDD. Then you only read from the SD card to do the initial part of the boot, the Pi then runs from the HDD. If you use a normal USB HDD then you will probably need a powered USB hub. The WD Pi Drives run from the Pi USB as it has a low power requirement.

I have a zero running emoncms (and some other stuff on node-red and MQTT) using a Pi Drive and one of the newish zero USB hubs (zero4U) that connects to the zero with pogo pins Zero4U - 4 Port USB Hub for Raspberry Pi Zero v1.3 : ID 3298 : $9.95 : Adafruit Industries, Unique & fun DIY electronics and kits. Works a treat. Also recently set up a multi-room music player in a similar configuration, so the music server is again a zero (+zero4U) with a Pi Drive running Squeezeserver. Running from a USB HDD works a treat.


Thanks for the feedback.