How long until my eMMC is dead?

The optimistic estimation would be based on the assumption that your system accumulates data until it can fill one complete erase block, then writes all the data in one go. In that case, your eMMC will live

4'000'000 * 3'000 / (4*20) = 150'000'000 seconds

That's about 4.75 years.

However, if for example your system writes each 4K block separately, the time your eMMC will last will depend on the size of a single erase block. You'll have to check the spec for the actual value, but to give you an example, if your eMMC has 4M erase blocks, you'll have to divide the time by 1024 (meaning it will last just about a day or two).

The real value will be between these two numbers, depending on how you group write operations and how big erase blocks really are.


Aside from estimating it, you can also ask the eMMC itself to tell you how far it has degraded so far (assuming it supports EMMC 5.1 or above).

The JEDEC standard (JESD84-B51) specifies that in the ext_csd field (offset 268-269) bytes indicate the level of type A/B wear. (value 0x1-0xA reflects 10%-100%, 0x0B means lifetime exceeded)

For example, on a typical linux distro, you could run the following script in bash to tell you:

RES=`cat /sys/kernel/debug/mmc1/mmc1:0001/ext_csd`
typea="${RES:536:2}" ;
typeb="${RES:538:2}" ;
typead=`echo "ibase=16; $typea"|bc`
typebd=`echo "ibase=16; $typeb"|bc`
echo "Type A percent: $((typead * 10)) %"
echo "Type B percent: $((typebd * 10)) %"