Questions about reserving empty space on an SSD and methods to ensure max performance

Lateralus

More [H]uman than Human
Joined
Aug 7, 2004
Messages
18,449
I've seen several methods mentioned for minimizing performance degradation and/or restoring performance on an SSD. Until recently, I was under the impression that performance degradation would be minimized via TRIM/GC and that you could just use the drive like any other...and maybe run the Intel Toolbox (or wiper utility for OCZ drives, etc.) to do a manual cleanup every once in a while. Yet reading various SSD discussions uncovers additional suggestions. Some people use a utility like HDD Erase to perform a secure erase and restore performance to a drive that's in a significantly degraded state. Other people choose to simply fill the remaining drive space with a large file and then delete it, or simply use a utility to write 0's to the free space.

Lately, I've seen recommendations to allocate even more empty space on the drive to the spare area than what they already ship with. AnandTech states that Intel ships their drives with 7.5-8% of space beyond the advertised capacity that serves as spare area for the controller, but I am seeing on the forums that 20% is actually the recommended amount to ensure increased performance and longevity. I read that having TRIM reduces the need for a large spare area, yet there are other posts that recommend having the 20% even on drives that support TRIM and even Anand states that dynamic controllers perform better with more free space.

To those of you who have an SSD:

Did you let your partition occupy the maximum amount of disk space or did you under-partition the drive to maximize performance and lifespan? That's something that I've seen recommended recently and to my knowledge it hasn't been standard practice in the SSD threads (that's not to say that there isn't a benefit to doing so, but it doesn't seem like something most SSD owners have been advocating). I thought most people just installed the drive and used its full capacity, but if TRIM isn't enough and performance + longevity will be noticeably improved then I plan to leave 20% of the available space unpartitioned when I install Windows 7 Pro (I'm still on the RC). However, if TRIM and the Toolbox will do the job then obviously I want to utilize the capacity that I paid for.

Just wanted to get some final recommendations on this now so I don't have to worry about it later. A re-install is the perfect time for me to increase the spare area if the consensus is that I'll benefit from doing so.
 
Just don't fill your drive completely up and you'll do fine. TRIM will keep performance up, and as long as you don't go past 80% full you get the same effect as partitioning the drive at 20% less than capacity. Any and all free space is used by the controller chips for wear leveling.
 
Just don't fill your drive completely up and you'll do fine. TRIM will keep performance up, and as long as you don't go past 80% full you get the same effect as partitioning the drive at 20% less than capacity. Any and all free space is used by the controller chips for wear leveling.

Right, but my impression is that if those blocks are written to even one time that they can no longer be used for wear leveling. I guess reserving them outside of the partition just guards against user error (i.e. temporarily copying a large amount of data to it that happens to fill that space).

I suppose I'll just keep using it like I have been, and try to remember to keep 20% free. On that note, since the drive ships with roughly 8% extra space does that mean that I only have to worry about keeping 12% of the available space unused? sub.mesa recommended keeping 20% of the available drive capacity unused, in addition to what the drive ships with.
 
Right, but my impression is that if those blocks are written to even one time that they can no longer be used for wear leveling. I guess reserving them outside of the partition just guards against user error (i.e. temporarily copying a large amount of data to it that happens to fill that space).

I suppose I'll just keep using it like I have been, and try to remember to keep 20% free. On that note, since the drive ships with roughly 8% extra space does that mean that I only have to worry about keeping 12% of the available space unused? sub.mesa recommended keeping 20% of the available drive capacity unused, in addition to what the drive ships with.


Even if the block has been written to once, it's still available for wear leveling. The only time you loose a block is after you've written to it enough that you use up all the write cycles for that block.

Even if you partitioned a drive with a large block of free space, the controller will still use them even though Windows can't see it, due to the fact that wear leveling is done low level and completely outside of Windows

There is no set amount of space you need to reserve. The numbers that everyone comes up with is just nothing but a guess. I personally wouldn't like my drive to be more than 50% full, but that's just preference. SSDs haven't been out long enough for a reliable trend to be found.
 
Right, but my impression is that if those blocks are written to even one time that they can no longer be used for wear leveling. I guess reserving them outside of the partition just guards against user error (i.e. temporarily copying a large amount of data to it that happens to fill that space).

I suppose I'll just keep using it like I have been, and try to remember to keep 20% free. On that note, since the drive ships with roughly 8% extra space does that mean that I only have to worry about keeping 12% of the available space unused? sub.mesa recommended keeping 20% of the available drive capacity unused, in addition to what the drive ships with.

I think I know which threads you're alluding to, but I don't think the question is whether TRIMed space is still used thru the wear level'ing algorithms (pretty sure it is, that's the entire point of TRIM) but whether the drive uses said space to improve performance by using it as scratch space. All SSD make some provisions for scratch space regardless of how you partition it, 7% on Intel's drive for instance...

As I understand it, spare space wasn't used as scratch space once you wrote anything to it before TRIM, but it should be used just fine by the controller now that TRIM is here, maybe I'm wrong. Either way you should definitely keep around 15% of space free... For performance reasons more than anything (not to prolong it's lifespan).
 
That's something that I've seen recommended recently and to my knowledge it hasn't been standard practice in the SSD threads (that's not to say that there isn't a benefit to doing so, but it doesn't seem like something most SSD owners have been advocating).

My thoughts exactly.

Sub.mesa has been advocating an empty partition for the free space instead of leaving space anywhere on the drive and I'm thinking it sounds like an interesting idea.

I'm going to be moving to 64bit W7 and when I do I'll be trying the partition idea.
 
If you make one big partition (not reserving any space) and always keep a portion unused, that should work too. But not always:

For example, you uninstall and reinstall stuff alot. Your free space may stay the same, but the actual used flash cells on the SSD might stack up because random writes are continuing to be remapped to "empty" flash cells. In essence, the SSD thinks 80% is used while windows says only 60% is used. Only TRIM or the Intel toolkit thingy can tell the SSD that some blocks are actually free, even though previously it has been written to. The SSD doesn't know that data isn't in use anymore and Windows regards it as 'free'. So the SSD won't overwrite it, even if that would be okay according to Windows. That's why TRIM is so useful; by telling the SSD what blocks were used in the past but not anymore it allows the SSD to re-use these blocks. So even if you uninstall/delete/write alot, TRIM would mean the SSD would know which blocks are available (free) again for use by the SSD to speed up random writes.

Once the empty cells run out, the SSD thinks all flash cells are in use, even though windows may know many files were deleted and the filesystem is only 50% full. But the SSD doesn't know that; it thinks all data is in use; so no more tricks to accelerate random writes. Thus, the SSD encounters a huge drop in performance when doing small writes, and it will also cause your writes to cause (up to factor ~20) more wear, using up your valuable write iteration cap.

By using partitions to reserve some space you make sure that space is for the SSD to use. Howmuch? Depends on how write/delete-heavy your usage pattern is. But getting a total of 20-25% spare space would be a good target. I believe the next generation X25-E (which will be using MLC memory instead of SLC now) will have half its capacity for internal use; both to prolong the write endurance of the drive and to make sure performance degradation doesn't happen with these drives.
 
According to this post, the Intel drives at least can use any empty space as spare area. It would depend on the specific drive's firmware as to what it will actually use for spare area. I remember reading some things that seemed to indicate that some drives could only use completely untouched space - specifically creating a partition but not using it would prevent that. If you want to block off some space to dedicate to spare area, just leave __GB unallocated at the end of the drive when you're setting up your partition(s). That should be the safest way to increase the spare area.

I do have the full user space allocated to my partitions on my desktop and laptop X25-M's. My laptop's drive is pretty full (my external should be here any day), and it still performs very well.
 
If you make one big partition (not reserving any space) and always keep a portion unused, that should work too. But not always:.....

I understand what you're saying and why but have you played with these different ways of leaving unused space and if so, how much difference did it make?

I have a 2 X 80GB G1 Intel RAID0 setup and my OS with programs is @ 30GB so I have a lotta free space.

My drives have been in use since April-May and I do a lotta music downloading, un-RARing, use the drives with very little tweaking and don't baby them.

I think your idea is sound and I will be trying a 20-30GB partition with my W7 install.

Did you come up with this on your own?

Old inquiring Hippies just wanna know. :)
 
I think I'll just use the full capacity when I reinstall. It appears that there is less need to preserve a large amount of space that is left untouched thanks to TRIM. Most people have been using the whole capacity and haven't been complaining; there is only the rare/odd report about freezing, stuttering, or other performance anomalies.

Besides, I have to think that Intel did enough research and testing to know what they're doing, so if they're shipping the drives with 7.5-8% of spare area for the controller then I'll put my faith in them.

sub.mesa said:
Once the empty cells run out, the SSD thinks all flash cells are in use, even though windows may know many files were deleted and the filesystem is only 50% full. But the SSD doesn't know that; it thinks all data is in use; so no more tricks to accelerate random writes. Thus, the SSD encounters a huge drop in performance when doing small writes, and it will also cause your writes to cause (up to factor ~20) more wear, using up your valuable write iteration cap.

That makes sense to me on pre-TRIM capable drives, but just to clarify, you're saying that this severe performance drop and increase in wear occurs even when using TRIM (hence your recommendation for a smaller partition that leaves more spare area)? :confused:

If so, can't I just use one large partition that utilizes all available space and do a secure erase if and when I hit the point you describe above? I thought a secure erase basically reset the drive to factory status (minus write cycles) to where the controller saw all blocks as unused/unwritten again. If that's true, then even when you've written to every available block and caused performance to take a dive (again, does this even occur with TRIM?) you could do a secure erase to restore the drive to new performance. I guess it boils down to the choice of doing that (and having to image your drive or reinstall the OS) or going with a smaller partition which will prevent you from hitting the point where you'd have to do a secure erase to restore performance in the first place. Correct?
 
No, that doesn't happen with TRIM.
TRIM would mean the SSD would know which blocks are available (free) again for use by the SSD to speed up random writes.

The root of the problem is that NAND flash can't be overwritten (it must be erased then rewritten) and a regular Windows "delete" (pre-TRIM) doesn't actually remove the data from the drive. See http://www.hardforum.com/showthread.php?p=1035383018#post1035383018 for more info. Without TRIM, the drive is really fast at first because it has lots of erased pages it can immediately write to. Once all the free pages have been used up, every single write requires the drive to cache the good pages in the block, erase the block, then write back the previous good pages and the new data. With TRIM, pages are erased after being deleted, making them available for immediate writes again. Whether or not that space is technically added to the spare area pool, it's space that's available for immediate writing, which means that the SSD doesn't need to shift things to the spare area for a quick write.

The more erased blocks you have, the more chance there is that the SSD will be able to write your new data immediately. With less free space, you're more likely to run into situations where the SSD would need to shuffle data around to create enough clean blocks to write the data. However, with TRIM, any deleted pages should get erased pretty quickly, meaning that your entire available space should pretty much all be erased and ready for immediate writing.

So yeah, as long as you have TRIM working, then pretty much all of your free space should be erased and ready for immediate writing. If you tend to write huge files or max your drives out to the limit of what they'll hold, leaving some unpartitioned space will ensure that you've got plenty of spare area for when you're really low on free space.


Secure Erase will erase all the blocks of the SSD. It's the same as any other flash erase, like TRIM. It just does the whole drive at once. Before TRIM, this was basically the only way to erase blocks. AS Cleaner, as used in Tony TRIM, tries to do the same thing by taking up all your free space with files that contain the equivalent of 0's (actually 1's in NAND flash), then deleting those files. The "data" is left in those pages, which results in them being in an erased state and ready for writing.


FYI, it's 7.37% spare area. They get that by using 80GiB (80 * 1024*1024*1024) of flash, but only presenting 80GB (80 * 1000*1000*1000) to the user like an "80GB" hard drive would. That gives you 80 * 1,073,741,824 vs. 80 * 1,000,000,000. The extra .073741824GB out of each GiB is used as spare area. The 80,000,000,000 bytes works out to 74.5GiB, which is what you see for the drive size in Windows.
 
Back
Top