So you're a Noob? Post your questions here until you graduate! Don't be shy.

User avatar
By h16bill
#89290 I am running a temperature logging program that writes 18 bytes of data to a csv file every two minutes. After the data file reaches 16kb I start overwriting older entries in the file. I am running on an esp-01 with 1mb flash. I also have OTA enabled and files stored to support the web page.
How good will the write leveling work under these circumstances? I am wondering how long before it becomes a brick.
16k/18 * 10,000 = ~9 million writes @ 30/hour = 34 years
or is it:
1mb/18 * 10,000 = ~582 million writes @ 30/hour = 2,216 years
User avatar
By davydnorris
#89499 Either way, 30+ years is plenty long enough for your device - I wouldn't worry.

The key thing is that the wear occurs when you erase, not when you write, so minimise the erases and do a block at a time. If you have a look in the advanced topic I uploaded my storage library which implements a journal file system type of storage with wear levelling