Is it bad to defragment a USB Flash Drive?
Hire the world's top talent on demand or became one of them at Toptal: https://topt.al/25cXVn
--------------------------------------------------
Music by Eric Matyas
https://www.soundimage.org
Track title: Ominous Technology Looping
--
Chapters
00:00 Is It Bad To Defragment A Usb Flash Drive?
00:14 Accepted Answer Score 21
01:04 Answer 2 Score 2
01:21 Answer 3 Score 1
02:24 Answer 4 Score 4
03:34 Thank you
--
Full question
https://superuser.com/questions/332171/i...
--
Content licensed under CC BY-SA
https://meta.stackexchange.com/help/lice...
--
Tags
#usbflashdrive #hardwarefailure #defragment
#avk47
ACCEPTED ANSWER
Score 21
You should not defrag flash media.
First off, there is no benefit. Defragging a traditional magnetic hard drive is beneficial as the actuator arm has to move the heads around the platter to find the data. Defragmenting orders the data on the hard drive, and the actuator arm has to seek (move around) less. However, flash media has no moving parts, therefore is has virtually no seek time.
Flash media does wear out though. It takes a long time, with lots of writes to the same location repeatedly. Modern flash drives have a technology called TRIM that minimizes writes to the same location by spreading them around the entire drive. TRIM basically does the exact opposite of what you are trying to do - it fragments the data.
In addition to that, most OSs will not let you defragment flash media (for the reasons mentioned above). There may be some 3rd party tools that will bypass the restriction, but it is not a good idea.
ANSWER 2
Score 4
I know many people will disagree.
I have already seen multiple posts on the net stating that there is not need to defrag USB flash drives. However there is a need to do it in some special cases.
Here is an example for your consideration:
Consider the situation when you have a complex grub.cfg
with multiple OS running of the USB and some other files that you store on your USB drive. Files are badly fragmented and you need to add an ISO to boot. There is about 20% of empty space and ISO ends up fragmented. But grub4dos
won't boot an ISO unless it is in contiguous disk space. What would you do?
Anyway since we are talking about Flash drive than there is no need to use traditional defrag tools that run in a loop and perform multiple (?unnecessary?) write ops. If your flash disk is reasonably small then you can just copy all your data to temporary directory (anywhere on your HDD), then wipe your flash drive, then copy data back onto it. This will be much more efficient then any defrag algorithm and still do the same job. And you will prevent wear and tear to your flash disk
So my answer would be: Don”t defrag flash drives unless you really have to. And if you have to, don't use defrag tools, just do it manually.
ANSWER 3
Score 2
The Diskeeper program, which has been the best defrag utility, has a optimization module for SSDs, called Hyperfast. It doesn't defrag your SSD-type drives, it optimizes them.
ANSWER 4
Score 1
It depends on what is on the drive. You will not get any performance increase by defragging a flash-drive, but it will have an impact on data-recovery.
On the one hand, flash-memory has a limited number of write cycles, so doing a lot of writing will eventually wear it out. Flash drives, memory cards, and SSDs use tricks like wear-leveling and TRIM to extend the life of the media, but defragmentation tends to cause a large number of writes, which will cause it wear out all the faster.
On the other hand, fragmented files are infinitely harder to recover when accidentally deleted, hit by a virus, etc. so keeping your files in a contiguous state (e.g., by defragmenting) will greatly increase the chances of recovery.
Therefore, like I said at the start, it depends on what is stored on the drive, how important the files are, how likely you are to need to perform data-recovery, and how frequently the files are changed (frequent deletions and copies will lead to fragmentation faster as well as eat up more write cycles).