Status report: SD card longevity test

318 views
Skip to first unread message

Thomas Keffer

unread,
Nov 4, 2017, 9:17:40 AM11/4/17
to weewx-user
​I've now had an Sandisk Extreme Plus SD card running on a Raspberry Pi B+ for nearly 3 years straight without a problem.


And, today marks one year of continuous uptime for weewx in this test!

There are two conclusions to making these cards work:
  • Get a good one. I know it seem ironic to spend $30 on storage for a $35 computer, but it makes a big difference.
  • Use an Uninterruptible Power Supply (UPS). It doesn't have to be a very big one, but expect to spend another $50.
So your $35 computer, once it's kitted out with a power supply, WiFi adapter, UPS, and memory card, is more like a $150 computer.

But, the good news is that it's not necessary to buy a hard drive.

Incidentally, in the one year that weewx has been up, it's memory usage has grown from VIRT 49.7MB to 52.7MB, RES from 32MB to 39MB. It has used almost 1136 hours of CPU time, for an average duty cycle of about 13%.

-tk
Message has been deleted

Michi Kaa

unread,
Nov 9, 2017, 1:33:47 PM11/9/17
to weewx-user
Wow, three years are amazing. I've killed two of the same kind you've been using (Sandisk Extreme Plus SD card) after 3 and after 5 months. I ended up moving the raspberry pi's root to a nfs share on my NAS. If you have a NAS, I recommend doing this! https://www.reddit.com/r/raspberry_pi/comments/37n9tb/how_to_nfs_root_on_the_raspberry_pi/

Did you change anything with the logging? The permament writing of the logs seems to kills the SD-cards.

Thomas Keffer

unread,
Nov 9, 2017, 9:59:01 PM11/9/17
to weewx-user
Did you change anything with the logging? The permament writing of the logs seems to kills the SD-cards.


​Nothing special with the logging: just the normal, debug=0, weewx chit-chat.

Are you using a UPS? I think that is a key factor.

-tk

Michi Kaa

unread,
Nov 11, 2017, 2:28:26 PM11/11/17
to weewx-user
No UPS, but what difference could it make? We had 0s (Zero seconds power outages in the last five years (or even longer).

Thomas Keffer

unread,
Nov 12, 2017, 12:22:50 AM11/12/17
to weewx-user
I'm thinking in terms of power spikes, which could damage the disk or its controller.

-tk


On Sat, Nov 11, 2017 at 11:28 AM, Michi Kaa <mits...@mailinator.com> wrote:
No UPS, but what difference could it make? We had 0s (Zero seconds power outages in the last five years (or even longer).

--
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+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Michi Kaa

unread,
Nov 12, 2017, 8:20:03 AM11/12/17
to weewx-user
I see. The AC-adaptor is behind a filter and overvoltage protection. I doubt power related issues are the reason. I really think things like logging, compressing logs an logging on the same physical storage cells over and over again is the real problem. As long as there is no management like with ssd's, the vast majority of sd-cards will die within months if the are used 24/7 in a rPi without any tweaks to reduce write cycles.

Robert Mantel

unread,
Nov 13, 2017, 10:26:30 PM11/13/17
to weewx-user
Great stuff Tom, I had to abandon my Pi as it was starting to get flakey and locking the database.  I totally ported it to my freenas box in a VM for now, but my goal is to get 2 more Pi 3's and create a docker swarm with all three nodes as master nodes.  That way if I loose one, it stays up and I can replace the bad card without interruption.  We're going to be building an off grid house so this will be the brains of the house (including the weather and home automation) so it's going to have to be as bulletproof as possible.  I may connect an SSD to it just for extra storage but keeping the power consumption small will be the key.

Have you tried using USB thumb drives?  I think there is a way to run the OS from them so that the SD card gets minimal reads/writes because they do not have any real mechanisms to balance writes across the media like some thumb drives and SSD's do.

Thomas Keffer

unread,
Nov 14, 2017, 8:11:43 AM11/14/17
to weewx-user
Interesting idea. Can a docker swarm work for a hardware device? I've always thought of them as responding to HTTP requests.

I have not tried a thumb drive. My original intention was to try different drive configurations, but I need the SD card to die first and free up the instrument and RPi. After 3 years, I'm still waiting....

-tk

--

Chris Thompstone

unread,
Nov 14, 2017, 3:58:40 PM11/14/17
to weewx-user
Anyone tried the f2fs filesystem. Suppose to be flash friendly... ?
Would like some feedback on this one.

Robert Mantel

unread,
Nov 20, 2017, 11:07:28 AM11/20/17
to weewx-user
I'm not sure, I'm using the MQTT driver so for me it doesn't matter as I'm not directly interfaced with the weewx hardware.  I've ordered a couple more PI's so I'll let you know how it turns out.  I know I can attach a drive to one of the pi's and have it accessible to the swarm.  My ideal is to have the frequently updated information writing to an SSD attached to my cluster so I can really push the limits of the longevity, so that the SD cards are really only to allow the cluster to boot and then the rest will be driven from the SSD.  I will have it on a UPS as well.
To unsubscribe from this group and stop receiving emails from it, send an email to weewx-user+...@googlegroups.com.

vince

unread,
Nov 20, 2017, 11:22:37 AM11/20/17
to weewx-user
On Monday, November 13, 2017 at 7:26:30 PM UTC-8, Robert Mantel wrote:
Great stuff Tom, I had to abandon my Pi as it was starting to get flakey and locking the database. 

That's generally a sign that you're trying to do too much on the pi and/or your SD card is too slow (or getting ill).    Most people who run into that scenario have fast archive settings meaning the pi can't process all the skins that are enabled before the next time it needs to write to the db.   Typically those folks also have far too many skins enabled for the pi to be able to complete everything in time.

Robert Mantel

unread,
Nov 20, 2017, 1:42:17 PM11/20/17
to weewx-user
That could be as I'm archiving every 2 minutes, I like the granularity it offers.  The Pi3 is quite zippy though so I'm not sure if it's running out of time creating the skins (just standard and SS with RTGD) and I did use a class 10 SD card.  If I can set up my docker swarm with say a ubuntu container running weewx that can access an SSD connected to one of my Pi's that should resolve that issue.  I want to be able to survive a failed SD card and a docker swarm with 3 nodes (none of which are just plain worker nodes) is the minimum to survive a single failed node and continue to function. Might add some worker nodes in the future just for fun, but the goal is to produce a very reliable system that not only logs weather with weewx but will perform other home automation functions via MQTT. 
Reply all
Reply to author
Forward
0 new messages