Defrag flashdrives in Vista?

V

Victek

I tried running defrag on a flashdrive in Vista Business and the cursor just
sat there spinning. This works fine in XP. Any suggestions?
 
A

Andy/Bandi

This may be a dumb question on my part, but why would you want to defrag a
flash drive? It stores data in its electronic circuitry. Defragmenting makes
sense for HDDs, where the data is stored in different locations on spinning
disks.
 
V

Victek

Andy/Bandi said:
This may be a dumb question on my part, but why would you want to defrag
a flash drive? It stores data in its electronic circuitry. Defragmenting
makes sense for HDDs, where the data is stored in different locations on
spinning disks.
That's a valid question. I haven't personally done tests to see how much
(if any) difference it makes to defrag a flash drive, however it does come
up occasionally. For instance I bought an mp3 player and the
troubleshooting section in the manual recommends defragging the memory if
the music playback "slows down". That sounds dubious to me, but there it
is. I googled the NG's and read a couple of threads about it. Some people
say defragging flash drive can't make any difference since there are no
moving parts. Yet, others mention that they have experienced deteriorating
performance and defragging solved the problem.
 
V

Victek

Victek said:
That's a valid question. I haven't personally done tests to see how much
(if any) difference it makes to defrag a flash drive, however it does come
up occasionally. For instance I bought an mp3 player and the
troubleshooting section in the manual recommends defragging the memory if
the music playback "slows down". That sounds dubious to me, but there it
is. I googled the NG's and read a couple of threads about it. Some
people say defragging flash drive can't make any difference since there
are no moving parts. Yet, others mention that they have experienced
deteriorating performance and defragging solved the problem.
Well, to answer my own question the free Jkdefrag program is Vista
compatible and will defrag flash drives.

end of line.........
 
R

Richard Urban

To what benefit. Why don't you want to defrag the system RAM. If it needed
defragging, which it doesn't, don't you think that would make more sense?
Why worry about a drive that is used so very much less than the system RAM
is accessed.

--


Regards,

Richard Urban
Microsoft MVP Windows Shell/User
(For email, remove the obvious from my address)

Quote from George Ankner:
If you knew as much as you think you know,
You would realize that you don't know what you thought you knew!
 
V

Victek

As I said earlier in the thread, I'm not certain that it makes a
difference - some people believe it does and it caught my attention because
it was listed in the troubleshooting section of my mp3 player manual. I
haven't been able to find a rigorous test with a definitive result. I'm not
sure that a comparison with defragging system ram is valid because system
ram erases itself when the system powers down - there is little opportunity
for fragmentation to grow. OTOH, fragmentation on a flash drive does
increase over time, just as it does on a hard drive. Whether it has any
impact on data transfer speed or data integrity is the (unanswered)
question.
 
D

DevilsPGD

In message <[email protected]> "Victek"
Yet, others mention that they have experienced deteriorating
performance and defragging solved the problem.

If parts of the memory space are starting to deteriorate, defragmenting
would move the data to other places on the drive. This could give the
appearance of resolving the problem, at least until/unless you need to
access whatever data was placed on the bad portion of the drive.
 
M

mmaterie

That's a valid question. I haven't personally done tests to see how much
(if any) difference it makes todefraga flash drive, however it does come
up occasionally. For instance I bought an mp3 player and the
troubleshooting section in the manual recommends defragging the memory if
the music playback "slows down". That sounds dubious to me, but there it
is. I googled the NG's and read a couple of threads about it. Some people
say defragging flash drive can't make any difference since there are no
moving parts. Yet, others mention that they have experienced deteriorating
performance and defragging solved the problem.

Defragmenting Flash for the purpose of file access is beneficial when
the fragmentation is really, really bad (several thousand fragments
per file). As an example, that could happen on some flash-based iPod
playing large audio/video clips. Where you will see benefit is in free
space consolidation as flash and SSD (solid state disks) use erase-on-
write technology. Badly fragmented free space can slow flash devices
down beyond even HDDs for sequential writes (what a large video file
saved to the device would do). It's still OK to defrag flash/SSD on
occasion and when fragmentation gets really bad - maybe every 6 months
or so.

Michael
 
D

Dana Cline

Given that flash drives aren't that large, wouldn't it make more sense to
just create a directory on the hard drive, move the contents of the flash
drive to that directory, then immediately move them all back? That _should_
write them all sequentially. You _may_ need to format the flash before
moving the files back, but I don't think that would be necessary...

Dana Cline - MCE MVP
 
M

mmaterie

Given that flash drives aren't that large, wouldn't it make more sense to
just create a directory on the hard drive, move the contents of the flash
drive to that directory, then immediately move them all back? That _should_
write them all sequentially. You _may_ need to format the flash before
moving the files back, but I don't think that would be necessary...

Dana Cline - MCE MVP

Sure that makes sense. So long as the disk in question isn't a system
disk, which can be the case with the 32GB Solid State Disks shipping
with some of the new planned lightweight/rugged notebooks.

-Michael
 
D

Dana Cline

Well, true, but I don't remember the original poster saying _that_. Yeah, it
would be interesting to have a flash drive for the laptop but 32Gb is _way_
too small. My laptop has a 160Gb and I'm sure it'll be filled up long before
the end of its useful life.

Dana Cline - MCE MVP
 
R

Richard Urban

Again I will say, defragging a USB stick does nothing for you - or anyone.

1. There are zero moving parts in solid state memory (RAM).

2. All file selection is performed electrically

3. Electricity travels at the speed of light (186 thousand plus miles per
second)

4. Any "perceived" increase is pure "imagination" on the part of the
person who thinks he has made a difference in file access on his memory
stick!

--


Regards,

Richard Urban
Microsoft MVP Windows Shell/User
(For email, remove the obvious from my address)
 
M

mmaterie

As I said earlier in the thread, I'm not certain that it makes a
difference - some people believe it does and it caught my attention because
it was listed in the troubleshooting section of my mp3 player manual. I
haven't been able to find a rigorous test with a definitive result. I'm not
sure that a comparison with defragging system ram is valid because system
ram erases itself when the system powers down - there is little opportunity
for fragmentation to grow. OTOH, fragmentation on a flash drive does
increase over time, just as it does on a hard drive. Whether it has any
impact on data transfer speed or data integrity is the (unanswered)
question.






- Show quoted text -

Hi Victek,

Here's a quick test you can do for yourself to show that free space
fragmentation on Flash drives does affect performance. I did this
myself.

I took a brand new Kingston 1GB DataTraveler Hi-Speed USB drive with
24MB/sec read and 10MB/sec performance (per the manufacturer).

First I did a format of the disk - FAT16. Then, using a development
testing tool from Diskeeper Corp (where I work) I fragmented the free
space. I used Diskeeper 2007 to confirm the fragmentation as well as
DiskView (a more granular tool available from Microsoft - formerly
Sysinternals). I created about 45MB of small files (16k to 48k in
size) spread all across that Flash disk.

I then grabbed the VM Player install file (145MB), and made five more
copies of it and zipped (Winzip) them into single 846MB zip file. This
file was kept on a separate spindle (SATA disk) from the OS and paging
files (to minimize variables from my time tests).

I used a simple stop-watch to time how long it took to copy this file
from the SATA disk to the USB Flash drive with fragmented free space.
It took 2:37 from start to finish.

I reformatted the USB drive (which wipes all data from the disk as
well), to the FAT16 file system again and rebooted the PC (just to
make sure the cache was clear). I then copied that 846MB zip file from
the same location over to that USB drive. This time the copy operation
took 1:14, less than half the time required to copy than when the free
space was fragmented.
From a "scientific" perspective the test can be run a few more times
to come to an average, but given the difference was so significant, I
personally did not feel the need to redo it. Anyone else is certainly
welcome to give this a go for themselves.

I did test one more case where I fragmented the free space into 24
even chunks and found no difference in copy time. While severe free
space fragmentation is an issue, mild free space fragmentation is not
- same concept as on physical disk. And yes the 846MB was fragmented
in 19 pieces.

To create the free space fragmentation (without the tool I'm
privileged to have access to), you can copy a large number of small
files to the Flash drive and deleted every other one, or other random
deletion pattern (vary between deleting every third, fourth,
fifth ...n file). If you have some programming skill this can be
scripted fairly simply. Just make sure there is enough room left on
that USB drive after fragmenting the free space to copy the same test
file.

The more severe the free space fragmentation, the longer the copy
operation will take.

That said, the degree to how this translates into real world usage
depends. The test case I made up may be so extreme that it is unreal.
I don't know what's "real-world" as I don't personally use Flash
drives that often, and even then my actual usage isn't likely to equal
yours. Assumptions to the contrary would be asinine. How often you
want to consider free space consolidation depends. My earlier
statement of every 6 months is, or course, contingent. The limited
extent to which I use USB drives and the fact my 2GB iPod Nano only
ever gets minor and infrequent mp3 file changes, I doubt I'll
personally ever need to worry about the free space fragmentation.

My only point in the test was proof of concept.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top