eMMC Health Status

Post Reply
User avatar
rooted
Posts: 8875
Joined: Fri Dec 19, 2014 9:12 am
languages_spoken: english
Location: Gulf of Mexico, US
Has thanked: 743 times
Been thanked: 407 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: 8875
Joined: Fri Dec 19, 2014 9:12 am
languages_spoken: english
Location: Gulf of Mexico, US
Has thanked: 743 times
Been thanked: 407 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
These users thanked the author rooted for the post:
mctom (Tue Nov 09, 2021 5:37 am)

elatllat
Posts: 1886
Joined: Tue Sep 01, 2015 8:54 am
languages_spoken: english
ODROIDs: XU4, N1, N2, C4, N2+, HC4
Has thanked: 67 times
Been thanked: 136 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: 8875
Joined: Fri Dec 19, 2014 9:12 am
languages_spoken: english
Location: Gulf of Mexico, US
Has thanked: 743 times
Been thanked: 407 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.

User avatar
mad_ady
Posts: 9974
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: 631 times
Been thanked: 780 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: 8875
Joined: Fri Dec 19, 2014 9:12 am
languages_spoken: english
Location: Gulf of Mexico, US
Has thanked: 743 times
Been thanked: 407 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: 1886
Joined: Tue Sep 01, 2015 8:54 am
languages_spoken: english
ODROIDs: XU4, N1, N2, C4, N2+, HC4
Has thanked: 67 times
Been thanked: 136 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?

User avatar
mad_ady
Posts: 9974
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: 631 times
Been thanked: 780 times
Contact:

Re: eMMC Health Status

Post by mad_ady »

I do have universe enabled. Weird...

elatllat
Posts: 1886
Joined: Tue Sep 01, 2015 8:54 am
languages_spoken: english
ODROIDs: XU4, N1, N2, C4, N2+, HC4
Has thanked: 67 times
Been thanked: 136 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: 8875
Joined: Fri Dec 19, 2014 9:12 am
languages_spoken: english
Location: Gulf of Mexico, US
Has thanked: 743 times
Been thanked: 407 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: 8875
Joined: Fri Dec 19, 2014 9:12 am
languages_spoken: english
Location: Gulf of Mexico, US
Has thanked: 743 times
Been thanked: 407 times
Contact:

Re: eMMC Health Status

Post by rooted »

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

User avatar
mad_ady
Posts: 9974
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: 631 times
Been thanked: 780 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: 8875
Joined: Fri Dec 19, 2014 9:12 am
languages_spoken: english
Location: Gulf of Mexico, US
Has thanked: 743 times
Been thanked: 407 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/

User avatar
mad_ady
Posts: 9974
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: 631 times
Been thanked: 780 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: 8875
Joined: Fri Dec 19, 2014 9:12 am
languages_spoken: english
Location: Gulf of Mexico, US
Has thanked: 743 times
Been thanked: 407 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: 1886
Joined: Tue Sep 01, 2015 8:54 am
languages_spoken: english
ODROIDs: XU4, N1, N2, C4, N2+, HC4
Has thanked: 67 times
Been thanked: 136 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.

User avatar
mad_ady
Posts: 9974
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: 631 times
Been thanked: 780 times
Contact:

Re: eMMC Health Status

Post by mad_ady »

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

User avatar
mad_ady
Posts: 9974
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: 631 times
Been thanked: 780 times
Contact:

Re: eMMC Health Status

Post by mad_ady »

Just a FYI - I've talked to friend who has a 64G emmc (red, I think) and he was complaining that he started to get IO errors in dmesg.
I had him run the mmc command and his wear lifetime indicator showed 0x0b. Which is about 120%... Impressive numbers!
These users thanked the author mad_ady for the post:
odroid (Thu Sep 23, 2021 9:19 am)

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

Re: eMMC Health Status

Post by rooted »

mad_ady wrote:Just a FYI - I've talked to friend who has a 64G emmc (red, I think) and he was complaining that he started to get IO errors in dmesg.
I had him run the mmc command and his wear lifetime indicator showed 0x0b. Which is about 120%... Impressive numbers!
That's quite a lot of writing

User avatar
mctom
Posts: 781
Joined: Wed Nov 11, 2020 4:44 am
languages_spoken: english, polish
ODROIDs: N2+, Game Advance, a few XU4
Location: Gdansk, Poland
Has thanked: 81 times
Been thanked: 97 times
Contact:

Re: eMMC Health Status

Post by mctom »

I was just thinking about that and there you go, google led me back to my favorite message board that already had an answer to my question.
mad_ady wrote:
Thu Feb 04, 2021 4:13 pm
Would you guys mind showing your stats?
My N2+ 16GB eMMC, which works as a daily driver (with /home on larger SD card) shows 0x01 after almost a full year of 24/7 operation.
I also tested eMMC in Dell Wyse 5070 that I bought second hand, and it also shows 0x01. It looked like new when I bought it, and it was said to be used only once on some expo.

sadly this package is not available in Manj, and the AUR package is broken, but!

Code: Select all

git clone https://git.kernel.org/pub/scm/linux/kernel/git/cjb/mmc-utils-old.git/
cd mmc-utils-old
make
sudo make install
For some reason they changed the repository name to "old" quite recently, and there's nothing in its place. Seems like it's about to get deprecated? Or maybe it's a standard procedure after 2 years of inactivity, I don't know.
Punk ain't no religious cult, punk means thinking for yourself!

Maintainer of PiStackMon

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

Re: eMMC Health Status

Post by elatllat »

Code: Select all

N2> mmc extcsd read /dev/mmcblk0 | grep Estimation && uname -r
eMMC Life Time Estimation A [EXT_CSD_DEVICE_LIFE_TIME_EST_TYP_A]: 0x03
eMMC Life Time Estimation B [EXT_CSD_DEVICE_LIFE_TIME_EST_TYP_B]: 0x03
5.10.80-dirty
So maybe that's 20% per year.
These users thanked the author elatllat for the post:
odroid (Mon Nov 22, 2021 9:45 am)

Post Reply

Return to “General Topics”

Who is online

Users browsing this forum: No registered users and 3 guests