lilzz
Posts: 411
Joined: Sat Nov 30, 2013 5:27 pm

is flash nand chip more reliable than sdcard

Wed Feb 11, 2015 1:07 am

I heard people's OS image got corrupted on sdcard. Is Nand chip more robust. I never heard BIOS being corrupted on Nand flash chip.

Heater
Posts: 12959
Joined: Tue Jul 17, 2012 3:02 pm

Re: is flash nand chip more reliable than sdcard

Wed Feb 11, 2015 1:23 am

A file system on SD card or FLASH chip is subject to a lot of writes as well as reads. That's why we have file systems on there. Hence the possibility of corrupting data when thing go wrong. Such corruption can happen due to software errors or yanking the power whilst in the middle of writing something. In extreme cases a lot of writing will wear out either device although SD cards have an internal controller that tries to avoid wearing out blocks (google wear levelling)

A PC BIOS on FLASH is hardly ever written to so wearing out that FLASH device is rather unlikely.

simpex
Posts: 45
Joined: Tue Feb 03, 2015 8:40 am

Re: is flash nand chip more reliable than sdcard

Wed Feb 11, 2015 2:27 am

lilzz wrote:I heard people's OS image got corrupted on sdcard. Is Nand chip more robust. I never heard BIOS being corrupted on Nand flash chip.
A SD Card is a NAND flash chip!

A BIOS is usually a NOR flash chip. It can be read as easily as a RAM (unlike SD Cards) but when it comes to write operations after about 10,000 it is over. A NAND flash (SD Card) can withstand 100,000 write cycles.

NAND flash has reduced erase and write times, and requires less chip area per cell, thus allowing greater storage density and lower cost per bit than NOR flash; it also has up to ten times the endurance of NOR flash. However, the I/O interface of NAND flash does not provide a random-access external address bus. Rather, data must be read on a block-wise basis, with typical block sizes of hundreds to thousands of bits. This makes NAND flash unsuitable as a drop-in replacement for program ROM, since most microprocessors and microcontrollers required byte-level random access. In this regard, NAND flash is similar to other secondary data storage devices, such as hard disks and optical media, and is thus very suitable for use in mass-storage devices, such as memory cards.
Source: http://en.wikipedia.org/wiki/Flash_memory

A pocket PC, for instance, may use embedded NOR to boot up the operating system and a removable NAND card for all its other memory or storage requirements.
Source: http://whatis.techtarget.com/definition ... ash-memory
Last edited by simpex on Wed Feb 11, 2015 4:50 am, edited 1 time in total.

simpex
Posts: 45
Joined: Tue Feb 03, 2015 8:40 am

Re: is flash nand chip more reliable than sdcard

Wed Feb 11, 2015 2:55 am

I hope that Raspbian and other operating systems, that run on Raspberry Pi, do not read and especially write all the time the SD card as Windows does on a Hard Disk.

plugwash
Forum Moderator
Forum Moderator
Posts: 3433
Joined: Wed Dec 28, 2011 11:45 pm

Re: is flash nand chip more reliable than sdcard

Wed Feb 11, 2015 3:14 am

The trouble with SD cards (and to a lesser extent SSDs) is that they are a black box, you can't see how the system that maps the flash to some approximation of an ideal block device works, you can't debug it when it doesn't work and it's subject to change at the whim of the SD card vendor so you can't guarantee it will be consistent between production runs.

Whereas with a raw flash chip your device has much more control.

simpex
Posts: 45
Joined: Tue Feb 03, 2015 8:40 am

Re: is flash nand chip more reliable than sdcard

Wed Feb 11, 2015 4:36 am

Raspberry Pi should have a RAM Disk to transfer the OS from the SD Card in a RAM partition, when the board is powered, and then the OS should run from RAM till a shut down command is given that will save various changes, made in the RAM partition, back to the SD Card.

SD cards are simply not suited to act as Hard Disks. They are aimed at storing files, pictures, documents, etc.. Frequent write operations, and this is what an OS does for its internal needs, deteriorate SD cards.

Heater
Posts: 12959
Joined: Tue Jul 17, 2012 3:02 pm

Re: is flash nand chip more reliable than sdcard

Wed Feb 11, 2015 4:48 am

simplex,
[quote]
Frequent write operations, and this is what an OS does for its internal needs,
[quote]
No. Unless your Linux system has swap enabled it is doing very little writing to it's file system. Do not enable swap on an SD. You don't want to anyway because if you actually need swap it will be so slow as to be useless anyway.

Anyway:

We don't have enough RAM to put all the OS in there.

You are free to use a RAM file system for you application or other data if you think it is going to be heavily rewriting stuff.

Of course when the power is cut, poof all you recent data is lost. Great.

It is possible to run your system with the SD file system mounted as read only if you want to be sure it is never written to.

rln
Posts: 173
Joined: Wed Apr 09, 2014 1:43 pm
Location: Sweden
Contact: Website

Re: is flash nand chip more reliable than sdcard

Wed Feb 11, 2015 9:52 am

simpex wrote:Raspberry Pi should have a RAM Disk to transfer the OS from the SD Card in a RAM partition, when the board is powered, and then the OS should run from RAM till a shut down
Hi
There are several OS available that operate entirely from RAM. Tiny Core and my Nard SDK comes to mind but here are other too.
Author of the robust Nard distro http://www.nard.se

Return to “General discussion”