eMMC Health Status

Post Reply
User avatar
rooted
Posts: 8423
Joined: Fri Dec 19, 2014 9:12 am
languages_spoken: english
Location: Gulf of Mexico, US
Has thanked: 740 times
Been thanked: 330 times
Contact:

eMMC Health Status

Post by rooted »

I was reading up on eMMC longevity and found out since revision 5.0 eMMCs have the ability to give wear level in increments of 10%.

Does anyone know how to read this?

From the SanDisk PDF where I found the information:
Device Health is similar to SMART features of modern hard disks, it provides only vital NAND
flash program/erase cycles information in percentage of useful flash life span.
The host can query Device Health information utilizing standard MMC command, to get the
extended CSD structure:
 DEVICE_LIFE_TIME_EST_TYP_A[268], The host may use it to query SLC device health
information
 DEVICE_LIFE_TIME_EST_TYP_B[269], The host may use it to query MLC device health
information
The device health feature will provide a % of the wear of the device in 10% fragments.

User avatar
rooted
Posts: 8423
Joined: Fri Dec 19, 2014 9:12 am
languages_spoken: english
Location: Gulf of Mexico, US
Has thanked: 740 times
Been thanked: 330 times
Contact:

Re: eMMC Health Status

Post by rooted »

Answer to my own question, it's in mmc-utils package.

Code: Select all

mmc extcsd read /dev/mmcblk0
Gives me 0x01 which doesn't seem correct?

Code: Select all

eMMC Life Time Estimation A [EXT_CSD_DEVICE_LIFE_TIME_EST_TYP_A]: 0x01
eMMC Life Time Estimation B [EXT_CSD_DEVICE_LIFE_TIME_EST_TYP_B]: 0x01

elatllat
Posts: 1857
Joined: Tue Sep 01, 2015 8:54 am
languages_spoken: english
ODROIDs: XU4, N1, N2, C4, N2+, HC4
Has thanked: 59 times
Been thanked: 132 times
Contact:

Re: eMMC Health Status

Post by elatllat »

rooted wrote:...doesn't seem correct?...
:lol: that is "similar to SMART" :twisted:
comparing the value of a new and a really old or abused eMMC is the only way to know for sure.

User avatar
rooted
Posts: 8423
Joined: Fri Dec 19, 2014 9:12 am
languages_spoken: english
Location: Gulf of Mexico, US
Has thanked: 740 times
Been thanked: 330 times
Contact:

Re: eMMC Health Status

Post by rooted »

LOL

I will check my N1 when I get a chance, but this eMMC I checked is old and abused. I have compiled the Linux kernel about 200 times and many other compile jobs also.

mad_ady
Posts: 9250
Joined: Wed Jul 15, 2015 5:00 pm
languages_spoken: english
ODROIDs: XU4, C1+, C2, C4, N1, N2, H2, Go, Go Advance
Location: Bucharest, Romania
Has thanked: 599 times
Been thanked: 622 times
Contact:

Re: eMMC Health Status

Post by mad_ady »

Why can't I find that package on ubunt arm64?

Code: Select all


adrianp@bellatrix:~$ sudo apt-get install mmc-utils
Reading package lists... Done
Building dependency tree
Reading state information... Done
E: Unable to locate package mmc-utils
100 adrianp@bellatrix:~$ sudo apt-get install mmc-util
Reading package lists... Done
Building dependency tree
Reading state information... Done
E: Unable to locate package mmc-util
100 adrianp@bellatrix:~$ mmc
bash: mmc: command not found

User avatar
rooted
Posts: 8423
Joined: Fri Dec 19, 2014 9:12 am
languages_spoken: english
Location: Gulf of Mexico, US
Has thanked: 740 times
Been thanked: 330 times
Contact:

Re: eMMC Health Status

Post by rooted »

mad_ady wrote:Why can't I find that package on ubunt arm64?

Code: Select all


adrianp@bellatrix:~$ sudo apt-get install mmc-utils
Reading package lists... Done
Building dependency tree
Reading state information... Done
E: Unable to locate package mmc-utils
100 adrianp@bellatrix:~$ sudo apt-get install mmc-util
Reading package lists... Done
Building dependency tree
Reading state information... Done
E: Unable to locate package mmc-util
100 adrianp@bellatrix:~$ mmc
bash: mmc: command not found
I don't know, I installed it last night on the N1?

elatllat
Posts: 1857
Joined: Tue Sep 01, 2015 8:54 am
languages_spoken: english
ODROIDs: XU4, N1, N2, C4, N2+, HC4
Has thanked: 59 times
Been thanked: 132 times
Contact:

Re: eMMC Health Status

Post by elatllat »

mad_ady wrote:Why can't I find... mmc-utils (on ubuntu)
https://packages.ubuntu.com/search?keywords=mmc-utils
did you enable the 'universe' repo?

mad_ady
Posts: 9250
Joined: Wed Jul 15, 2015 5:00 pm
languages_spoken: english
ODROIDs: XU4, C1+, C2, C4, N1, N2, H2, Go, Go Advance
Location: Bucharest, Romania
Has thanked: 599 times
Been thanked: 622 times
Contact:

Re: eMMC Health Status

Post by mad_ady »

I do have universe enabled. Weird...

elatllat
Posts: 1857
Joined: Tue Sep 01, 2015 8:54 am
languages_spoken: english
ODROIDs: XU4, N1, N2, C4, N2+, HC4
Has thanked: 59 times
Been thanked: 132 times
Contact:

Re: eMMC Health Status

Post by elatllat »

Oh it's only 17.04, 17.10, and 18.04. but you are using 16.04.

User avatar
rooted
Posts: 8423
Joined: Fri Dec 19, 2014 9:12 am
languages_spoken: english
Location: Gulf of Mexico, US
Has thanked: 740 times
Been thanked: 330 times
Contact:

Re: eMMC Health Status

Post by rooted »

It doesn't show anything, not even the above information.

DarkBahamut
Posts: 333
Joined: Tue Jan 19, 2016 10:19 am
languages_spoken: english
ODROIDs: XU4, N1
Has thanked: 0
Been thanked: 0
Contact:

Re: eMMC Health Status

Post by DarkBahamut »

Interesting. Shame it's only 10% steps though.

This is the 32GB eMMC in my XU4, around 2 years old. Been used quite a bit (hundreds of kernels/application compiles), still shows the same values though.
eMMC Life Time Estimation A [EXT_CSD_DEVICE_LIFE_TIME_EST_TYP_A]: 0x01
eMMC Life Time Estimation B [EXT_CSD_DEVICE_LIFE_TIME_EST_TYP_B]: 0x01
eMMC Pre EOL information [EXT_CSD_PRE_EOL_INFO]: 0x01
Edit:

It's mentioned elsewhere that 0x01 = 0-10% life used. Probably expected since the eMMC modules use MLC flash which is typically rated at 3k P/E cycles (or more). So 10% of those would give around 9.6TB of writes to stay within the 10% usage which is quite a lot of writing even after write amplification. I think it would take quite a lot of work to wear out an eMMC module :D

Running trim daily (or more on a busy system) will ensure a long life time too.

User avatar
rooted
Posts: 8423
Joined: Fri Dec 19, 2014 9:12 am
languages_spoken: english
Location: Gulf of Mexico, US
Has thanked: 740 times
Been thanked: 330 times
Contact:

Re: eMMC Health Status

Post by rooted »

Yeah I was thinking 0x01 was 10% but wasn't sure, what would 20 be?

mad_ady
Posts: 9250
Joined: Wed Jul 15, 2015 5:00 pm
languages_spoken: english
ODROIDs: XU4, C1+, C2, C4, N1, N2, H2, Go, Go Advance
Location: Bucharest, Romania
Has thanked: 599 times
Been thanked: 622 times
Contact:

Re: eMMC Health Status

Post by mad_ady »

I'm reviving this thread because while helping a different user I had a look again at my oldest eMMC's health, and the poor thing seems to age due to intense writing (logs, database, rrds, etc):

Code: Select all

$ sudo mmc extcsd read /dev/mmcblk0 | grep "Life Time"
eMMC Life Time Estimation A [EXT_CSD_DEVICE_LIFE_TIME_EST_TYP_A]: 0x05
eMMC Life Time Estimation B [EXT_CSD_DEVICE_LIFE_TIME_EST_TYP_B]: 0x05
Would you guys mind showing your stats?
These users thanked the author mad_ady for the post:
odroid (Thu Feb 04, 2021 4:40 pm)

User avatar
rooted
Posts: 8423
Joined: Fri Dec 19, 2014 9:12 am
languages_spoken: english
Location: Gulf of Mexico, US
Has thanked: 740 times
Been thanked: 330 times
Contact:

Re: eMMC Health Status

Post by rooted »

mad_ady wrote:I'm reviving this thread because while helping a different user I had a look again at my oldest eMMC's health, and the poor thing seems to age due to intense writing (logs, database, rrds, etc):

Code: Select all

$ sudo mmc extcsd read /dev/mmcblk0 | grep "Life Time"
eMMC Life Time Estimation A [EXT_CSD_DEVICE_LIFE_TIME_EST_TYP_A]: 0x05
eMMC Life Time Estimation B [EXT_CSD_DEVICE_LIFE_TIME_EST_TYP_B]: 0x05
Would you guys mind showing your stats?
My kernel doesn't report it any longer on my XU4, the N2 and N2+ are running CoreELEC so I can't check that one and my C4 is currently down.

I don't understand why the XU4 no longer reports that particular stat as it reports a lot of information.

http://paste.debian.net/1183944/

mad_ady
Posts: 9250
Joined: Wed Jul 15, 2015 5:00 pm
languages_spoken: english
ODROIDs: XU4, C1+, C2, C4, N1, N2, H2, Go, Go Advance
Location: Bucharest, Romania
Has thanked: 599 times
Been thanked: 622 times
Contact:

Re: eMMC Health Status

Post by mad_ady »

I did my reading on an N1 running kernel 5.8

User avatar
rooted
Posts: 8423
Joined: Fri Dec 19, 2014 9:12 am
languages_spoken: english
Location: Gulf of Mexico, US
Has thanked: 740 times
Been thanked: 330 times
Contact:

Re: eMMC Health Status

Post by rooted »

mad_ady wrote:I did my reading on an N1 running kernel 5.8
I'm running a kernel I compiled on the XU4 a while back, I believe it's 5.4.3

elatllat
Posts: 1857
Joined: Tue Sep 01, 2015 8:54 am
languages_spoken: english
ODROIDs: XU4, N1, N2, C4, N2+, HC4
Has thanked: 59 times
Been thanked: 132 times
Contact:

Re: eMMC Health Status

Post by elatllat »

Code: Select all

N2> mmc extcsd read /dev/mmcblk0 | grep Estimation
eMMC Life Time Estimation A [EXT_CSD_DEVICE_LIFE_TIME_EST_TYP_A]: 0x01
eMMC Life Time Estimation B [EXT_CSD_DEVICE_LIFE_TIME_EST_TYP_B]: 0x01
N2> uname -r
5.10.13-dirty
But I offload heavy writes to USB volumes.

mad_ady
Posts: 9250
Joined: Wed Jul 15, 2015 5:00 pm
languages_spoken: english
ODROIDs: XU4, C1+, C2, C4, N1, N2, H2, Go, Go Advance
Location: Bucharest, Romania
Has thanked: 599 times
Been thanked: 622 times
Contact:

Re: eMMC Health Status

Post by mad_ady »

Thanks!
I'll have to do the same...

Post Reply

Return to “General Topics”

Who is online

Users browsing this forum: No registered users and 3 guests