Changes

Jump to: navigation, search

MISC-TN-017: Persistent storage and read-write file systems

1,034 bytes added, 16:30, 20 January 2021
Experimental measurement of the actual written data
This Technical Note deals with the use of read/write file systems in combination with such memories.
 
=== Example: embedded Linux system equipped with a raw NAND flash memory and UBIFS file system ===
On embedded Linux system, raw NAND are commonly managed by MTD/UBI subsystems and, on top of them, UBIFS to manage files
 
We suggest to take a look at our [[Memory Tecnology Device (MTD)]] article where these subsystems are explained in more details, prior taking a look at this examples
==Wear-out==
This example shows how to estimate the lifetime of a raw NAND flash memory used in an embedded Linux system making use of the UBIFS file system. Specifically, the memory p/n is W29N08GVSIAA by Winbond, which is a 1-bit ECC Single-Level Cell (SLC) component. In this case, the wear leveling algorithm is implemented at the Linux kernel level.
According to the datasheet, :* erase block size is 128KiB* the number of P/E cycles is 100000. The * the capacity is 1 GByte GiByte (8 GbitGibit). For the sake of simplicity, it is assumed that the file system makes use of the entire memory. Otherwise, only the capacity of the partition of interest has to be taken into account. Regarding the WAF, it is assumed it is 5. This means that for each byte written by the user-space applications and daemons, five bytes are actually saved onto the memory.
TBW = (1 GByte GiByte * 100000) / 5 = 20000 GByte GiByte ~ 19.5 TByte TiByte
Assuming that the user-space software writes 650 gigabytes GiB every year, the expected lifetime is
LT = 20000 / 650 = 30.8 years
In many cases, WAF is unknown and can not be estimated either. As stated previously, the system integrator can determine the lifetime expectancy by adopting an experimental approach though. The following procedure describes how to determine the '''actual''' written data for the system used in this example.
TBDThe main indicator of ''how much data has been written'' for NAND devices is ''how many blocks has been erased'', assuming that a block has been erased only if:* has already being written (even if not completely)* needs to be written again (this is not completely true, because UBI has a background tasks that erases dirty LEB while the system is idle)Assuming that <code>TEC</code> is the ''sum of PEB Erase Counter'' and <code>DAYS</code> is the number of days the test has been run, the ''estimated amount of written data per year'' can be written as:
Thus D = (TEC * PEBsize) * (365 / DAYS)This already includes WAF and, the expected lifetime isthus, we can estimate life-time, in year, as:<syntaxhighlight lang="text">LF = [capacity * P/E cycles] / D LT </syntaxhighlight>In the same case above, if we have 30000 TEC at day we have<syntaxhighlight lang= "text">LF = x (1GiB * 100k) / ((30k * 128KiB) * (365 / 1)) ~ 74 years</syntaxhighlight>
==Power failures==
=== Example: embedded Linux system equipped with a raw NAND flash memory and UBIFS file system ===
On embedded Linux system, raw NAND are commonly managed by MTD/UBI subsystems and, on top of them, UBIFS to manage files
 
These subsystems are explained in more details in [[Memory Tecnology Device (MTD)]] article, here we'll focus on health monitoring
 
There's two main indicator of NAND device health:
* current ECC corrected errors
716
edits

Navigation menu