Does flash-memory integrity depend on system resources while reading/writing (like CDs/DVDs)?

3

Question

I’m really concerned that flash-memory is just not reliable as a storage for irreplaceable files. Does anybody know if the integrity (corruptibility) of flash-memory (flash-drives, memory-cards—SSDs?) depend on the system and its resource load?

That is, if you are writing (or reading?) to a USB flash-drive or memory-card while the system is under a load (something in the background running the CPU at 100%, using up a lot of memory, or causing the hard-drive to thrash a lot), could it cause the data written to or read from the flash device to be corrupt?

Background

I have recently gotten two brand-new flash-drives (a Kingston memory-card and a Kingston USB-drive). I copied a folder with a lot of files to both of them (at the same time), and when I compared them to the source (and each other), I found that some files were shown as being different. Some of them were false-positives and re-comparing them made them go away (they were suddenly identical again), while some were permanently corrupt (some had 8 bytes in a row different, some had several dozen in a row). After copying the corrupt files again and comparing them, they showed as identical.

Observations

It doesn’t seem to be system related (e.g., bad memory) because I’ve seen it happen on a laptop and desktop. Nor is it OS dependent; it’s happened on 64-bit 7 and 32-bit XP. It doesn’t seem to be related to the USB port or memory-card reader (again, different systems). It is not even the device itself (I’ve seen it happen on SanDisk and Kingston memory-cards and USB-drives). Unfortunately I can’t do any tests because while it’s not fully intermittent, it is random (I may be able to force it to happen, but would be unable to control the results).

The only factor that seems to be even slightly consistent when it happens seems to be the resource-load of the system that is reading or writing to the flash-memory. It’s almost as though the device cannot get the data fast enough—as though flash-drives and cards are sooo fast (¬_¬)—so it writes junk and moves on, much like how burning a CD or DVD requires a constant, steady stream of data without interruption to avoid corrupting the disc (even with a built-in buffer).

Is that really how flash-memory drives work? If so, why? Why are they not like hard-drives that simply take longer to perform the disk operation? Surely in this day and age, systems are designed to be dynamic and use variables and error-handling instead of expecting all operations to complete in an arbitrary prescribed amount of time and fail if it they are not.

Synetech

Posted 2013-08-19T15:05:20.590

Reputation: 63 242

great question, specially because you tested many situations and included those variables on it... – woliveirajr – 2013-08-19T16:32:14.540

Answers

1

edited:

After some interesting discussions with Synetech, and considering that he made several tests (different brands, different OS versions, different computers, etc), we found some tips on this Microsoft Technet discussion page

Some users consider that the problem can be related to USB voltage: sometime Windows, motherboard, etc, try to reduce power consumption, and taht can be critical when the CPU / computer is under high load. In those situations, the USB can be powered with a lower voltage than it requires, and then some erratic behavior can happen.

There are many possible solutions, that might or might not work for each computer:

1 - Tweaking the BIOS so that northbridge receives more tension for USB ports;

2 - Using a powered USB hub;

3- Disabling ACPI control.

woliveirajr

Posted 2013-08-19T15:05:20.590

Reputation: 3 820

It’s not a single drive, it’s happened with different flash-drives and memory-cards of different brands on different systems. There is enough variety to rule out random chance. 1: No, it shouldn’t, but that doesn’t mean it won’t. 2: I should hope so. 3: Yes, but it happens with brand new ones which have never been written, so it is not worn out. 4: I’ve always been uncomfortable with testing programs like CPU burn-in apps because they add to the wear and tear even more than regular usage. – Synetech – 2013-08-19T15:29:08.767

if there's no more bits to save, the controllers (USB, on-flash-drive, etc) wouldn't choose to save garbage instead...   That’s what I assumed; if the system cannot provide the data (e.g., the hard-drive is too busy accessing other stuff like the pagefile), then it should simply wait until it gets the data. I can understand why a CD/DVD would get corrupted if the data stream is not sufficient, but flash-memory has no (logical) reason to behave like that. – Synetech – 2013-08-19T15:38:19.860

and how you tested them? After writing, you removed, connected again, tested again, to rule out cache problems, or some burst-write inconsistency?   That could explain the ones that were correct after re-comparing, but not the ones that were definitely corrupt. For the recent incident (Saturday), I did a binary comparison and opened them in a hex-editor to see the different bytes with my own eyes. – Synetech – 2013-08-19T15:40:23.773

googling around, found problems similar to yours that were caused by windows updates, by low-voltage on the northbridge (caused by ACPI and windows trying to use less power on USBs under high-system load...) -> http://social.technet.microsoft.com/Forums/windows/en-US/a671e232-9c83-4491-8a38-7f66b38d8f2f/windows-7-64-bit-usb-copy-freezes-hotfix-did-not-resolve-issue

– woliveirajr – 2013-08-19T15:46:38.657

1

Very interesting. The suggestion that it could be a power issue sounds reasonable. This message and the one after it are particularly thought-provoking. A laptop likely uses power-saving features like reducing USB voltage as much as possible, and the USB ports on a desktop are also different (I think either the front or back is powered and the other isn’t). I’ll get out my old powered USB hub to see if that helps (it’s only USB 1.1, but 12Mbps isn’t slow here).

– Synetech – 2013-08-19T16:19:12.550

1I too have had some of the described issues like the bing-bong noise of the USB drive disconnecting and reconnecting as well as the hung file copy dialog. I think it is reasonable to assume that power is indeed the issue and some of the suggestions on the Technet page are reasonable to try. If you add the link and power-related issues to your answer, I’ll accept it (and try it out when I find my powered hub—or get a USB 2.0 one). – Synetech – 2013-08-19T16:22:05.497

1Also, ever since I installed the card-reader in my system, I can no longer use standby mode because whenever it comes out of standby, Windows complains that it tried to draw too much power from the USB bus. (The card-reader used to work without problem with my old system, so it must be the motherboard because the PSU is the same.) So yup, I’m going to assume that the problem is indeed a power issue. I’m not sure how it explains the USB-drive or the card-reader on the laptop, but chances are it’s related. I’ll try to get a new powered hub or USB card to do some tests to find out for sure. – Synetech – 2013-08-24T19:26:55.393

:) Please, feel free to update the answer to point out your findings, they are very usefull – woliveirajr – 2013-08-26T12:58:47.487