• Welcome to TechPowerUp Forums, Guest! Please check out our forum guidelines for info related to our community.

SSD Defragging: The safe way

Yes, we all know defragmenting an SSD as a whole is a terrible idea. Don't do it.
If you don't know, it's because flash memory has near infinite reads, but limited writes - and cheaper drives can have very very low write values.

The exception to this is modern defragging tools that can defragment individual *files* - I use defraggler for this task every 6 months to hunt down just the worst files.

Is it worth it? Yes. You get much faster read speeds on those files in throughput and latency, as well as lower CPU usage while it has to process the thousands of scattered locations as it loads them into RAM.
Heres an older thread on another forum on the topic, on a plain old SATA SSD. The difference could be from that 150MB/s (or worse) to the 15GB/s a modern NVME drive can do.
Yes, file system fragmentation DOES affect SSD read speed | Overclock.net
View attachment 311225

Another user in the thread tested a 250MB file, but with ever greater amounts of fragments.
View attachment 311227

The bigger a file the less of it can sit in your RAM - if you cant fit the entire file in RAM (large game files) it'll be far worse than smaller files that loaded once, can stay in memory.

The files that get fragmented tend to be ones updated regularly on drives that are mostly full - windows or game files that have been patched or updated but have no empty space next to the existing parts of the file, so new fragments get added to the next free space over and over again.
This is normally not an issue or builds up very slowly but it's worth defragmenting the worst of the worst.
A video or logfile? skip it! The content for a game you run every day? absolutely worth it.


This is my C: drive with a 15-month-old install, sorted by number of fragments.

View attachment 310431

Somewhere around 8,000 fragments there, that would run at 4K random performance of the SSD instead of sequential.
Yet the actual size of those files is just a hair over a single gigabyte - so defragging them won't use much of that drive lifespan at all.

I'll defrag every file with 100 fragments or more now:

Before and after:
View attachment 310432View attachment 310434

Spending 1GB of the limited writes on the drive (My 970 Pro 2TB has 1,200 Terabytes writable as it's lifespan (known as TBW) to remove 7,000 fragments is worthwhile since that's barely a drop of water in the ocean - especially if it's in programs or games you run regularly.

I ran a disk cleanup as well and emptied the recycle bin, and suddenly the value plummeted. A good example of why it's not worth defragmenting the entire drive - I'd have defragged files that should have been deleted instead.
View attachment 310437


I sarcastically wonder if 7 days to die would load faster, if it was a single contiguous file instead 4,482 pieces?
Considering the second worst file on the disk has only 230 fragments, it stands out as a single file worth fixing.
View attachment 310436
for defragging FILES, use proper tool rather than dumb retro sw like Defraggler which isn't optimized for new era or converted to commercial cr*p like ccleaner.

WinContig;)

 
Just use your SSD as it is meant to, you don't need any special tools for it. Just use it and don't look back!
Best general advice, sure.
There's many things to say about it, but defragging means unnecessary wear, so don't do it. But it's your SSD, and your money, it's just advice.:)
However, if you assign a monetary value to SSD wear, it's about one europounddollar per 10 TB. It takes a lot of (repeated) effort to burn 1 € this way.
 
Best general advice, sure.

However, if you assign a monetary value to SSD wear, it's about one europounddollar per 10 TB. It takes a lot of (repeated) effort to burn 1 € this way.
Maybe, but the world's biggest manufacturers advice to NOT do this... So don't, and just use your SSD as it is, just common sense.

Today's modern SSD are more then fast enough to overcome this also.
Totally waste of your time, do something useful... This is really something for nerds only.
 
Last edited:
I just let windows TRIM on its own, I dont touch anything anymore. I used to use CCleaner a few years ago.. not needed at all.

Especially if you use NVME..
 
I just let windows TRIM on its own, I dont touch anything anymore. I used to use CCleaner a few years ago.. not needed at all.

Especially if you use NVME..
CCleaner, more then halve the world have this piece of crap-ware on their system installed... Should be abandoned.
Defraggler, from the same company... Freeware again and of course an PAID version, says enough...
 
Last edited:
Defraggler, their own words... :roll:

They even literally say it has no impact on the performance!!


Screenshot 2023-12-26 151516.jpg
 
Last edited:
I'm surprised this thread is still going on.

Summary
  • defrag has little to no performance impact on the physical SSD
  • defrag increases wear on the SSD, how much depends on if the operation is physically trying to move the files or just updating metadata
  • defrag has an impact on reducing the logical file system overhead
  • you can use Defraggler to defrag files of your choice making it ideal if you just want to optimize particular files
  • Jim Henson was rumored to have banned Defraggler in Fraggle Rock because of the harm it could do to the local Muppet population
  • SSD's are fast enough that logical fragmentation isn't nearly as much an issue as was with HDD's
  • The HDD's concepts of physically contiguous and fragmented files do not apply to SSD's because data is stored and accessed differently in the SSD's media (no moving parts)

Did I get anything wrong? What's missing?
 
Last edited:
I just let windows TRIM on its own, I dont touch anything anymore. I used to use CCleaner a few years ago.. not needed at all.

Especially if you use NVME..
Hi,
Might use it for edge though if one uses it, ms is pretty protective of history lol
Otherwise I just use trim periodically went I delete lots of files never auto scheduled
 
As they say; If it ain't broken, don't fix it!!
 
Sure let the people defrag their own SSD just waiting for something bad to happen and it won't be us getting blamed because the manufacturer said so
 
Did I get anything wrong? What's missing?
We're not Apple walled paradise prisoners who expect things to just work. We (me not included) consider it normal to spend hours tuning the tABCDEFGH memory timing parameter in order to save tenths of seconds. And things like that.
 
Yes, it is true that Windows has no actual control over the physical location of data inside the NAND chips. Windows is moving files around so that they look continuous to the file system.
And this can be a problem. Defragmenting a whole SSD drive is, as Mussels stated in the opening post, a terrible idea. However, defragmenting individual files that are fragmented all to hell can be a good idea. The drive controller on most SSDs are smart enough to know what data chunks belong to which files and will resort as requested by the OS/File system. So while there is no direct control over data locations in the NAND, the most drive controllers will see the data being move around as an indication the file chunks need to be grouped together.

for defragging FILES, use proper tool rather than dumb retro sw like Defraggler which isn't optimized for new era or converted to commercial cr*p like ccleaner.

WinContig;)

Well, THAT was silly. It was also misinformed. News flash for you there: SSD's have been around in common use since 2008 and, more or less, operate the same way they have since then. Also, current versions of CCleaner are NOT crap. The nonsense that happened 6 years ago has no bearing on how well things are today. CCleaner is excellent and Defraggler the same.

Defraggler was last updated a few years ago, which means it is absolutely aware of modern SSD implementations. My personal fav defrag utility is included in Puran Utilities which was updated this month to include support for Windows 11 and a few other improvements & fixes. Sadly, the update did nothing for individual file defragmentation, so Defraggler still has an edge there.
 
Last edited:
I don't use defraggler from piriform I only use Auslogics Defraggler for regular hard drive as it helps with optimisation as well have it have per block panel selection to show you which files is fragmented and use windows 10 trim on SSD and yet had no problem with it. It pretty normal for SSD to get fragmented as it don't affect the performance or behaviour of it. No need to be fixated on maximum performance of read and write speed for before and after it been fragmented
 
No need to be fixated on maximum performance of read and write speed for before and after it been fragmented
I would normally agree with you. However, for files that get very fragmented, performance can be affected to a noticeable level. So defraging a single or small number of files can show benefits. The situations where this can happen are limited, but when they do, it can be irritating. I've only seen it twice on my own systems, but never thought to defrag the files causing the issue. I'm glad Mussels posted this thread, I'll be remembering this the next time it happens and proactively checking for it in my quarterly system checks.
 
Last edited:
I don't use defraggler from piriform I only use Auslogics Defraggler for regular hard drive as it helps with optimisation as well have it have per block panel selection to show you which files is fragmented and use windows 10 trim on SSD and yet had no problem with it. It pretty normal for SSD to get fragmented as it don't affect the performance or behaviour of it. No need to be fixated on maximum performance of read and write speed for before and after it been fragmented
love Auslogics, also their other sw! Especially duplicate file finder (no advertising but!)
 
Good thread op.
Blows my mind "tech enthusiasts" are so narrow minded.
But I guess most of them dont spend weeks trying to find optimal values on their ram...

Most of you should be posting on reddit, not here.
 
Good thread op.
Blows my mind "tech enthusiasts" are so narrow minded.
But I guess most of them dont spend weeks trying to find optimal values on their ram...

Most of you should be posting on reddit, not here.
And your point is .........
 
while chasing performance unicorns
Why do you have to hate on benchmarkers?

It is one thing to like tech, but another to exploit the sheet out of it.
 
Why do you have to hate on benchmarkers?

It is one thing to like tech, but another to exploit the sheet out of it.
If one labels himself as a bench-marker (his passion - if you will) sharing one's wisdom among others alike (other bench-markers - if you will) - i'm ok with that for most part. I say most part - cause back when i joined some of the extreme tech communities - Overclocking contests (in status - not prizes, you didn't get any prize other than some cheering from the community) used to be a thing. And by contests, i mean... burning dozens of high end CPUs on a montly basis (if not weekly) - while chasing the golden CPU (most OC-able). Their money - they can burn it (which they did quite litterly), i know. But at that time was strugling to earn enough for a personal PC capable of dencent perfomance - so couldn't help but feel kinda bad seeing others burning CPUs 4 fun. But hey, i didn't say anything.

On other hand... if someone calls you narrow minded (be it indirectly or otherwise) - for not be whiling to brake your sheet - while chasing placebo like benefits. Even worst - advising that to a general audience (so, it's not about - a specific niche anymore). Well, at that point seems kinda neceserary to say something. If anything - if someone is interested in this subject and finds this topic - the counter-arguments might help one get a better picture (in case he's just into learning or seeking some improvment - but not whiling to brake his sheet). Just my 2 cents.
 
Hi,
TechPowerUp
Sometimes what happens is TechBlewUp :laugh:
 
Look it time to bring it back on topic otherwise moderators going to be giving out warnings for been off topic
 
SSDs are designed to access file fragments without delay using flash memory, with an average seek times in the region of 0.1ms. So you won’t really notice the benefit of defragged files — which means there is no performance advantage to defragging an SSD or some files. Just my two cents...

I think defragging an SSD does exactly what you expect from it.:D

And since SSDs often move data to temporary positions as part of its normal operation, defragging will actually take up more of your solid state drive's limited rewrite capability.
 
Last edited:
Even if typical desktop users were defragging on an SSD weekly, I bet most still wouldn't have a problem in the course of their SSD warranty period unless the SSD was really low quality or they are doing a high number of write already. Defrag or not, your still bound by the constraints of SSD flash endurance. If your only defragging maybe hundreds of megabytes weekly it won't matter much.
Defrag is not evil, or bad, just mostly undesirable because it doesn't do anything to help the SSD and adds wear for little to no benefit in likely a vast majority of cases - hence why it's turned off by default in Windows.
The only helpful impact of defrag now with SSD's is in specific cases where fragmentation might cause particular problems or slowdowns in filesystem overhead.
If your sophisticated enough to be impacted by filesystem overhead then defrag might be an option...especially the choice to only defrag specific folder and files.
 
Last edited:
Back
Top