Jump to content
CCleaner Community Forums
Sign in to follow this  
Don Baechtel

Speed up Defraggler

Recommended Posts

Why is Defragging my SSD so slow? My SSD can transfer data at 425 MB/s and yet Task Manager shows Defraggler Disk transfer rate at 0.1 MB/s. About 4000 times slower.

To Defrag 204 GB takes more than 40 hours. Defraggler CPU usage is less than 14%

Why can't this be MUCH faster?

Why can't Defraggler use multiple threads to speed it up?

How long will it take to defrag a much larger Disk?

Be creative. Be Faster.

 

 

 

Share this post


Link to post
Share on other sites

I was just going to give the usual "You shouldn't be defraging an SSD, they don't need it." answer - but:

I came across this interesting article:
https://www.hanselman.com/blog/TheRealAndCompleteStoryDoesWindowsDefragmentYourSSD.aspx

To give a quick summary - Microsoft have confirmed that SSD's do on occasion need a defrag, and Windows does ocassionally defrag SSD's itself, about once a month if you have certain settings in Windows; but It does it in an intelegent manner and you still shouldn't defrag it yourself if you want to get the best life out of your SSD.

 

Quote

 

Conclusion

No, Windows is not foolishly or blindly running a defrag on your SSD every night, and no, Windows defrag isn't shortening the life of your SSD unnecessarily. Modern SSDs don't work the same way that we are used to with traditional hard drives.

Yes, your SSD's file system sometimes needs a kind of defragmentation and that's handled by Windows, monthly by default, when appropriate. The intent is to maximize performance and a long life. If you disable defragmentation completely, you are taking a risk that your filesystem metadata could reach maximum fragmentation and get you potentially in trouble.

 

 

Share this post


Link to post
Share on other sites

I thought the monthly (by default) scheduled 'defrag' that Windows does is merely an Optimise, in other words, a TRIM.

Share this post


Link to post
Share on other sites

Other disk defrag tools one in particular has an SSD optimize mode, doesn't move much but gets rid of most fragments. Then there's another that's now no longer developed that could do it for SSD's and Flash Drives.

With an SSD I don't bother using any third party defrag tools, however with HDD's I do use a third party defrag tool because Windows doesn't do very good on HDD's in my opinion.

Edit:
Just a thought; Maybe it's taking so long because you shouldn't be doing it!

Share this post


Link to post
Share on other sites
13 hours ago, mta said:

I thought the monthly (by default) scheduled 'defrag' that Windows does is merely an Optimise, in other words, a TRIM.

So did I, which is why I was a bit surprised to read that article.

But the statement from Microsoft in that article says otherwise, and that Windows will defrag an SSD as well as running TRIM/Retrim.
Both the defrags and the Retrims are handled by the Windows Storage Optimizer

Quote

 

Storage Optimizer will defrag an SSD once a month if volume snapshots are enabled. This is by design and necessary due to slow volsnap copy on write performance on fragmented SSD volumes. It’s also somewhat of a misconception that fragmentation is not a problem on SSDs. If an SSD gets too fragmented you can hit maximum file fragmentation (when the metadata can’t represent any more file fragments) which will result in errors when you try to write/extend a file. Furthermore, more file fragments means more metadata to process while reading/writing a file, which can lead to slower performance.

As far as Retrim is concerned, this command should run on the schedule specified in the dfrgui UI. Retrim is necessary because of the way TRIM is processed in the file systems. Due to the varying performance of hardware responding to TRIM, TRIM is processed asynchronously by the file system. When a file is deleted or space is otherwise freed, the file system queues the trim request to be processed. To limit the peek resource usage this queue may only grow to a maximum number of trim requests. If the queue is of max size, incoming TRIM requests may be dropped. This is okay because we will periodically come through and do a Retrim with Storage Optimizer. The Retrim is done at a granularity that should avoid hitting the maximum TRIM request queue size where TRIMs are dropped.

 

 

Share this post


Link to post
Share on other sites

Samsung Magician no longer optimizes their SSDs, they've removed that functionality since it's now built into Windows itself. Same goes for Crucial/Micron Storage Executive it doesn't optimize either, although I don't know if it ever had that feature before.

Edit:
Unless you mean something like the jargon all those SSD manufacturers state like RAPID Mode (Samsung), Momentum Cache (Crucial/Micron). I have SSDs from both Samsung and Crucial and their method of DRAM caching from my experience doesn't increase speed that I've been able to notice when compared to Windows own caching mechanism. Sure if you run CrystalDiskMark it will seem as if a slower SATA III SSD is operating at blazing fast NVME SSD speeds but I doubt it. If looking about the web there's many forum posts that claim the same.

Although the benefit may just come down to their DRAM caching service(s) allowing the SSD to last longer if what they state is true in the documentation and user guides.

Share this post


Link to post
Share on other sites

Or to try to answer Don's original post, dump Defraggler. If you're on Win 8 or 10 (and have sys restore enabled, and have more than 10% fragmentation) then you'll get the Windows defrag described above. Mercifully Win 10 has sys restore off by default so those defaulters (me included) won't get the defrag.

Why were you running a defrag against your SSD in the first place? What was the fragmented percentage?

 

Share this post


Link to post
Share on other sites
20 hours ago, Augeas said:

Or to try to answer Don's original post, dump Defraggler.

With an SSD that can be said about any traditional defrag tool, they've become redundant as it pertains to SSD's. I wonder if doing a traditional defrag on an SSD when told in manufacturer documentation not to do it could void the warranty.

Share this post


Link to post
Share on other sites

I think that SSD rationale has changed over the past few years. We've seen that Win 8/10 runs what Microsoft describes as a 'Traditional' defrag on SSDs under certain conditions, and we also know that excessive fragmentation causes excessive I/Os as NTFS ploughs through the MFT. So an occasional defrag won't hurt. Does any manufacturer forbid defrags?

As for longevity, TLC SSD has an erase/write limit of a little over 300. Before anyone panics if I write 1 gb a day on my minute 120 gb device (and that is far more than I do) then the SSD should start slowing down in 110 years.

Share this post


Link to post
Share on other sites

I've seen at least two YouTube videos that explain how long it would take to wear out a modern SSD for a home end-user (not talking about professional videographers, etc., that can hit them hard with 4K and 8K video production). In plain talk an end-user would have to be trying on purpose to wear one out in order to hit the DWPD/TBW limit.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

×