defrag or not

MJSWARLORD

Silver Level Poster
As you can see from below i have 2 ssd.... my question is this... do i need to do defrag and reg defrag even if i only ever do it once..... i have done lots of googling about this and most results say either yes/no or comments such as it shortens life but nobody knows by how much so i am still none the wiser.
 

Rakk

The Awesome
Moderator
No, do not defrag an SSD, it doesn't need it and I believe will shorten its lifespan.

Edit: if you use Win10, it has an optimise drives utility, and it can tell if its an SSD or not, so will defrag normal hard drives and optimise SSD's (ie. not defrag) afaik
 
Last edited:

SpyderTracks

We love you Ukraine
Ssd's don't suffer from fragmentation at all as they store data bit by bit in spare cells that are all accessed in a split second. On an hdd the data had to be reached by the laser tracking the physical disc to find the bits required which took time if the data wasn't stored in the same section of the disc, the laser had to track from one area to the next. Ssd's just spark an electrical signal to retrieve the data, there is no moving laser, nor data spread over a physical platter.

Doing a defray on an ssd does one thing alone, uses up read and write cycles.
 

MJSWARLORD

Silver Level Poster
Rakk and spyder thanks for your replies..... just looked in my pc settings and discovered optimise drive was turned on by pcs when they built it so no need to do anything
 
Last edited:

Oussebon

Multiverse Poster
While the question's already been answered, I looked up whether companies like Intel had anything to so on the matter for my own interest. Figured I'd post what I found here:

Does an SSD require defragmenting like an HDD?
No. SSDs never need to be defragmented. Defragmenting an SSD can actually reduce the life of an SSD. If your system is set up to defragment automatically, you should disable or turn off defragmentation when using an SSD. Some operating systems will defragment automatically, so this feature should be disabled for Kingston solid-state drives.
https://www.kingston.com/en/ssd/ssd_faq

Will defragmentation improve my Samsung Solid State Drive’s performance?

No, Solid State Drives do not need defragmentation because they have no moving parts and can access any location on the drive equally fast.
Please disable any defragmentation utilities on your computer because they will only wear down the performance of your SSD.
Visit the OS Optimization section of Samsung SSD Magician for help doing this.
http://www.samsung.com/global/business/semiconductor/minisite/SSD/M2M/html/support/faqs_03.html

Should I defrag my Intel® Solid State Drive with Windows* Disk Defragmenter or similar program?No. Traditional hard disk drive defragmentation tools do not show increased SSD device performance.

  • For legacy operating systems, disable any automatic or scheduled defragmentation utilities for your Intel® SSD. The tools add unnecessary wear.
  • Newer Windows* operating systems can detect the presence of an SSD and disable the defrag function.
http://www.intel.com/content/www/us/en/support/memory-and-storage/000006110.html

Will disk defragmentation be disabled by default on SSDs using Windows® 7 and later? Yes. The automatic scheduling of defragmentation will exclude partitions on devices that declare
themselves as SSDs. Additionally, if the system disk has random read performance characteristics above
the threshold of 8 MB/sec, then it too will be excluded. The threshold was determined by internal
analysis.
https://support.ocz.com/customer/en...y-default-on-ssds-using-windows®-7-and-later-


There was also this post by an MS Employee on Technet
Hello, In Windows 7 - we turned off defrag for SSDs as you mention in your entry; but in Windows 8, we have changed the defrag tool to do a general optimization tool that handles different kinds of storage, and in the case of SSD's it will send 'trim' hints for the entire volume;

SSDs are storage devices made of flash memory; flash memory unlike hard disks are block erasable devices - they can be written to at a byte level but need to erased at a block level; Trim is a storage level hint that was introduced in the Windows 7 days to indicate that Windows is not using certain regions of the storage device; NTFS will send these trim hints when files are deleted or moved from those regions; SSDs consume these hints to perform a cleanup in the background called as 'reclaim' that helps them get ready for next writes. The SSD may choose to perform the optimization immediately, store the information for later optimization or throw away the hint completely and not use it for optimization since it does not have time to perform this optimization immediately.

In Windows 8, when the Storage Optimizer (the new defrag tool) detects that the volume is mounted on an SSD - it sends a complete set of trim hints for the entire volume again - this is done at idle time and helps to allow for SSDs that were unable to cleanup earlier - a chance to react to these hints and cleanup and optimizer for the best performance. We do not do a traditional defrag (moving files to optimizer there location for space and performance) on SSDs.
Thank you for your question and I hope this clarifies the need to run the Storage Optimizer on a regular basis.

https://social.technet.microsoft.co...4-9cf5-437d5e212c9c/defragging-ssds-a-default

Although apparently Windows does sometimes deliberately defrag SSDs because it feels it is necessary, according to some info a blogger apparently managed to extract from Microsoft after people tried to work out what exactly was happening during Windows' optimisation.
http://www.hanselman.com/blog/TheRealAndCompleteStoryDoesWindowsDefragmentYourSSD.aspx
http://www.ghacks.net/2015/01/20/windows-ssds-and-defragmentation-the-definitive-answer/

Scott Hanselman posted the product group clarification in his blog. In short, Microsoft has confirmed SSD defrag when the system protection feature (aka system restore) is turned on, and this is by design. You’ll find my thoughts and take on this turn of events in the comments section of the Scott’s blog post.
http://www.outsidethebox.ms/why-windows-8-defragments-your-ssd-and-how-you-can-avoid-this/
 
Last edited:

ubuysa

The BSOD Doctor
I've just upgraded my copy of Ultimate Defrag (from DiskTrix) and in their manual they say...

Even though the general consensus is that SSDs do not need defragmentation and that defragmentation wears out SSDs faster, there are still justifiable reasons to defragment SSDs. You are defragmenting the file system as NTFS sees it and removing a lot of I/O overhead. Our options enable you to choose to either not defragment your SSD, to treat it like a normal drive, or to apply our algorithms optimally designed for SSDs where it moves the least amount of data necessary and to minimize wear and to minimize the rate of refragmentation.

...and this started me investigating how the NTFS filesystem actually works and, more importantly, how the file system itself becomes fragmented. I found this link to be very useful, even though it's from 2009 the way NTFS fundamentally works hasn't changed I don't think.

What I learned from that is that the system records that the NTFS file system maintains to track where file fragments are on a disk, start with a base record in the MFT. For unfragmented files there is only a base record, but for heavily fragmented files there may also be many child records pointing to where the fragments are, these child records are chained off the base record. This means that on a hard disk we need to seek not just for the data fragment but we need additional seeks to find the base record, a potential attribute list record, and child record to tell us where the data fragment actually is - so that's potentially FOUR seeks per data fragment (no wonder fragmented files are slow).

On an SSD of course we still have to read the base record, a potential attribute list record, a child record and the data fragment (which is potentially four read operations) but these happen extremely fast so that the additional time taken to read child records and then data fragments is small. What I think DiskTrix are getting at is that for a highly fragmented file, even on an SSD, the time taken to do four reads per data fragment (and there could be hundreds) is significant and the read operation would be faster if there were fewer child records, even if there were the same number of actual data fragments. This is what I think they mean by '...the file system itself becomes fragmented'.

Clearly then there is a trade-off somewhere between the additional wear on an SSD of defragmentation and the delay caused by heavily fragmented files - since we buy SSDs for their performance there may well be a point (IMO) when defragmenting certain files on an SSD is beneficial, despite the small reduction in lifespan. TBH on an SSD that is less than about 50% full I don't think there will be any noticeable life reduction because the wear-levelling mechanism has so much free real estate to work with.

Obviously I don't know how DiskTrix's patented algorithms work, but I'd guess that they defragment only heavily fragmented files and they do this partly by trying to consolidate child records rather than moving the actual data fragments. It could be argued then that whilst defragmenting an SSD is generally to be avoided (especially if you treat it like an HDD), it's probably not true to say that you shouldn't ever defragment an SSD at all - though you do need to use SSD specific algorithms if you do.

I'm not intending to recommend Ultimate Defrag (it's not free for one thing) though I have been using it for years on hard drives very successfully, I'm just adding to the SSD defragment debate.

:)
 
Last edited:

Tony1044

Prolific Poster
Hmm I'm not actually sure about that because of wear levelling - even if you defragment an ssd, my understanding (could be wrong) is that the actual ssd controller writes to wherever is least written to anyway.

So it would only be luck that blocks ended up together I assume?

Forgive me if that was covered earlier but I'm suffering with an apparent bout of food poisoning this morning.
 

ubuysa

The BSOD Doctor
Hmm I'm not actually sure about that because of wear levelling - even if you defragment an ssd, my understanding (could be wrong) is that the actual ssd controller writes to wherever is least written to anyway.

So it would only be luck that blocks ended up together I assume?

Forgive me if that was covered earlier but I'm suffering with an apparent bout of food poisoning this morning.

I'm no expert on this of course, but it's not where the blocks physically are that matters, it's that in a heavily fragmented file you could need up to 4 reads per fragment. By intelligently defragging the file to reduce not just (some) of the file fragments but, more importantly, reducing the number of child records (by consolidating data fragment pointers in fewer child records) you can significantly reduce the number of reads per data fragment.

Wear levelling (AFAIK) simply moves stuff around on the SSD to utilise each block equally, the OS doesn't see any of that of course. Hence my point about a 50% full drive, it should in theory last twice as long as the same drive 100% full.

The people at DiskTrix have been around drive fragmentation for a very long time, and when they say something it's probably worth listening to.

I hope the food poisoning goes off soon. :)
 

SpyderTracks

We love you Ukraine
I'm no expert on this of course, but it's not where the blocks physically are that matters, it's that in a heavily fragmented file you could need up to 4 reads per fragment. By intelligently defragging the file to reduce not just (some) of the file fragments but, more importantly, reducing the number of child records (by consolidating data fragment pointers in fewer child records) you can significantly reduce the number of reads per data fragment.

Wear levelling (AFAIK) simply moves stuff around on the SSD to utilise each block equally, the OS doesn't see any of that of course. Hence my point about a 50% full drive, it should in theory last twice as long as the same drive 100% full.

The people at DiskTrix have been around drive fragmentation for a very long time, and when they say something it's probably worth listening to.

I hope the food poisoning goes off soon. :)

Being my cynical self, the people at disktrix face losing their entire market share once hdd’s are obsolete.

I guess the question is, what is fragmentation? I thought it was where the file fragments weren’t able to be written sequentially and therefor became randomly placed over the hdd platter.

I thought this didn’t matter on an ssd because the seek time is the same to any block.

I also wonder if disktrix are referencing an os or ssd without TRIM enabled. Then I could see defragging being more necessary.
 
Last edited:

ubuysa

The BSOD Doctor
Being my cynical self, the people at disktrix face losing their entire market share once hdd’s are obsolete.

I guess the question is, what is fragmentation? I thought it was where the file fragments weren’t able to be written sequentially and therefor became randomly placed over the hdd platter.

I thought this didn’t matter on an ssd because the seek time is the same to any block.

I also wonder if disktrix are referencing an os or ssd without TRIM enabled. Then I could see defragging being more necessary.

Which is why I did some research on how NTFS actually works. It's more complex that I'd realised, and it's not simply a case of an MFT entry pointing to all the data fragments. It's not related to TRIM at all, it's a feature of the way NTFS filesystems work.

I also think that we need to appreciate that there is more than one kind of defrag. Third party apps can already defrag individual files rather than the whole disk for example. What I've learned having done a bit of NTFS research is that the NFTS filesystem itself can become fragmented in addition to file data becoming fragmented.

You do have a point about DiskTrix seeing their core business vanish. :) I do think however that we might be on thin ice in saying that there is never any benefit in any kind of SSD defragmentation. Clearly applying the same kind of global defragmentation that we use on an HDD to an SSD would be stupid, very little benefit would be gained at a great cost in drive lifespan, but that does not necessarily mean that some sort of more intelligent defragmantation should never be done.
 
Top