General discussion

Do you still need to defrag your hard drive these days?

Hi, hopefully some of your experts can answer this: to defrag or not to defrag your drive? I recently just bought a new Dell Inspiron laptop running Windows 10 with an Intel i5 CPU, 8MB of RAM and 1TB hard drive. I come from an old and probably outdated computing maintenance knowledge and when things are running sluggish on the PC, the first thing I do is defrag the hard drive and run a scan for viruses; at least that was what I learned from others over the years. My question is simple: Is defragging your hard drive something that is still valid today when you feel your system is running sluggish? Or is that a trick of the trade that has long been abandoned? If not defrag, what do you recommend when your system is running sluggishly? Please enlighten this old fart with the new age tricks. Thank you.

--Submitted by Peter H.

Discussion is locked
Reply to: Do you still need to defrag your hard drive these days?
PLEASE NOTE: Do not post advertisements, offensive materials, profanity, or personal attacks. Please remember to be considerate of other members. If you are new to the CNET Forums, please read our CNET Forums FAQ. All submitted content is subject to our Terms of Use.
Reporting: Do you still need to defrag your hard drive these days?
This post has been flagged and will be reviewed by our staff. Thank you for helping us maintain CNET's great community.
Sorry, there was a problem flagging this post. Please try again now or at a later time.
If you believe this post is offensive or violates the CNET Forums' Usage policies, you can report it below (this will not automatically remove the post). Once reported, our moderators will be notified and the post will be reviewed.
- Collapse -
In regards to defragging

From my knowledge, HDD do still have fragmentations issues, but the NTFS filesystem does tend to have less than FAT-32, and defragging will do nothing to an SSD.

I know one thing I have added to my sluggish system regimen has been viewing startup processes and disabling which ones I do not need which tends to help with start up times.

However, as I'm sure you know, a system being "slow" is a very broad problem with multiple ailments and solutions.

- Collapse -
Don't ever defrag an SSD

Trying to defrag an SSD will achieve no benefit but it WILL wear out your SSD faster (there is a limit on writes before they become unreliable).

Spinning rust hard disks still do need defragging in Windows, though NTFS much less than FAT32 providing you maintain a reasonable amount of free space. If you are running very tight, the file system has no option but to fragment files. The automatic defrag is "set and forget" but only useful for HDDs. I prefer to my own manually as and when necessary. Some third party defraggers, e.g. Auslogics Defrag, will give you a map of the current state of your HDDs (quick) before you embark on a Defrag (slow).

Most Linux file systems don't need defragging - I've not needed to defrag my Opensuse BTRFS file system since I set it up over 2 years ago.

- Collapse -
There are exceptions, but rare

There are exceptions when it is good to do a tiny bit of defragging an SSD. Especially if you install or remove programs or hardware, the registry hives may become defragmented, slowing down system startup. I mentioned elsewhere about defragging Outlook PST and other large email files. Even with an SSD, defragging these file can speed up email. But, to be true, the effects are not nearly as great as with a spinning old-timey hard drive.

- Collapse -
Registry and PST "fragmentation"

The "fragmentation" of the registry and PST are more about the internal structure of the file, as opposed to the physical layout on the disk. Both of those file types can actually be in one contiguous block on the disk, and yet still cause performance issues. So, a generic disk defragmenter will not help in those situations. You need a different type of tool that knows the format of those files to go in and rewrite them and clean up the structure.

As ben_myers states, this sort of restructuring does apply equally to HD and SSD.

- Collapse -
.pst files on an SSD???

Yipes. Unless I'm misunderstanding you, Ben, it sounds like you have Outlook .pst files on an SSD?

Well, I guess that's unavoidable in some cases, but if it's a choice you can make, then you should never put them there, since they're constantly being written-to. I guess that's implied, but I just wanted to underline.

- Collapse -

Actually, I'd say that an SSD is the perfect place for a PST. It's a very similar situation to using an SSD for the Windows Temp file. SSDs make the most difference on files that are accessed a lot.

With the size of today's SSDs, and their wear leveling algorithms, it takes years to wear out any spots on an SSD. Even if a hypothetical program were written to literally write non-stop, it would take years.

The admonition against defragging an SSD is because it's extra writes that provide no benefit. A PST on an SSD provides a noticeable benefit. That's basically what they're designed for. So, I recommend it.

- Collapse -

I think you meant to write "hives may become fragmented"

- Collapse -

I'm not 100%sure but I believe windows 10 automatically defrags your system on a regular schedule so you don't have to.

- Collapse -
Not entirely correct

If Windows 10 detect that you have a conventional HD, then, it will periodically defragment it.
BUT, if it detect that it's an SSD, then, it won't ever attempt to defragment it at all.
This automated defragmentation started with Windows 7 (without skipping on the then new SSDs), got improved with Windows 8/8.1 (started skipping SSDs) and further improved with Windows 10.

- Collapse -

Yes, Windows 10 defrags convention HDDs, and like others have commented, you do not need to defrag an SSD. My HP Desktop computer has an i7-6700 processor and 24 gig of ram, and a 500 Gig Samsung SSD. It also has a conventional HDD which is used to store the data. The 500 Gig SSD (C) stores programs. the 2 Tera HDD (D) is for data. SSDs are much faster than HDDs and for programs where there is a lot of data to put into ram, for me personally it is really preferable. Also my Cox Internet supplies fast enough data that my Router gives me 123 meg data download transfer. All of this adds up to a Computer that is smooth as silk. A multi-core processor is worth the money, since it makes your computer run a lot faster.

- Collapse -
Yes and no

If you have an SSD, don't defrag. You'll shorten the life of the drive for zero effect. With a spinning rust drive, yes, defragging can still help, but likely you just need to free up more disk space and let the operating system do it. Windows doesn't like drives with less than 20% free space, and won't defrag it automatically as well as one with more disk space.

- Collapse -
Absolutely yes AND Absolutely no

This look strange but both answers are correct depending on the kind of drive you have.

For the YES :
If you have an hard drive (HD), then, you need to defragment it regularly as, with use, files get scattered all over the drive's surface. When files fragments are scattered, it takes a lot longer to access them.
So, defragmenting is a necessity.
Increasing capacity only make it even more needed than before. It also may prolong the life of an HD.

For the NO :
If you have a solid state drive (SSD), there are no moving parts, so, you don't loose time accessing the various parts of a fragmented file. The thing with SSDs is that writing to them is limited and defragmenting will adversely affect their life.
Here, defragmenting is NOT needed and can harm the drive.

- Collapse -
The Answer Requires a Short History Lesson

Defragging has very little to do with the actual hardware since the days of the IDE drive where they implemented sector re-allocation. In the beginning we had MFM drives with fixed sectors, tracks and cylinders. The reason for defragging was that, as files got deleted, there would be holes created and a large file would not likely fit in all one large piece. When files are split apart (fragmented), you will have to use multiple reads to access the data. The first good defragment tool came with PCTOOLS and was good. I remember finding one that actually took the hardware into account and minimized head movement by filling up a complete cylinder (wrote to each platter in succession as the track got full). Great stuff.

When IDE drives came about, the location of sectors became uncertain because if a bad spot appeared, the data could be relocated elsewhere independent of what the OS (Windows, for example) knew about.

Then there is NTFS. In all of Windows storage management, the basic allocation unit is NOT the sector at all. It is something called a cluster and clusters are laid out at the time you format the HDD and, more recent, when you allocate space for files.

So, as long as you are using NTFS, there is, technically a need to improve I/O speed by defrag. HOWEVER, (and I really dread this part), SSD has an issue where continued writes to a storage location make the data writes UNRELIABLE. That is, you might not even get an error; your data could just be messed up. So, it is imperative to avoid a lot of writes to the disk, if possible. Since there is no latency (waiting for a disk to spin to a location nor head movement on an SSD, there is very little need for defragmenting an SSD and it is not advised.

NTFS is still NTFS. There are still clusters out there and if your file is scattered among clusters, there will have to be multiple I/O sequences to read a large file, if the clusters are not contiguous. What about Win 10? You can set up Win 10 to automatically defragment but you need to make sure it is active if you want to do that (I usually don't because of the overhead). There are also defrag programs out there that are better than Microsoft's (check out Smart Defrag) and these automatically don't defrag SSD drives but just performs TRIM operations on them.

My personal opinion/recommendation is to run TRIM on SSD drives but do NOT defragment them. HDD drives should be defragmented but I'd suggest not using auto-defragment routines. Just do a periodic check on them. Think about it this way. If you no longer needed to defrag, why would Microsoft still give you the utility? The performance change may not be as dramatic as "the old days" but it is still relevant, especially if you have a lot of small files that get deleted often. I would just check the utility and see what it says especially if the machine seems to slow down. Remember that, unless your processor or memory utilization is near 100%, disk I/O is probably the big thing that can slow you down (that is why the adding of an SSD drive can produce such dramatic improvements).

Now, if you have RAID drives, the effect of defrag may be even less. At work, we added huge RAID array (SAN) systems to improve disk allocation espectially for virtual systems (VMWARE) but this was mostly for servers and NOT workstations.

- Collapse -
Why Not Let Windows 10 Handle Defrag?

You mentioned "... HDD drives should be defragmented but I'd suggest not using auto-defragment routines. Just do a periodic check on them. ...".

I'm curious as to why you suggest that. Windows 10 optimization routine is, by default, a weekly check of the boot drive. Typically, it does so during idle time. It analyzes fragmentation the same as if you implement that manually and, if there's any significant fragmentation, it then defrags the drive and keeps most frequently used programs/apps near the outer edge of the disk(s) to ensure they have rapid access. For a home user this is ideal. Even busy workstations have some idle time during the day. There are exceptions, though. I have a friend who loves trying out software. He installs programs (and games) several times a week, plays around with them and then (usually) uninstalls them. Apparently, he notices some performance loss before Win 10 gets around to optimizing, so he does it himself. I keep telling him to get a 480GB SSD, but he has yet to take the plunge! (Heaven only knows how he avoids getting bogged down with adware/spyware/malware, but his system seems fine when i'm visiting there. Suppose he's very careful to avoid installing unwanted extras that are often bundled with free software.)

Some of our computers at home have Windows 10 while others are running Windows 8.1. It's a pretty good OS when using Classic Shell or Start 8, and it allows us to use Windows Media Center to record TV shows, thus saving the exorbitant monthly rental cost of a DVR from Comcast. All of them now have SSD boot drives. Prior to that, we found Win 10's weekly optimization routine worked great for our HDD boot drives.

For the record, Windows 10 also optimizes SSDs, but this does NOT include any frequent defragging. Mainly it checks if TRIM is working and may run garbage collection if needed.

It's true that frequent defragging of an SSD is unnecessary and that it causes additional wear on the drive. However, those who advise that it's really bad to ever defrag an SSD (and i don't mean you) .... well, it's kind of like saying you should never drive your car uphill because it causes extra wear on the engine and drive train. Cheers!

- Collapse -
Defective sectors are bad. Really bad.

My rule of thumb is that if the SMART data shows EVEN ONLY ONE defective-and-reallocated sector, it is time to replace the drive. A defective sector is a sure sign of a drive going south. Others may disagree, but I happen to believe that data is very important and you often cannot recreate it.

- Collapse -
No, it doesn't require a history lesson.

But knock yourself out!

- Collapse -
Defrag: Yes. Value depends on how full

As others have pointed out, as a drive is used, the blank spaces of deleted files will be scattered around the surfaces of the platters, and that will lead to later files getting fragmented, which leads to extra head movement, which takes time and puts wear on the mechanisms. (This applies to Linux, also. There's nothing magic in the OS that can compensate for actual physical reality.)

The value of defragging will depend on how full your drive is. With today's ginormous drives, the average user surfing the web and answering emails and storing their photos will not fragment their drive very much. Therefore, it will be rare to notice any significant improvement in performance after a defrag.

One of the other advantages of a defrag is that it will reduce the amount of movement of the heads, which will increase the life of the drive. But, the defrag operation itself causes a short burst of extra movement. So, it's a trade-off. At some point, one burst of defrag will save a lot of extra movement in the coming months. Also, doing it more often can reduce the amount of work it needs to do in the next defrag. Where that trade-off actually occurs varies by user.

By default, Windows has an entry in Task Scheduler (Start | Programs | Windows Administrative Tools) to defrag your drive once a week. For most users, that defrag is not going to have a lot to do, so it won't put much extra strain on the mechanisms. For most people, somewhere between once a week and once a month is probably reasonable.

As others have said, you do not want to defrag an SSD. It doesn't help (SSD speed is not noticeably affected by the physical layout of the files.) And, the defrag operation will have a noticeable effect on the life of the drive. Also, Windows will refuse to defrag an SSD.

I've been using computers since the mid-'70s, so I'm familiar with the what you're talking about. Back in the days of 10 MB hard drives and 100 ms head seek times, an occasional manual defrag could make a noticeable difference. That is very rarely true, anymore. I recommend just letting Windows defrag every week and forget about it.

Drake Christensen

- Collapse -
Linux does not need to worry about Defragmentation

Linux does not need defragmentation. The file system it use don't let files get split across the drive. They use the idea of making space for the file before adding it to the drive. This approach means it takes longer to save data but eliminates the need for Defragmentation.

FAT32 file system on the other hand do need defragmentation but Linux usually does use this one.

- Collapse -
Linux partitions can become fragmented

What do you think happens when you record a large video file to a Linux partition that is nearly full, and then start editing it, creating multiple working copies? Another way of saying it: What do you think happens where there does not exist any span of empty disk space that is large enough hold any of several large files being actively worked on?

The spacing of files does forestall fragmentation in most everyday use. I'm sure they use statistics to predict how much space makes sense for different types of files. But, there are real world situations where fragmentation does happen. And, once fragmentation starts, it is actually exacerbated by the spacing. That spacing reduces the size of the largest single empty block.

So, the blanket statement "Linux drives cannot become fragmented" is just not true.

Apparently, there are rudimentary defrag functions built into the partition drivers that run on-the-fly, which will also push back the need for a good optimization pass. But, in not-outrageous circumstances, those will sometimes not be enough.

That's why Linux defragmenters do exist. That's why the advice to copy-wipe-copy is out there.

I know this is off topic. It just bugs me when someone makes a blanket statement that's incorrect.

- Collapse -
Large video files ...

Large video files on almost full drives ... and then you create multiple working copies by editing. Now, where are all those large working copies going to fit on this nearly full drive? It seems to me that this is not a very good working environment. But yes, if you can fit all that data on that drive, but only "just barely," you do have a fragmentation-prone environment. On the other hand, large video files, at normal play speed - which is not all that fast, compared to an outright copy operation - won't suffer any noticeable delays due to cluster-to-cluster seek operations. So, arguably, this is not a situation that urgently needs defragmentation. I'll put together a more general response in a separate post just now.

- Collapse -
To Defrag or Not.....

As others have said, Yes you defrag a normal hard drive that has spinning disk or disks in it. And, no, you do not defrag a Solid State Drive for the reasons given.

I personally, despise SSDs. Therefore, I do not use them. I only use regular hard drives with the spinning disks.

I do not use any scheduled defragging mode. I simply run an Analyze test every so often and when I have to uninstall and/or install a program or delete a large number of other types of files. If I see a lot of red in there, then I shut off all the stuff running in the back ground that I can (especially the stuff in the taskbar) and then run the program that I've chosen to be my go-to defragging program. (I use Defraggler.)

On a side note, Windows - as long as it's built on the same original kernel - will always need to be defragged on regular basis. Linux runs a whole lot differently and normally never needs to be defragged. I've never worked on a Mac so I can't address that with any first hand knowledge of my own.

That said, there are many other things that you can do to help speed up a sluggish Windows machine. You can clean out junk files with CCleaner. It's free and it works well. Make sure you have it get rid of old Prefetch files. When that gets clogged with a whole bunch of stuff in there, it cornfuzes[sic] Windows a bit which slows it down.

The routine that I use is to get rid of all junk files that build up during any type of use at all of the computer. To do this I use CCleaner and Spybot Search & Destroy to get rid of Tracks that CCleaner leaves. I then run Malwarebytes Antimalware and Avast AV. THEN I go to Defraggler and use that to defrag with. After all of that is done I set a manual Restore Point. Like I said, I do this whenever I have to uninstall and re-install a program, when I install a new program, delete a large number of files or, otherwise, on a monthly basis. However, I do use CCleaner on a daily basis as I've found that the cleaner you keep the system, the smoother it runs. Yeh, it may have to replace deleted Prefetch files each time, but that is usually faster than the sluggishness caused by an over-packed Prefetch folder.

I hope this helps.

Note: During the coming few weeks, I will not have time to come back in here to discuss anything. Because of that, I will not be Tracking this discussion.

- Collapse -
A little off topic, Linux fragmentation

A How To Geek article describes how Linux deals with fragmentation. Basically, it leaves big gaps around files, to give them room to grow. Then, it does some defragmenting on its own. But, on a really full drive, it can become fragmented. To deal with that, the article recommends the tedious task of copying everything off, deleting everything, and copying everything back on. The search I did implied that there are defrag utilities available.

So, Linux reduces the need to defragment. But, since we're dealing with the physical layout of files on drive platters, there is no way to avoid fragmentation in all cases.

- Collapse -

This is a " whether to or not Defrag Win 10 HDD " anyway.
As for myself, I haven't defragged my HDD or
anything else ( SSD's )with exception of running a scan with Defender....

Post was last edited on April 8, 2018 2:41 PM PDT

- Collapse -
As an aside...

I just checked my discs, All 0% unfragmented Auto defrag is set to weekly. This old defrag thing is for older OS's.

Post was last edited on April 8, 2018 2:54 PM PDT

- Collapse -
Recommendations on PC Maintenance when sluggish


I believe that defraging the C-drive (only for HDD) is still a very effective maintenance maneuver. I almost always experience a system speed performance increase, so my systems are set to defrag once per month.

Here are a few additional steps I highly recommend:

Create a new Restore point titled "B4 Maintenance" before you do these steps:

1. Delete all entries in PreFetch directory. They will automatically rebuild again to be only the things you use.
2. Download a new version of CCleaner and use the left menu to do the "Cleaner" and "Registry" cleanup functions.
3. Create a new Restore point with a title of "Cleaned up system MM/DD/YY".
4. Ensure Windows Defender (unless you use a different virus protector) and MalwareBytes are running.
5. Restart computer and check for better operations. If something is not correct, restore system to the "B4 Maintenance" restore point.

Happy Computing!

Post was last edited on April 9, 2018 6:30 AM PDT

- Collapse -
Optimize ~ Automatic Defragmentation in Windows 10
It's my understanding that Windows 10 automatically defrags I just type defrag in the Cortana search box on the taskbar. This opens the Optimize window. I've never gone there and found more than 1 or 2% fragmentation. It's done automatically.
- Collapse -
I just don't think its practical anymore

I've been at this game since the early 80's and would frequently not just defrag but optimize my harddrives as well to lessen the rate of fragmentation. SPINRITE was one of my most used utilities - at least weekly. This worked for 10 meg HDs - only took 1/2 hour or so - and on up through a few 100 megs. Then came GB drives - by 2 gigs the process just took too long and I stopped. I couldn't imagine even attempting it on an 8T drive!!

BUT - to help slow fragmentation I do ALL my work on a RAMDRIVE (4 gig) and then when done move the WHOLE file to hardrive for archiving - to several actually so at this point I am archived and backed up. Having 29T online gives me the space I need and using BATch files from a command prompt to copy the files makes it a painless procedure.

Does it help - hard to say! BUT I don't notice any harddrive slow down and at least the backup part has gotten me though a couple of harddrive failures over the decades without losing a single byte!

- Collapse -
Maintenance routine

Rather than waste time reiterating the SSD vs HDD discussion, I will highlight the other maintenance aspects that can improve performance.
1. Disk cleanup - if using a HDD rather than an SSD, you may have 30GB or more of junk files that increase seek times. Run disk cleanup in “admin mode” to get more cleaning options such as cleaning out update files, by right clicking on the icon under system tools to get the run as administrator option (You could access disk cleanup from disk properties, but then you won’t have the option to access administrator mode).
2. Registry cleaning - junk in the registry can lead to hanging wait times. I use AVG Perfomance’s registry cleaning tool (the same tool that was once TuneUp Utilities, now bought by AVG and buried in their maintenance suite). CCleaner is another alternative but I don’t think it does as good of a job.
3. Registry “defrag” - similar issue to #2. This is also an option within AVG Performance. Will do an analysis within windows than require a reboot to run prior to loading windows.
4. Defragment (for HDDs) - “Defraggler” is better than the built-in defragmentation. The windows defragmenter might stop with say 5% still fragmented. Defraggler will get this down to zero.
5. Boot time defragmentation - available within some programs (such as Deffragler), this will defragment system files that would normally be in use and hence untouchable by the windows defragmenter. Will run prior to the system loading windows.

- Collapse -
Most definitely YES

I am a Microsoft-trained certified tech. Way, way before I got any official training or certification, in the old days of DOS, I followed the advice of defragging for things to run better and back to "normal". Now, even with a lot of techs, either not knowing of defragging or being against it, I still go back to it when programs behave strangely or there is some unexplained sluggishness, and BANG! things are back to normal.
On the other hand, even with Windows 10 supposedly doing it automatically, the result or maybe the newer Microsoft version of defrag does not seem to do the job properly. I have often times needed to use the defragging option of other software [ASC, WinOptimizer, etc, etc] because the results are more effective and "problems" disappear even before the defragging operation is finished.

- Collapse -
This is what I see...

This prompted me to go into the Win 10 'Optimise Drives' option. Strangely, in view of many replies, it says my SSD 'C' drive is OK, 'last run 22 days ago' suggesting Win10 DOES defrag SSDs (this might explain why it is my third or 4th SSD in this machine). My spinning HD D Drive is shown as 0% fragmented and always has been when I've occasionally checked, ever since Win 10 was installed, several years ago. This suggest that the OS is managing it efficiently (or the 0% is wrong).

CNET Forums