What happens when you format an SSD full of data ?

elswick

Junior Member
Mar 2, 2012
3
0
0
Hello,

I read the trilogy of articles about SSDs written by Anand and there's something that I would like to understand.

Please correct me whenever I say something wrong.

If you buy a new SSD, never been used before, its performance will be optimal.

If you use it and fill it up with data, maybe it depends on the controller and its firmware but the performance will probably go down, at least a little, because full of data means less over-provisioning which means more write amplification which means worse performance.

This is what Anand explained on this page, this page and those graphics.
Again maybe it has changed because these pages are quite old now or maybe I misunderstood what he wrote so feel free to correct me if I said something wrong.

Now Anand on this page wrote this :

In the Anthology I simulated this worst used case by first filling the drive with data, deleting the partition, then installing the OS and running my benchmarks. This worked very well because it filled every single flash block with data.
In this excerpt that I just quoted Anand explains that before TRIM existed in order to simulate a used SSD he would simply fill it with data then delete the partition, format the SSD and install a fresh new OS.
Even if the new file system was full of free space, the old data were not erased from NAND because the act of formatting didn't erase them. The SSD was still in a used state.

Again : I'm wrong -> please correct me.

A little further he wrote :

The problem here is that if a drive properly supports TRIM, the act of formatting the drive will erase all of the wonderful used data I purposefully filled the drive with. My “used” case on a drive supporting TRIM will now just be like testing a drive in a brand new state.
Here he explains that on an SSD that supports TRIM his old technique to simulate a used SSD doesn't work anymore because now the act of formatting deletes all the data.

I'm wrong -> please correct me.

So what happened that could explain that the act of formatting transformed his used SSD with poor performance into a brand new SSD with optimal performance ?

Well since the only thing that changed is the support of TRIM I suppose the answer is : TRIM.

In fact Anand himself wrote it :

TRIM is triggered by two things it seems. Either deleting a file and emptying the recycle bin (to truly delete it) or formatting the drive.
He says that formatting an SSD that supports TRIM triggers TRIM.
So if I format a recent SSD (I suppose they all support TRIM nowadays) the TRIM command will be sent to the SSD controller which will then know that all the data on the old partition must be considered as invalid.

I'm wrong -> please correct me.

I would like to go just a little further but first I would like to have your opinion because I know you have much more knowledge than me on the subject : Is what I wrote until now correct or wrong ?

Thank you in advance.

Edit : if the answers are all "It depends on the SSD.", mine is an Intel 320 postville.
 
Last edited:

wpcoe

Senior member
Nov 13, 2007
586
2
81
I frequently empty the Recycle Bin. I didn't realize that triggered a TRIM command.
 

elswick

Junior Member
Mar 2, 2012
3
0
0
I frequently empty the Recycle Bin. I didn't realize that triggered a TRIM command.

Hello and thank you very much for your answer !

Well if you move a file into the recycle bin, the file is not deleted from the file system it's just moved so no TRIM command should be triggered.
However if you empty the recycle bin then the file is removed from the file system. The OS updates the file system accordingly and *at the same time it sends a TRIM command to inform the SSD controller that it can erase the file on the NAND.

At least this is what I read on the web for example here :
When the OS deletes a file on an SSD, it updates the file system but also tells the SSD via the TRIM command which pages should be deleted.
What do you think : Anand was wrong or I misunderstood him ? And in that case what triggers TRIM ?



*if the OS, the file system, the firmware of the SSD and the SATA controller driver all support TRIM.

I don't know what you're using but for example on Windows I don't think that TRIM can be used on a raid array of SSDs because Intel didn't release yet a SATA driver that supports TRIM (you can however find an alpha version here of Intel RST 11.5 driver which in theory should support TRIM).



Edit : how do you know that no TRIM command is triggered when you empty your recycle bin ?

On Linux you can follow those instructions to see if TRIM functions properly. I don't know if there's something similar on Windows.
 
Last edited:

kbp

Senior member
Oct 8, 2011
577
0
0
Good questions, but I can tell you that the Intel 11.5 drivers still does not support TRIM yet. Intel has stated that the "full" version, when released, will support TRIM.
 

groberts101

Golden Member
Mar 17, 2011
1,390
0
0
all current Intel drivers will support trim pass-through. Just not for any members of a raid array is all.

and as for the OP's question. There are various ways that SSD controllers interpret viable and deleted data. Trim's main benefit is to increase the efficiency for better on the fly cleaning/recovery, should it be required/implemented at any given instance. Otherwise GC(background or on-the-fly) does a pretty fine job for most controllers these days.

Some controllers like Intels, Indilinx, Samsung and a few others will allow the controller to release those previosuly used blocks(if trim is present) when a drive is partitioned again. This is simply for the fact that the data map is changed in real time to notify the controller that the bitmap has been wiped back to empty status. The blocks are often still dirty with physical data remaining.. but the map has changed to reflect that the old data no longer remains. The controller recovers those previously filled blocks.. and you're back to fresh.

The one thing that I really liked/still like about the old barefoot controllers is their ability to be wiped back to fresh speeds by physically writing 11's to all free space on the drive... no trim required.

You simply filled the free space up with 11's and the controller knows that those blocks are free to be written to without penalty and forego the need to erase them first. AS Cleaner(free space cleaner) still works quite well for many of the newer controllers but they seem to rely more on trim as they're not so easily tricked by just the writing of 11's alone.

PS. most controllers these days will require the usage of the built in ATA secure erase function in their firmware to wipe the mapping for truely fresh states. Sandforce cannot be wiped back to fresh states or even speeds with simple reformatting. The mapping process of those drives is always slave to Durawrites constant tally of all things ever written since the last secure erase. Must be wiped via SE to get back to fresh.
 
Last edited: