PPRuNe Forums - View Single Post - De-fragging an SSD drive
View Single Post
Old 12th July 2014 | 22:51
  #5 (permalink)  
mixture
 
Joined: Aug 2002
Posts: 3,663
Likes: 0
From: Earth
I'm not at all clear what goes on in a solid state drive.
In a nutshell its a bunch of memory components (SLC or MLC) which are bridged to the host computer via a controller running the manufacturer's firmware. Sort of like doing RAID0 with multiple disks for maximum capacity.

But I'll happily concede there are plenty of people who know far more about how SSD works than me...

I had wondered if controlling switching would take a greater time if it had to go to a relatively distant array of switches - millions of times.
However "far" it has to go, it still will be light years quicker than heads moving over a spinning platter.

Most of the voodoo magic is done on the controller and its associated firmware, which is why choice of SSD manufacturer and their track record plays a major part in SSD reliability (along side the correct choice of memory component type for your application).

The thing is, it looks like Windows doesn't differentiate from one technology to the next with its de-frag schedule.
I'll see if I can dig up anything, but I'd hazard a guess that whilst the de-frag runs, the code checks and acts accordingly depending on what type of disk its being asked to act on.

EDIT TO ADD:

See this forum post (the first answer) by a Microsoft employee which pretty much confirms what I said (i.e. they're basically doing "garbage collection" and not a traditional defrag) ....

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;

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.
Doing "garbage collection" is important because the SSD can erase and mark capacity as free in its idle time.... which removes the need to erase old data before writing new data at the time you need it (traditional drives can overwrite unused sectors.... SSD is two step... erase then write).

Last edited by mixture; 12th July 2014 at 23:02.
mixture is offline  
Reply