Over provisioning free space on a SSD

dualsmp

Golden Member
Aug 16, 2003
1,627
45
91
Can someone explain why it is necessary if you are partitioning a SSD for over provisioning with TRIM to create an empty partition, format it, then delete it as Anand has explained below? It is taken from the comments section of this article.

http://www.anandtech.com/show/6489/playing-with-op

Does creating the empty partition, formatting it, then deleting somehow activate TRIM on that area of the drive?

Just create an empty partition of roughly 25% of the NAND capacity on the drive and you're good to go. If you've got TRIM, go ahead and format that partition then delete it.

Take care,
Anand
 

taltamir

Lifer
Mar 21, 2004
13,576
6
76
Does creating the empty partition, formatting it, then deleting somehow activate TRIM on that area of the drive?
Windows 7+ does send trim commands for all the space covered by a partition when it is formatted.
 

dualsmp

Golden Member
Aug 16, 2003
1,627
45
91
Windows 7+ does send trim commands for all the space covered by a partition when it is formatted.

So even when deleting the formatted partition soon after it was created still allows TRIM to recognize and use that area?
 

groberts101

Golden Member
Mar 17, 2011
1,390
0
0
So even when deleting the formatted partition soon after it was created still allows TRIM to recognize and use that area?

to trim it at the time of delete.. yes. Nothing to be trimmed after the partition is no longer existing and only GC and wear leveling will be initiated by the controller at the physical level from there on.
 

mv2devnull

Golden Member
Apr 13, 2010
1,526
160
106
Lets rephrase dualsmp's question.

Two scenarios:
1. Lets take a 100GB drive.
Make one 1GB partition, format and use it.

2. Lets take a 100GB drive.
Make one 1GB partition and format it.
Make another 99GB partition, format it and remove it.
Use the 1GB partition.

In both cases 1GB of the disk is "in use". What is the difference?
 

taltamir

Lifer
Mar 21, 2004
13,576
6
76
Lets rephrase dualsmp's question.

Two scenarios:
1. Lets take a 100GB drive.
Make one 1GB partition, format and use it.

2. Lets take a 100GB drive.
Make one 1GB partition and format it.
Make another 99GB partition, format it and remove it.
Use the 1GB partition.

In both cases 1GB of the disk is "in use". What is the difference?

The controller, with few exceptions (eg, the samsung drives) does not know what partitions exist. If the drive was secure erased before your two scenarios then there is no difference.
If the drive was used before your scenario and then had its partitions deleted then scenario 1 will have no trimmed properly since deleting/creating a partition does not trigger trim in windows, but a format does
 

dualsmp

Golden Member
Aug 16, 2003
1,627
45
91
The controller, with few exceptions (eg, the samsung drives) does not know what partitions exist. If the drive was secure erased before your two scenarios then there is no difference.
If the drive was used before your scenario and then had its partitions deleted then scenario 1 will have no trimmed properly since deleting/creating a partition does not trigger trim in windows, but a format does

Ok, but then if a secure erase is the way to go, I'm having a hard time following Anand's reasoning in the first post.

Unless he is thinking someone with one partition that fills the whole drive (with data on it) is resizing it to have some extra space for over provisioning, then creating a partition where the free space is, format it, let TRIM work (I assume this can vary how much time it takes ..minutes, hours?) , then delete the partition.
 
Last edited:

taltamir

Lifer
Mar 21, 2004
13,576
6
76
Ok, but then if a secure erase is the way to go

That is correct, in fact there are some drives who have trim related bugs which don't exist in secure erase.
For example the sandforce controller based drives can write themsevlves itself into a corner and not be able to get out of it without a secure erase. But there are no known issues where secure erase does not work for restoring performance perfectly.
 

Bill Brasky

Diamond Member
May 18, 2006
4,324
1
0
huh?.. capping disk space usage on a Windows machine without heavy tweaking?

Good luck with that. lol

I believe he's talking about SSD toolboxes (ie Samsung Magician software) that allows a user to over provision an SSD beyond what the factory has allowed.
 

mv2devnull

Golden Member
Apr 13, 2010
1,526
160
106
For a user account one could possibly set a filesystem quota to prevent that user user from creating more than X GiB of files. The Windows system accounts probably will laugh at such things. Creating a X GiB filesystem (in practise by creating a X GiB partition) is trivial.

A drive has M physical sectors. It reports that is has N physical sectors, where N<M. This is what all drives, both HDD and SDD do. Software tools can adjust what is the N that the drive reports. Unnecessarily complicated compared to the partitioning.

So, to summarize the topic:
You don't have to touch the space that you leave unused, unless you have touched it.


OT. Term "over-provisioning". Certain SAN system lets you define a logical volume the size of 100 TiB even if you only have 40 TB physical capacity. Your filesystem will happily report that its size is 100TiB. This is "over-provisioning" in different context. The assumption is that you do buy more hardware before the users consume over 40TB. When you do add the physical capacity, you don't have to adjust the filesystem.

Quite opposite to the SDD over-provisioning, where you keep part of your capacity hidden as reserve. :)
 

Hellhammer

AnandTech Emeritus
Apr 25, 2011
701
4
81
I believe he's talking about SSD toolboxes (ie Samsung Magician software) that allows a user to over provision an SSD beyond what the factory has allowed.

That's essentially no different from creating a partition smaller than the original one (e.g. 240GB instead of 256GB).
 

It's Not Lupus

Senior member
Aug 19, 2012
838
3
81
For that article, was the total size based on the total advertised space (e.g. 256GB for the 840) or total space available in windows (~238GB)?

For a spare area of 25%, does 192GB mean 192GB in windows or ~178GB in windows? It's not clear to me given that the default lists 256GB which is ~238GB in windows. I know this is kind of trivial, but I'm curious.
 

Hellhammer

AnandTech Emeritus
Apr 25, 2011
701
4
81
For that article, was the total size based on the total advertised space (e.g. 256GB for the 840) or total space available in windows (~238GB)?

For a spare area of 25%, does 192GB mean 192GB in windows or ~178GB in windows? It's not clear to me given that the default lists 256GB which is ~238GB in windows. I know this is kind of trivial, but I'm curious.

192GB in Windows (i.e. 192GiB). That sets 25% of the actual NAND for OP (NAND capacities are measured in GiBs, so a 256GB SSD is really 256GiB).
 

Bill Brasky

Diamond Member
May 18, 2006
4,324
1
0
If 25% is your goal, you should have a primary partition that is 90GB, and your procedure sounds solid.
 
Last edited:

energee

Member
Jan 27, 2011
55
2
71
Am I correct in assuming that the partition format/delete procedures discussed in this thread do not apply to new (i.e., unused) drives?

In the case of a factory new drive, one would simply leave a portion of the drive unallocated. Correct?

Pardon my ignorance, I finally caved in and bought my first SSD last week.
 

Fred B

Member
Sep 4, 2013
103
0
0
With 25% unallocated OP, can I fill the partitioned area 100%?

It is never good to fil a ntfs partion to 100 procent ,i think the best thing is only use 80 procent :(

Having Op for severeal year for the reason that there whas no trim for ssd raid .Now there is trim for raid and i don t think a OP is needed in my case .It is abouth controling the write behaviour from the operatingsytem , putting an OP on a disk realy keeps it clean from any writes from the os . No filefragmentation or leftovers from rewrites and only used by the ssd . Must say with XP and the optimizer tool that generates a trim command it is easy to see if things work properly .These kind of tools also work in w7 and w8 and should be used once in a whlie.

If starting with ssd it is adviseble to put an OP there ,it can be easy removed afterwords .
 

Hellhammer

AnandTech Emeritus
Apr 25, 2011
701
4
81
Am I correct in assuming that the partition format/delete procedures discussed in this thread do not apply to new (i.e., unused) drives?

In the case of a factory new drive, one would simply leave a portion of the drive unallocated. Correct?

Pardon my ignorance, I finally caved in and bought my first SSD last week.

Yes. With a new drive, there's no need to do anything else but to create a partition smaller than the max size to increase OP.
 

taltamir

Lifer
Mar 21, 2004
13,576
6
76
Am I correct in assuming that the partition format/delete procedures discussed in this thread do not apply to new (i.e., unused) drives?

In the case of a factory new drive, one would simply leave a portion of the drive unallocated. Correct?

Correct