Flash memory lifespan

Hi All

i would like to ask few questions about flash memory in routers.

  1. how many times flash memory in router can be reprogrammed?

  2. if one cell will be broken because of too many writes to it does it mean that router has to be replaced or system will take that cell out of use and just show less capacity of internal memory?

  3. Is there any way of checking the health of percentage used of memory in router like you can in SSD's via SMART?

Thank you.

Usually routers become old and useless faster than memory smart sarted having troubles.

3 Likes

Suppose that is not about NOR-SPI but NAND (eMMC partition) for the OS? Mostly it depends on:

  • eMMC version and its density specifications (info from manufacturer), e.g. eMMC4.5 with density of 4GB makes ~ 2.4TB total bytes written before EOL
  • filesystem deployed on the eMMC, BTRFS is likely not the most suitable and quite a number of Android device vendors deploy F2FS
  • utilisation of the eMMC, e.g. with write intensive apps it will wear faster of course

The NAND chip logic handles bad blocks (reservation) until there is no sufficient amount of healthy cells left for running the OS. The process is however not linear, more of an avalanche effect. Nothing is happening for a long time and then all blocks starts failing at once.


Limited with mmc extcsd read /dev/mmcblk0 | grep 'EXT_CSD_PRE_EOL_INFO\|EXT_CSD_DEVICE_LIFE_TIME_EST'

Value is in range of percents so 0x01 is from 0%-10% blocks used, 0x02 is from 10%-20% and so on. When amount of reserved block used is close to 100% then NAND is pretty much EOL, mind however the avalanche effect.

3 Likes

Thank you for all the replies.

I don't know if i made myself clear. I was asking about memory where you flash OpenWRT images with every upgrade to new version.

All what i know that mine is 16MB not 4GB.

How can i check if mine is eMMC or NOR-SPI?

Thank you.

The 4GB figure just exemplary referred to the density operation mode set by the

See also https://www.micron.com/products/nand-flash/choosing-the-right-nand


check the device specifications from manufacturer, mmc extcsd read /dev/mmcblk0 will provide as much possible information through the OS's userland.

Thank you.

16 MB would almost certainly be a NOR chip. NOR flash has much longer lifetime of about 100,000 erase / writes per block. Wearout is not a concern in normal operation even if that included upgrading daily.