Hello all,
i have a question to the durability of the flash memory:
Is it true that the flash memory of the ESP32 can slowly break after about 100000 write cycles?
And if yes: What exactly means "write cycles"?
Following example:
I want to save 300 measurings a day (e.g. temperature measurings) in a file.
For each day a new file is created named with the current date.
So e.g. for today i would have a file called "2021-01-10.bin"
If i then
open the file
append the new measuring by file.write
close the file
and do this 300 times.
Would that be 300 write cycles?
This would mean that i would have 109500 write cycles a year (300 * 365).
And that would mean, that the flash memory would be defective after about a year.
Is this correct?
Best wishes
Daniel
Thank you for your help and a good healthy new year to everybody!
Daniel
Flash memory durability (SPIFFS)
Re: Flash memory durability (SPIFFS)
Hi,
really no one that can help ;-(
Best wishes
Daniel
really no one that can help ;-(
Best wishes
Daniel
-
- Posts: 9719
- Joined: Thu Nov 26, 2015 4:08 am
Re: Flash memory durability (SPIFFS)
Technically, it's 100000 erase cycles per sector, meaning that each (4K large) sector can only be erased up to that amount of times before a flash cell may break. The thing is that flash filesystems like spiffs will do wear leveling, in other words: every time you write a file, it will do that to a different (set of) sector(s). I am not intimately familiar with the workings of spiffs, so my numbers could be off, but as an indication: say you have a spiffs that is 1 megabyte in size, or 256 4K erase sectors. Assuming your file is small, and spiffs only needs to erase one sector per erase/create/write cycle, this means it can do this 100000 times for each erase sector, but it has 256 sectors to spread the load over, which means 25600000 times in total.
Re: Flash memory durability (SPIFFS)
OK, that sounds good.
Thank you for your detailed answer.
Best wishes
Daniel
Thank you for your detailed answer.
Best wishes
Daniel
Who is online
Users browsing this forum: ESP_Sprite and 42 guests