Author Topic: SD card flash life on Wx programs using Raspberry Pi  (Read 1766 times)

0 Members and 1 Guest are viewing this topic.

Offline miraculon

  • Sunrise Side Weather
  • Forecaster
  • *****
  • Posts: 2857
  • KE8DAF
    • Sunrise Side Weather in Rogers City MI USA
SD card flash life on Wx programs using Raspberry Pi
« on: October 03, 2015, 08:48:17 AM »
I just replaced my SD card after experiencing problems with GUI log-in, graphs, HTML displays and general malaise with the meteohub based system. With the new SD card, everything is working as it should.

This was about a year and a half of operation. Meteohub is handling the data from several ISSs. I don't know if this puts more wear and tear on the flash than a simple single weather station system or not.

Has anyone else had to replace their SD card on their RaspPi yet? I also had another unit out in the garage that ran a camera and some PiFace utilities previously. This unit has been repurposed for another meteohub station monitoring a VUE console.

I found some "industrial grade" SD cards, especially the Panasonic one with SLC-lite technology.

They claim:
Quote
The QE Series adopts MLC NAND flash memory with "SLC (Single Level Cell) Lite" access mode that provides higher endurance, data retention and power fail robustness than standard MLC products. An extended operating temperature
range of -25C to +85C is suitable for various applications. The integrated enhanced controller ensures long lifetime use and high system performance. Quality is maintained with 100% product screening before shipment to achieve low
failure rate. Storage capacity options include 4GB, 8GB and 16GB models

The true SLC SD card is $253, so that is too much. The SLC-Lite 16GB is $63, which is almost twice what the Pi board costs! If I have to go through this SD card replacement excercise again, I just might try it anyways.

Greg H.




Blitzortung Stations 668, 706 - CWOP CW4114 -  CoCoRaHS MI-PI-1

Offline Bushman

  • Forecaster
  • *****
  • Posts: 6591
    • Eagle Bay Weather
Re: SD card flash life on Wx programs using Raspberry Pi
« Reply #1 on: October 03, 2015, 09:06:23 AM »
I am moving all my Pis to USB stick OS.  http://myblog.furnissathome.co.uk/?p=384

Offline miraculon

  • Sunrise Side Weather
  • Forecaster
  • *****
  • Posts: 2857
  • KE8DAF
    • Sunrise Side Weather in Rogers City MI USA
Re: SD card flash life on Wx programs using Raspberry Pi
« Reply #2 on: October 03, 2015, 09:37:51 AM »
Thanks for the tip and link. It seems that SD card corruption is common on the Pi. Fundamentally, though, the USB stick could suffer from the same issue couldn't it? The USB sticks have flash memory that is accessed via USB instead of the SD card's interface.

I found this on Wikipedia (although I was aware of the read/write life issue before):
Quote
Longevity

The memory in flash drives is commonly engineered with multi-level cell (MLC) based memory that is good for around 3,000-5,000 program-erase cycles,[45] but some flash drives have single-level cell (SLC) based memory that is good for around 100,000 writes. There is virtually no limit to the number of reads from such flash memory, so a well-worn USB drive may be write-protected to help ensure the life of individual cells.

Estimation of flash memory endurance is a challenging subject that depends on the SLC/MLC/TLC memory type, size of the flash memory chips, and actual usage pattern. As a result, a USB flash drive can last from a few days to several hundred years.[46]

Regardless of the endurance of the memory itself, the USB connector hardware is specified to withstand only around 1,500 insert-removal cycles.[47]

This Multi-Level Cell memory may be the Achilles heel of running weather programs on the Pi.

With "3,000-5,000 program-erase cycles" as the life for MLC, using a RPi for a weather program sounds doomed from the start...

Maybe a USB HDD might work? Or maybe I will just treat it like my Davis DFARS fan, just part of an annual ritual..

Greg H.




Blitzortung Stations 668, 706 - CWOP CW4114 -  CoCoRaHS MI-PI-1

Offline Bushman

  • Forecaster
  • *****
  • Posts: 6591
    • Eagle Bay Weather
Re: SD card flash life on Wx programs using Raspberry Pi
« Reply #3 on: October 03, 2015, 11:49:03 AM »
I've read that about USB but I can tell you I have NEVER experienced a USB stick failure.  SD cards OTOH....  (never buy Kingston BTW).  An HD or an SSD would definitely work.  But they cost much more than the Pi itself (for a large one)  I was looking  at making a Pi into a NAS; could run the OS and the storage of the same drive.  BTW, you should clone whatever you use so that downtime is minimized.


Online nincehelser

  • Forecaster
  • *****
  • Posts: 1941
    • nincehelser.com
Re: SD card flash life on Wx programs using Raspberry Pi
« Reply #5 on: October 03, 2015, 02:31:58 PM »
I had problems early on due to voltage drops during writes.  Once I learned to use a more beefy power supply, my problems went away.  In other words, some generic cell-phone power adapters are just too wimpy for use with the Pi, especially if you have power-hungry devices attached to the USB ports.

Quality SD cards (actually all better flash-based devices) use wear-leveling algorithms, so it's typically not a huge concern.  The bigger the memory, the more the wear gets spread out.

I used to deploy USB flash drives by the hundreds at a time.  Once I got a generic lot that was extremely susceptible to "bit rot".  You'd could write data to them and verify that it was correct, but within a few days they would just randomly corrupt while sitting idle.   Fortunately I haven't seen that same problem for a long time.

Offline miraculon

  • Sunrise Side Weather
  • Forecaster
  • *****
  • Posts: 2857
  • KE8DAF
    • Sunrise Side Weather in Rogers City MI USA
Re: SD card flash life on Wx programs using Raspberry Pi
« Reply #6 on: October 03, 2015, 03:29:08 PM »
Quote
a more beefy power supply

How much beefiness should I be looking for? 2A, more? What did you end up with for sufficient write/erase current from the USB supply?

I would appreciate knowing a good value, so I don't have to reinvent the wheel....

Greg H.




Blitzortung Stations 668, 706 - CWOP CW4114 -  CoCoRaHS MI-PI-1

Offline weatherc

  • Senior Contributor
  • ****
  • Posts: 271
Re: SD card flash life on Wx programs using Raspberry Pi
« Reply #7 on: October 03, 2015, 03:56:05 PM »
I runned a Pi on my remote station first running WeeWx. It just caused problems all the time, all kind of odd crashes and hangups. Then i put few more bucks to the show and bought a "Pi-cousin", Cubieboard Cubietruck and a 32 G SSD as external disk and no issues since that. Re poweusage, that combo uses ca 1 watt (0.2 A) as average.

In addition to collecting the weatherdata from the VP2 it also grabs/manage the IP-cam image (reduce its size, adding wxdata on it + uploading the pic) and collecting and uploading data from the solarpanel controller.
« Last Edit: October 03, 2015, 04:24:57 PM by weatherc »

Online nincehelser

  • Forecaster
  • *****
  • Posts: 1941
    • nincehelser.com
Re: SD card flash life on Wx programs using Raspberry Pi
« Reply #8 on: October 03, 2015, 03:57:01 PM »
Quote
a more beefy power supply

How much beefiness should I be looking for? 2A, more? What did you end up with for sufficient write/erase current from the USB supply?

I would appreciate knowing a good value, so I don't have to reinvent the wheel....

Greg H.

1.8A is recommended for a Pi2.  You can get by with less, though.  It just depends on what other things you have hooked up.

When I was having problems with my original Pi, I was running an old adapter of about 0.5A.  The old wifi adapter I was trying to use was also a major power hog.  It was not a good mix.

This link give more detail: https://www.raspberrypi.org/help/faqs/#powerReqs



Offline miraculon

  • Sunrise Side Weather
  • Forecaster
  • *****
  • Posts: 2857
  • KE8DAF
    • Sunrise Side Weather in Rogers City MI USA
Re: SD card flash life on Wx programs using Raspberry Pi
« Reply #9 on: October 03, 2015, 04:49:15 PM »
Thanks.

I am pretty sure that I got the power supply as part of a RPi starter kit. I'll check it the next time I power it down, since I think the current rating is on the 120V plug side and I can't see it right now.

I think that I either got the PS with the RPi as part of a kit, or ordered it at the same time with the PS being recommended.

Greg H.




Blitzortung Stations 668, 706 - CWOP CW4114 -  CoCoRaHS MI-PI-1

 

anything