Can I run a database such as InfluxDB on an Edge Gateway using an eMMC as storage media (e.g. of type NFX8M-D2-N32-xx)?

Q

Can I run a database such as InfluxDB on an Edge Gateway using an eMMC as storage media (e.g. of type NFX8M-D2-N32-xx)?

A

No, this is not recommended by Hilscher.

Before you read on put an eye on this story first: https://insideevs.com/news/376037/tesla-...ory-issue/



So categorize your (containerized) applications how write intensive they are and how they are stressing the non-volatile FLASH storage media used in embedded devices such as netFIELD Compact (e.g. of type NFX8M-D2-N32-xx).



Critical are those applications writing data at high frequency and volume like databases. But not only the applications could get critical:

Docker daemon for example logs all container's console outputs too. So if you have an application running at debug level maybe outputting tons of text information to the console (even no one would/could read it) will lead to a worn-out-effect easily too.



netFIELD Compact includes an 32GB eMMC Flash memory of type MLC-NAND. The most critical thing about a NAND FLASH memory is its finite number of erase/program cycles (P/E cycles) also referred to as "memory wear". The wear begins to deteriorate the integrity of the memory until it is becoming unusable in the end. 



Where does this TBW value come from? MLC technology in general has a limit of maximum 3000 P/E cycles per flash block specified by the FLASH manufacturers used in an eMMC/SD cards (https://en.wikipedia.org/wiki/Write_amplification). The limit per block makes a NAND-flash endurance directly dependent on its overall size, so the bigger the more blocks,  the better. An auto-wear leveling mechanism in the card's memory controller ensures the next erase/program cycle is performed on another flash block and hence distributes them evenly across the medium. So the FLASH is 32GB effectively and the P/E is 3000. Both multiplied results in 96TB, which is not much.



10 years life time in theory: There is a MS Excel lifetime calculator available (from Toshiba, appended) estimating the expected NAND flash life time in theory. Let's suppose you have 1MByte as amount of data to be written every second to eMMC 32GB SD card. The calculator comes to a lifetime  of 3.12 years only.



So be aware of your application running on embedded devices. Running a database at intensive write rates could destroy the FLASH memory.