In a previous article about SSDs we had a chat in the video about flash memory types.
Ivan R commented on the JetsonHacks YouTube channel:
Jim, I’ve noticed a lot of development boards now a days are coming with on board eMMC memory for storage as compared to older style, say Raspberry Pi’s with an SD card. I only have older Raspberry Pi’s at the moment unfortunately but I’d be curious of your opinion on a few things. In your experience how does this type of storage on these type of devices fair? How is it compared to SD card and SSD card writes/reads? Is there a life expectancy on that eMMC type?
Now seems to be like a good time to untangle some of the questions that have arisen. Before we start, this is not an exhaustive survey of flash memory, just enough knowledge to be dangerous.
Different types of Flash
You can think about flash memory as a cell. One of the things most people hear about is the Program/Erase cycle (P/E) and that each cell has an expected number of times that it can be changed before it fails.
The first generation flash devices are what is called Single Level Cell (SLC). SLC devices hold 1-bit in each cell.
The second generation are Multi Level Cell (MLC). MLC devices hold 2-bits per cell. MLC generally provides higher storage density and lower cost with the tradeoff being slower write performance, narrower operating temperature, and 10-20 times less endurance cycles (P/E cycles).
The third generation is naturally Triple Level Cell (TLC) flash. You can effectively store 3 bits per cell. The tradeoff in comparison to MLC similar to MLC vs SLC with about 50% less endurance cycles.
Samsung and Intel introduced the idea of stacking the components for higher density, this is parallel to the cell type. For example, Samsung calls their technology V-NAND which provides higher storage density but at the same level of the type of underlying flash cell type being used.
As you might guess, each of these technologies has a market to fill. Enterprise servers and embedded devices that must operate reliably in a broad range of operating temperatures tend to be SLC. Because MLC and TLC devices cost less and allow for higher storage density, they make it possible to create affordable mobile devices with large amounts of data storage.
Different Ways to Hook It Up
Another consideration is the way that the flash memory actually is connected to the CPU/ memory controller/SoC. For example on the Jetson the eMMC flash memory comes in over a 200mbs/8 bit bus. As I recall, the eMMC flash and the SD card reader come in through the same bus.
On the other hand, the SATA port is a 6 Gbs bus, so effectively is much faster than the bus that connects eMMC. When you run the system off of a SATA drive, it subjectively seems much faster. The USB bus is somewhere in the middle.
Out in the Wilds
That’s all great as an explanation and everything, but what does it mean?
First, remember that these are development machines by nature. Storage is one of the expendables. By the way, have you ever gone back and looked at one of your disks from 5 years ago? How much storage does it have?
To answer the original Ivan R question about internal eMMC vs. SD Card, you can think about it a couple of ways. First, the Raspberry Pi really isn’t a development kit, it’s a consumer product. One of the ways they cut cost is by not putting any flash on board. Here’s the thing, the actual SD cards themselves? Depends on which one you use. Some are industrial strength, SLC based. A nice 32 GB card costs about $350 give or take. Seems unlikely someone would use it on a $35 board, not when you can get the same thing for less than $15 in MLC or TLC.
Because the SD card is mass market, you might not know the quality of the chips being used. Realistically there are only a few flash chip manufacturers out there, but you never know the relationship between the chip manufacturer and the SD card builder. Sure, when you buy a Samsung SD card you know what you’re getting. When you buy brand X? Not so much.
Another issue is the mechanical connector. Connections are always a point of failure. So what the development board manufacturers do is mitigate all of the risk by placing eMMC flash onboard. In the case of the Jetson, this gives NVIDIA the flexibility of being able to spec which actual memory chips and cell type are being used. For industrial applications, the module can contain high rated SLC, for consumer application lower rated SLC or high rated MLC. The developer gets the comfort of knowing that there is at least one configuration that they can depend on.
On a development board, you’re much more likely to fry other components before you ever reach the life of the eMMC. That’s the nature of the hardware development boards, things like “I forgot I wasn’t supposed to short all the pins to ground all at once”. The magic smoke tends to get out of the support chips before they come out of the module.
As far as the SSD side of life, it be good there. The more storage that you have to spread the write cycles over, the longer the drive lasts. In practice this means that you always want to have more than 10% storage free so that all of the write activity just doesn’t sit in one place. You can also imagine the advantage of a larger disk, they have longer life expectancies because they have more bits to write on. Get the most you can afford.
For me personally, right now for less than $100 I can pick up 250GB of flash that’ll last 5 years. Developers keep their code in repositories backed up some where (such as Github or on a network), so that’s not an issue. You can imagine the case where you collect video 24/7 and store it to disk, upload it to a server, then overwrite it. Even in that case, the drive will last for a 18 months. For an extra $50, you can double that life expectancy. And you can double that amount of storage on larger drives for a reasonable amount. If you’re looking for a 2TB drive, you’re still well under a grand. But like we talked about, for a professional developer these are expendables and part of doing business.
There are applications where you’ll need expensive SLC SSDs, but more than likely you know more about the subject than I do.
The post Flash Memory and You appeared first on JetsonHacks.