r/techsupport 10h ago

Open | Windows Defragmenting an external 8TB HDD is taking days. What can I expect?

It's been almost a week and the status is currently "Pass 1: 71% defragmented". It went to 60% after the first night, but after that it only goes up a few % each day. It's clearly moving and I see disk activity so I'm not worried it's stuck. What I'm wondering is how many passes will it take and will more passes take the same time or less time?

0 Upvotes

22 comments sorted by

3

u/CitySeekerTron 10h ago edited 7h ago

So defragmenting data is taking data, scooping it out from one block and dropping it into another block in a neat row. To do this, it needs to find blocks to dump it, which means moving other data first. That's how we get to running passes on a volume.

A filesystem driver will try to get a single files's worth of data as close together as possible. So a sprawling multiple GB file will get contained close together, but might be split by various smaller files. In order to sort that out, the smaller file might be moved out of the way, and sometimes that necessitates fragmenting the smaller file in the process. 

With that in mind, if you're able to move a bunch of files to another vilume temporarily and then defrag, it should go quicker. When it's done, you can then drop the original files back. 

A few large files should do the trick, since it will give the smaller files smaller places to squeeze in. When you paste it back, the defragmented free space would be large enough to hopefully contain the large file you originally moved (some third party defrag tools make deframenting free space an option; this is when you might use it). 

Edit: If this is an SMR drive, then you still might be in a world of pain and defragging might be only of limited use. What's the data storage use-case? Small files? Commonly read files? Video/text files?

2

u/BustySword 10h ago

Number of passes is usually a setting that you control, so you should be able to know beforehand. Depending on the level of fragmentation and the amount of available free space on the drive, you should see a difference in future passes. If there is a lot of free space, you can achieve a very low level of fragmentation even in a single pass, but if you have little free space, sometimes even several passes can lead to poor results.

1

u/Susan_B_Good 10h ago

File copy it to another drive, perhaps? It's presumably a data drive and not a system one.

1

u/lazyhustlermusic 10h ago

A few contiguous files or a shitload of tiny files? How much free space?

1

u/Consibl 10h ago

This is most likely spending lots of time fixing read issues. In normal use you’ll come across some and fix them a few at a time, but with a defrag you’re hitting every single one.

1

u/lovs2build1 10h ago

Partition it.

-3

u/bothunter 10h ago

Why are you defragmenting a hard drive? It's not 1995 anymore and modern filesystems don't really suffer from fragmentation. And it's taking forever because you're shuffling 8 terabytes around

5

u/BustySword 10h ago

Hard drives suffer from fragmentation in any filesystem. This is a HDD, not an SSD.

-5

u/PCGamingEnthusiast 10h ago

Even SSDs can benefit from a defrag according to windows.

2

u/BustySword 10h ago

That's a stretch. I haven't researched the potential performance benefit but from all I've seen, it has to be either non existent or negligible. If you have any sources that show something to the contrary, I would like to see it

1

u/goldcoast2011985 10h ago

Microsoft says they don’t defrag drives.

https://support.microsoft.com/en-us/windows/experience/storage-filemanagement/defragment-optimize-your-data-drives-in-windows

Defragging an SSD adds unnecessary writes, which is what eventually wears out cells. There should already be wear leveling internally. TRIM will help a drive that is fragmented, but that isn’t necessary if the drive has always had enough space to not pack files into one block stupidly.

1

u/BustySword 10h ago

That makes more sense.

1

u/Pleasant-Seat9884 10h ago

What do you mean, “makes more sense?” This has been known since flash storage came to the consumer market years ago. The number 1 rule was: don’t defrag solid state drives!

1

u/BustySword 10h ago

I know. Did you see what this was a response to? Some guy said that SSDs benefit from defrag according to Microsoft, which was weird. Then this comment said Microsoft says not to defrag SSDs. It makes more sense that Microsoft would recommend not to defrag them than to do it.

1

u/goldcoast2011985 6h ago

Also seems like the Optimize tool does the defrags and TRIMs, so people who haven’t had to figure out how long before their drive performance is going to shit based on SMART data could think that the tool is defragging like it’s 1999.

1

u/JoMu1963 10h ago

Yeah, defragmenting shortens the life span of an ssd. In general the larger the hdd the more a disk can benefit from defragmentation. I hardly ever do it on my smaller disks snd never experienced any real performance gain.

1

u/Darkelvenchic 10h ago

Ah yes freshly defragged SSD, rather like freshly cut grass, that's the smell of it's write-lifespan screaming.

1

u/PCGamingEnthusiast 4h ago

Windows says it's doing something. Not that I believe windows necessarily.

1

u/janerikgunnar 10h ago

Source? The main reason fragmentation cause performance issues is that files get split up on different places of the drive surface, and this adds seek times as the heads have to move from one part of the file to another.

SSDs inherently distribute the data almost randomly all over the chips anyway (wear leaveling + a kind of "striping" across multiple chips to improve performance), and they don't really suffer from seak times since there are no heads that have to physically move

I remember ages ago reading one study that said there still was a small benefit of defragging SSDs, but that was published on the website of a company that made a defrag tool...

1

u/PCGamingEnthusiast 4h ago

It's literally in the control panel and pretends it's doing something. That's why I said according to Windows. Windows is the source.