androidflash-memory

Should I be concerned with flash memory write cycles resource limits?


I am writing an Android application which writes data to a file several times a second, the overall file size is around 1MB, after that file gets erased and new file started. Should I be concerned about wearing out the phone's flash memory, causing it to fail? Do you know if Android distributes writes onto different sectors to minimize flash memory degradation, even when the application writes a continuous file? Does the logging system worked in a similar way? In other words if I log a lot (several records per second), will that affect the phone's flash memory resource?


Solution

  • Would not hurt to worry about that, but aside from flash write cycles, I'd rework app logic - 1MB is not that much, so buffering data in memory and flushing it to the file periodically (but less frequently) should speed your app (as I assume your writes are synchronous).

    EDIT

    Wiki got some figures for consideration:

    Write endurance

    The write endurance of SLC floating-gate NOR flash is typically equal to or greater than that of NAND flash, while MLC NOR and NAND flash have similar endurance capabilities. Example Endurance cycle ratings listed in datasheets for NAND and NOR flash are provided.

    • SLC NAND flash is typically rated at about 100k cycles (Samsung OneNAND KFW4G16Q2M)
    • MLC NAND flash used to be rated at about 5k – 10k cycles (Samsung K9G8G08U0M) but is now typically 1k – 3k cycles
    • TLC NAND flash is typically rated at about 1k cycles (Samsung 840)
    • SLC floating-gate NOR flash has typical endurance rating of 100k to 1M cycles (Numonyx M58BW 100k; Spansion S29CD016J 1,000k) MLC floating-gate NOR flash has typical endurance rating of 100k cycles (Numonyx J3 flash)