How long will an SD card last?

307 views
Skip to first unread message

Tom Keffer

unread,
Sep 1, 2024, 3:23:51 PM9/1/24
to weewx-user
Almost 10 years ago I started an experiment on how long an SD card can last in the WeeWX environment. You can see the environment here.

When the experiment started, Squeeze (Debian 6) on an RPi B+ was state of the art. We've now gone on through 4 new generations of Pi's, and 6 generations of Debian.

I'm finally bringing the experiment to a halt today, just short of its 10th anniversary,  not because the card failed, but because the version of ssh it uses is so obsolete that my cloud server refuses to accept a connection any longer.

I could install the latest version of Raspberry Pi OS, but I'd like that corner of my desk back.

Conclusion? There is no reason not use an SD card as your primary storage if you do the following:
  • Get a good one. I used a SanDisk Extreme Plus, which is still available.
  • Buy a big one so the wear-leveling algorithm has lots of space to work with.
  • Use a UPS (Uninterruptible Power Supply). This cuts down on electrical transients.
  • Run a backup!
-tk

Karen K

unread,
Sep 1, 2024, 4:05:31 PM9/1/24
to weewx-user
Thank you for sharing this experience.

Ferran Vidal Marginet

unread,
Sep 1, 2024, 5:07:43 PM9/1/24
to weewx-user
Uau! Nearly 10 years. Can you share with us which ups did you use?
I tried, some years ago, to run a weewx installation on my raspberry but abandoned it because of the microcuts of supply.
Many thanks and congrats for this awesome piece of software!
Ferran

El dia diumenge, 1 de setembre del 2024 a les 21:23:51 UTC+2, Tom Keffer va escriure:

Tom Keffer

unread,
Sep 1, 2024, 5:11:28 PM9/1/24
to weewx...@googlegroups.com
I use a 750VA UPS from APC.

But, really, any UPS will do. The important thing is to replace its battery regularly. After about 4 years they have only half their original capacity.

--
You received this message because you are subscribed to the Google Groups "weewx-user" group.
To unsubscribe from this group and stop receiving emails from it, send an email to weewx-user+...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/weewx-user/e3ad6455-b010-40d3-9236-e1ebcd6d1a9an%40googlegroups.com.

vince

unread,
Sep 1, 2024, 5:25:02 PM9/1/24
to weewx-user
I have 'never' failed a SD card in any raspberry pi that uses the microSD format (zero variants, pi3, pi4, pi5 variants). I use https://www.amazon.com/gp/product/B073JWXGNT for over 5 years now if that helps any in picking a card to buy.  Fast enough and very very solid quality.

Unless you have terrible power stability, even a surge protector is good enough to get to 100% uptime.  You don't need a UPS at all unless you have particularly bouncy power.

Gentil de Bortoli Jr

unread,
Sep 1, 2024, 5:43:51 PM9/1/24
to weewx...@googlegroups.com
Thank you for sharing this!

I've been using microSD since 2019, when I started with WeeWX. 

Running a backup is the most important thing, for sure, and a very easy task. 

--
You received this message because you are subscribed to the Google Groups "weewx-user" group.
To unsubscribe from this group and stop receiving emails from it, send an email to weewx-user+...@googlegroups.com.

Graham Eddy

unread,
Sep 2, 2024, 12:32:28 AM9/2/24
to WeeWX User
if it is just the default cipher that the target server is refusing, override it in your ssh client defaults (try running ssh -v)
⊣GE⊢

paul.ba...@gmail.com

unread,
Sep 3, 2024, 5:43:45 PM9/3/24
to weewx-user
My Weewx (5.1) run on a Rpi400 (a RPi4 in the keyboard with 4 GB of memory) for a little more than 3 Years, without any glitch. The loop interval is 300 s, the dB server is mariadb/mysql on the Rpi. In addition and in parallel, I run 4 heavy batch programs (BOINC), so that the RPi is always (very) busy. The mean temperature of the cpu is ~60 centigrad, around 160 F. This is a lot but is very stable over time, avoiding thermal shocks. The SSD (129 GB) is hot too. It is 65 % full. No UPS (but we are in Switzerland with almost no power interruption).

The archive is 128 MB for 600 K records. It is backuped every day on two other server, not RPi... Further more, the data from the Tenpest weather station are also recorded on an other computer.

From experience, I  found one major difference between various SSD, that is their power consumption. The one in use is a low consumer one.

This system was build to stretch the RPi, may be overstretch, but until now, it runs perfectly.

Hope this helps other !       regards,     Paul

michael.k...@gmx.at

unread,
Sep 9, 2024, 2:22:24 AM9/9/24
to weewx-user
Here is my n=1 study:
With every generation of the Raspberry Pi, from the first onward, up until the RPi4, I had been very successful destroying my SD-Cards (also the mentioned SanDisk Extreme), USB-Sticks and even SSDs. The SSD lasted a bit more than two years. The only time the storage didn't get corrupted, was when I mounted / on a nfs file syste on my NAS. But this was only an episode of a couple of months, most of the SD cards also survived such a time span.

A couple of months ago I abandoned the RPi for a Zotac ZBOX with a data center grade SSD. Time will tell, if this choice will last.

Karen K

unread,
Sep 9, 2024, 3:22:59 AM9/9/24
to weewx-user
There were some comments about UPSs some posts before saying they are not really necessary. And when I read the post of Michael.K I remember another thing. It were not SD-Cards or RPis, that failed repeatedly, but LED lamps. So we measured the grid voltage in our home and recorded the readings during one year. It turned out, that it was always near the upper limit, and sometimes even above it. We then complained to the electric power supplier company and presented our measurements. They reacted very quickly and changed the settings of the transformer. Since then the voltage is within the limits. I guess this can influence the lifetime of the equipment, too. I know, there is a power supply between grid and RPi that transforms the voltage. But it cannot always filter all peaks of overvoltage.

Graham Eddy

unread,
Sep 9, 2024, 5:11:46 AM9/9/24
to WeeWX User
the way it was explained to me is that the bane of the SD card is power loss during write cycle. if that can be done without a UPS, then great
⊣GE⊢

vince

unread,
Sep 9, 2024, 2:06:56 PM9/9/24
to weewx-user
Yup.  Bad power and writes are a bad combination.  Surge suppressors help there.

I simply put /var/log into tmpfs and other than writing the archive db and html files once per 5 minutes there are no writes to disk at all.  You do lose the logs on a reset but it's a minor thing.  Typically you don't ever look at them.

I typically add this to /etc/fstab on all my pi and have never had a failure since.   You do sometimes need to add something to rc.local to make subdirectories under /var/log that daemons expect (/var/log/nginx to name one) but that's minor stuff.

#---- put logs and tmp dirs in ramdisk  ---
tmpfs           /tmp            tmpfs   defaults,nosuid,mode=0755,nodev,noatime   0       0
tmpfs           /var/log        tmpfs   defaults,nosuid,mode=0755,nodev,noatime   0       0
tmpfs           /var/tmp        tmpfs   defaults,nosuid,mode=0755,nodev,noatime   0       0

Ξ

unread,
Sep 27, 2024, 11:32:38 AM9/27/24
to weewx-user
I've been running this SD card for more than 10 years – since April 2014.
R-Pi Model B, no UPS
Arch Linux
20240927_175829.jpg
Reply all
Reply to author
Forward
0 new messages