Products > Embedded Computing

Do SD cards handle wear leveling on their own?

<< < (4/4)

Mechatrommer:

--- Quote from: Rasz on December 05, 2021, 09:45:57 am ---
--- Quote from: David Hess on November 20, 2021, 08:31:28 pm ---People have run tests by writing data to the same sector repeatedly, and the SD cards without wear leveling failed in short order consistent with the write endurance of a single Flash page.

Some cards were also found to rely on the file system structure. so for instance they might only wear level the FAT area, and do nothing at all with NTFS or whatever.

--- End quote ---
Citation needed

--- End quote ---
you've got one havent you? afaik citation needed for something that exists, not something that doesnt exist...

not really that important for me, but anyway (since i already got in :palm:)...
https://www.reddit.com/r/raspberry_pi/comments/ex7dvo/quick_reminder_that_sd_cards_with_wearleveling/
https://electronics.stackexchange.com/questions/27619/is-it-true-that-a-sd-mmc-card-does-wear-levelling-with-its-own-controller

btw i treat SD card (similar to CF card) as expendable/simple/less reliable medium only for transit purpose.. such as transfer files captured from cameras to PC, not something serious like OS with lots of delete/write cache cycles etc... even if the card has wear levelling, the feature will be less effective when you have 50-80% allocated with permanent OS files and the rest of 20-50% spaces are forced to the death with WL.. it will die sooner anyway...

David Hess:
I burned through a 133X 4GB Transcend Compact Flash card in a few years on my old FreeBSD router which should have had very few writes.  I replaced it with a 4GB IBM laptop hard drive which is more than 20 years old now.

One day the system stopped accepting writes and it was not clear that the Compact Flash card was the problem until I was inspired to swap in the hard drive.  After the swap, SMART data revealed that the entire allocation of spare sectors on the Flash card had been used up.

Rasz:

--- Quote from: Mechatrommer on December 05, 2021, 11:13:37 pm ---
--- Quote from: Rasz on December 05, 2021, 09:45:57 am ---
--- Quote from: David Hess on November 20, 2021, 08:31:28 pm ---People have run tests by writing data to the same sector repeatedly, and the SD cards without wear leveling failed in short order consistent with the write endurance of a single Flash page.

Some cards were also found to rely on the file system structure. so for instance they might only wear level the FAT area, and do nothing at all with NTFS or whatever.

--- End quote ---
Citation needed

--- End quote ---
you've got one havent you? afaik citation needed for something that exists, not something that doesnt exist...

not really that important for me, but anyway (since i already got in :palm:)...
https://www.reddit.com/r/raspberry_pi/comments/ex7dvo/quick_reminder_that_sd_cards_with_wearleveling/
https://electronics.stackexchange.com/questions/27619/is-it-true-that-a-sd-mmc-card-does-wear-levelling-with-its-own-controller

btw i treat SD card (similar to CF card) as expendable/simple/less reliable medium only for transit purpose.. such as transfer files captured from cameras to PC, not something serious like OS with lots of delete/write cache cycles etc... even if the card has wear levelling, the feature will be less effective when you have 50-80% allocated with permanent OS files and the rest of 20-50% spaces are forced to the death with WL.. it will die sooner anyway...

--- End quote ---

You misunderstood me.

>People have run tests by writing data to the same sector repeatedly, and the SD cards without wear leveling failed in short order consistent with the write endurance of a single Flash page.

is a specific claim. Who are those people? Which cards were tested and where are those test results?

>Some cards were also found to rely on the file system structure. so for instance they might only wear level the FAT area, and do nothing at all with NTFS or whatever.

this one is even stronger and weirder. There were SSDs doing aggressive garbage collection without explicit OS support in the early days. https://www.bit-tech.net/reviews/tech/storage/windows-7-ssd-performance-and-trim/2/ But its still not clear if any went beyond exploiting transparent compression or moving data around to even wear levels. Im not familiar with _any_ hard data on SSD controllers snooping on specific filesystem metadata.

David Hess CF cards are a different story - they were IDE compatible by the spec from the beginning and almost always used simple 1:1 flash-CHS/LBA mapping with possible exception of specialized industrial ones. I personally killed few mass market CF cards in embedded applications (cheaper to replace than implement flash aware fs).

SD and USB pendrive flash controllers virtualized memory-LBA mapping from the start because at that point in time 100% flawless flash was prohibitively expensive. Im not familiar with publicly available software for SD controller management. USB is usually not a problem to obtain, Phison /Alcor etc http://www.flashdrive-repair.com

magic:
Dealing with FAT is simple, because the only heavily written metadata (FAT tables) are at the beginning of the partition.
I have seen numerous people talking about the first few megs of an SD card being more resilient than the rest, but never any hard data.
May be an urban legend.

David Hess:

--- Quote from: Rasz on December 06, 2021, 11:02:10 am --->People have run tests by writing data to the same sector repeatedly, and the SD cards without wear leveling failed in short order consistent with the write endurance of a single Flash page.

is a specific claim. Who are those people? Which cards were tested and where are those test results?
--- End quote ---

The reports would be difficult to find now since they dated from the earliest CF and SD cards.  As James Burke said, "If it is not on the internet, then it does not exist."

Update:  Here are a bunch of examples of Compact Flash cards which do not support wear leveling.  Some of the linked technical information is still available where manufacturers like Sandisk and Kingston explicitly state so.


--- Quote --->Some cards were also found to rely on the file system structure. so for instance they might only wear level the FAT area, and do nothing at all with NTFS or whatever.

this one is even stronger and weirder. There were SSDs doing aggressive garbage collection without explicit OS support in the early days. https://www.bit-tech.net/reviews/tech/storage/windows-7-ssd-performance-and-trim/2/ But its still not clear if any went beyond exploiting transparent compression or moving data around to even wear levels. Im not familiar with _any_ hard data on SSD controllers snooping on specific filesystem metadata.
--- End quote ---

The way I remember it, these cards had special provisions to wear level just the FAT area, which is relatively simple to implement, so they worked deceptively well with FAT file systems, but had no wear leveling support with other filesystems like NT or any Linux filesystem.

The test of course was to write to the same sector repeatedly, which resulted in failure in short order because no wear leveling was occurring.

Navigation

[0] Message Index

[*] Previous page

There was an error while thanking
Thanking...
Go to full version