
06-24-2006, 02:00 PM
|
Executive Editor, Android Thoughts
Join Date: Aug 2006
Posts: 3,233
|
|
Fragmentation on Solid State: An Issue We Dismissed Too Easily?
"The received wisdom is that defragmenting solid state media such as CompactFlash and SD flash memory cards is unnecessary, at least that's what I'd always heard. With magnetic hard drives, fragmentation hurts performance because of the time it takes to physically move the drive heads around when a file is non-contiguous, but since flash memory does not have to move drive physical heads around, it makes sense that any performance loss due to fragmentation would be extremely minimal. However, it was claimed in a usenet post that in fact major benefit could be derived by defragmenting Pocket PC flash storage, but since the author of that controversial claim had not (yet) published any data to support it, I decided to investigate myself."
I've never thought to run my memory cards through defrag to have nice contiguous use of the disk (well, chip really), however I may just start doing that after reading the results posted here. What do you think - is defrag going to start getting used more on your system in regards to your solid state media?
__________________
Dr. Jon Westfall, MCSE, MS-MVP
Executive Editor - Android Thoughts
News Editor - Windows Phone Thoughts
|
|
|
|
|

06-24-2006, 02:31 PM
|
Pupil
Join Date: May 2004
Posts: 34
|
|
very interesting indeed, as much as I use my SD cards, I use them much more than my PC in any given day!
|
|
|
|
|

06-24-2006, 02:34 PM
|
Intellectual
Join Date: Mar 2004
Posts: 172
|
|
Thanks, Jon. Good info.
Perhaps I overlooked, but what utility do you use for defrag? Also, any thoughts on whether there is a benefit to flash ROM defrag, or is it just for cards?
Thanks again.
|
|
|
|
|

06-24-2006, 04:24 PM
|
5000+ Posts? I Should OWN This Site!
Join Date: Jun 2007
Posts: 5,067
|
|
Quote:
Originally Posted by bvkeen
Thanks, Jon. Good info.
Perhaps I overlooked, but what utility do you use for defrag?
|
A simple copy to the PC, possibly format and copy back is the fastest. No need for special defragging utilities.
Quote:
Also, any thoughts on whether there is a benefit to flash ROM defrag, or is it just for cards?
|
Flash ROM defragging is also highly recommended. See the links here.
|
|
|
|
|

06-24-2006, 07:11 PM
|
Thinker
Join Date: Aug 2006
Posts: 484
|
|
Interesting data, but still, it's only empirical - and using only one sample card.
Since the speed of specific flash memory cells slow down with each write cycle, perhaps the fragmented files on the specific card being tested were "older" than the areas used after the defrag.
Certainly it doesn't have anything to do with the physical fragmentation of the files. That's because all flash cards have "extra" cells used to replace bad ones. Therefore, even a file on a card that the host device "thinks" is contiguous, will often have data stored in locations physically away from cells with adjacent logical addresses. Plus, since each request to access data on a card includes the address of the data, it doesn't matter if the previous address was adjacent or not.
Before I accept the conclusion that defragging a memory card makes a difference, I would like someone to explain the reason(s) why.
My own hypothesis would be that the time to read and process the extra FAT table entries for the fragmented files really does significantly impact the performance. However, I don't have any data to back that up. It would be nice if someone that understands the detailed process of reading and writing flash cards could provide some insight on what is being seeing here.
|
|
|
|
|

06-24-2006, 07:21 PM
|
5000+ Posts? I Should OWN This Site!
Join Date: Jun 2007
Posts: 5,067
|
|
Quote:
Originally Posted by daS
Before I accept the conclusion that defragging a memory card makes a difference, I would like someone to explain the reason(s) why.
|
IMHO it's just the need for upgrading the FAT. If the system can write the files in one, continuous area, very few FAT entries must be made. If, on the other hand, the file is really fragged, many FAT entries must be made. Not only the FAT write operations will be slow (if they are not cached and, therefore, written out individually, one at a time), but also the additional tasks like free block searching (with possible optimization algorithms like "best-fit", which also result in a slowdown).
(I've also elaborated on these questions in my two original articles and the answers to the user remarks in there - feel free to check them out.)
|
|
|
|
|

06-24-2006, 07:23 PM
|
5000+ Posts? I Should OWN This Site!
Join Date: Jun 2007
Posts: 5,067
|
|
Quote:
Originally Posted by 100thMonkey
very interesting indeed, as much as I use my SD cards, I use them much more than my PC in any given day!
|
Then, make sure you reformat/defrag them depending on the fragging (for example, if you store a browser cache on it).
|
|
|
|
|

06-24-2006, 08:53 PM
|
Intellectual
Join Date: Mar 2005
Posts: 147
|
|
Interesting article with some interesting results.
While I admit I've never defragged a CF/SD card, I have always questioned the "no need to defrag" mentality surrounding them.
__________________
Clinton Fitch ~ MVP-Mobile DevicesPrincipalClinton Fitch (Dot) Com!
|
|
|
|
|

06-24-2006, 09:19 PM
|
Thinker
Join Date: Jul 2002
Posts: 434
|
|
I use Pocket Mechanic Pro!
I use Anton Tomov's brand new and re-designed Pocket Mechanic Pro! This program,I feel, is simply the best management tool out on the market today. No other program offers such an array of tools for the Pocket PC to keep our Pocket PC's running as fast and efficient as possible. The SD defragmentation module in the program DOES speed up read and write times. I've formatted my SD cards using Windows and other third party programs and Pocket Mechanic Pro just simply works the best. Give it a try www.antontomov.com.
Monty Gibson
|
|
|
|
|

06-24-2006, 09:56 PM
|
Thinker
Join Date: Aug 2006
Posts: 484
|
|
Quote:
Originally Posted by Menneisyys
IMHO it's just the need for upgrading the FAT.
|
Quote:
Originally Posted by daS
My own hypothesis would be that the time to read and process the extra FAT table entries for the fragmented files really does significantly impact the performance.
|
As you can see Werner, we agree! :wink:
My only point is that I would like to get confirmation of our collective opinions from someone that develops the device drivers or cards that can give figures to back up our logical "conclusions". For such a person, it should be relatively easy to calculate the impact of each fragment on the overall write times.
The reason I'm still even a little skeptical is that while I would expect the write times to be greater than the read times for fragmented files, I would not have expected the impact to be significant for very large file sizes since the time to write the FAT entry should be small relative to the time needed to write the data to the file itself. (Unless of course, the card is extremely[ fragmented. OTOH, since card makers can "play games" to "wear level" areas of the card that have many write cycles (i.e., the FAT table) there might be something interesting going on there that impacting speed.
|
|
|
|
|
|
|