Sign in with
Sign up | Sign in
Your question

Alternative to trim for ssd

Last response: in Storage
Share
August 7, 2011 7:55:53 PM

Is there any way to accomplish the same thing as trim for setups that do not support trim like winxp or raid.

I think there must be a way to do a secure wipe on the free space at night or some other solution.

More about : alternative trim ssd

a c 143 G Storage
August 7, 2011 8:58:23 PM

Yes... it is call Garbage Collection by the SSD's firmware. All TRIM truly does is tell the GC what blocks to delete to improve the process. GC will work without TRIM and works best in idle state.

Side note... TRIM will work RAID mode if the SSD is not part of the RAID.
m
0
l
August 7, 2011 9:13:38 PM

so there are no settings on this garbage collection and nothing i can do to speed it up?
there is no way to manually do it?

also not sure what you mean raid not in raid
if in raid then raid.
ok
thanks
m
0
l
Related resources
a c 143 G Storage
August 7, 2011 9:27:18 PM

Depends on your drive... Intel drives are the only ones that have a toolbox to due manual TRIM to speed up the process.

As for what I mean "raid not in raid", is if you are running a SDD with two hard drives in RAID, your SSD will still be supported by TRIM. If you are running two SDD's in RAID, you will not get RAID support.
m
0
l
a c 283 G Storage
August 7, 2011 10:04:52 PM

^5 +1 what tecmo said.

TRIM is a Windows feature. It is simply a message from Windows to the SSD indicating a pc user has deleted data. TRIM does not do anything else. TRIM is a new feature that was not included in older versions of Windows. It also was not included in other operating systems.

Garbage collection is an ssd function. It is a process designed to deal with deleted data. Garbage collection can work together with Windows TRIM or it can work without TRIM. Modern version of garbage collection are quite capable of independently dealing with deleted data.

You mentioned secure wipe. The correct term is secure erase. It will erase ALL your data and it will not be recoverable. The process involves marking all the ssd cells as being empty. Secure erase restores the ssd to factory default write performance.

Why are you asking about an alternative to Windows TRIM? Did something happen?
m
0
l
August 7, 2011 11:00:35 PM

I have never personally seen garbage collection work that well compared to garbage collection + trim. I always see SSD drives slow way down over time until trim is enabled, then it is like rocket fuel for them. Also in my personal experience, setting AHCI in windows + AHCI in the bios is an extra kick in the pants speed wise when it comes to SSD drives.
m
0
l
a c 415 G Storage
August 8, 2011 1:01:49 AM

tecmo34 said:
Yes... it is call Garbage Collection by the SSD's firmware. All TRIM truly does is tell the GC what blocks to delete to improve the process. GC will work without TRIM and works best in idle state.
The problem is that without TRIM the drive has no way to know which blocks have been freed by the file system. A supply of free blocks is required for garbage collection to be effective, and without TRIM over time the number of blocks that the SSD knows to be free will get smaller and smaller. This has nothing to do with whether the file system itself has free blocks - as far as the SSD is concerned any block that has ever been written to will be considered to be in use, even if it the block is no longer part of any active file.

For example, if you were to completely fill the SSD with files and then delete half of them, the SSD will still think all the blocks are in use. This means it will basically be unable to do any garbage collection and write performance will suffer badly.
m
0
l
a b G Storage
August 8, 2011 3:51:31 PM

while that may be true for some controllers out there?.. it certainly doesn't hold true for all of them. TRIM is just another more efficient method for the controller to know what's been deleted and what blocks can be recovered.

There are real time data maps that are kept/compared in most modern SSD controllers these days and even in trimless raid arrays.. garbage collection can keep up to maintain fresh speeds if given sufficient opportunity such as logging off in Windows while maintaining power to the drives(such as S1 sleeps would give).

Even simplistic controllers like the Indilinx barefoot can do this and I can fill the array up with data completely and delete it followed by an overnight logoff idle for near fresh speeds again. And remember that speed(or loss thereof) is not the real way to test the free block availability(stamina) of an SSD. Write capacity(stamina) until slowdown re-ocurrs is the best measure of that recovery.

To the OP.. if you want to potentially force the drive to clear the trash then I would try this(not sure if it will work since you didn't say what controller you're dealing with here but works on most of them). DL and run AS Cleaner(also called free space cleaner) and make sure to check the "ff" option to write the necessary 11's(instead of the HDD type 00's) to all the free space on the drive. OS/stored data will remain which is why they call it.. free space cleaner, right? lol

Before 1.5 firmware(aggressive GC) came along for my 6 x 30GB Vertex(OCZ Indilinx controlled drives).. I used to do the Tony-Trim method because it simply worked every time without fault(well.. besides some lost write lifespan to clean/restore performance so quickly). AS Cleaner is best utilized when combined with an immediate logoff idle since this gives the controller some additional time to make sense of the newly emptied blocks at the controllers level and to also help finish up any additional housekeeping or data rotation that may be required. Just be sure that W7's power options are set to never shut the drive down and the bios should be running S1 sleep as that mode will ensure power remains to the drive. Can also just temporarily turn off all sleep during the idle time if you don't want to mess with the bios sleep types/settings. The trick is to maintain power at all times while minimizing the disk activity for GC to work consistently/effectively.

Then after this little AS Cleaner test to try and force immediate recovery?.. then you can just implement some dedicated garbage collection time(an overnight logoff idle on ocassion and especially after heavier write sessions)?.. for the drive to maintain stamina and speeds much better. Try GC.. you'll like it.
m
0
l
a c 283 G Storage
August 8, 2011 4:10:19 PM

sminlal - SSD garbage collection has changed quite a bit over the last 3 years. It's a lot more agressive than it used to be. According to "The SSD Review", "Storage Review", and "AnandTech", the new schemes apparently have the capability to perform as well as or close to the combination of Windows TRIM and SSD garbage collection. When Anand reviewed the ssd that I have he thought the garbage collection was "overly aggressive". I was thinking that might be good for all the possible situations in which Windows TRIM is not supported. The only question that remains to be answered is whether there is any risk involved. I guess this another situation where time will tell.
m
0
l
a c 415 G Storage
August 9, 2011 2:45:42 AM

JohnnyLucky said:
sminlal - SSD garbage collection has changed quite a bit over the last 3 years.
No matter how much GC has changed there's still a fundamental problem if the SSD controller isn't aware that blocks are not being used by the file system. It means a lot more work on its part in order to create clear flash memory pages that are ready to accept writes. TRIM and Secure Erase are the only mechanisms by which the system can inform the SSD that the information in specific sectors no longer needs to be retained and can be put into the free page pool.

Onboard write cache, compression and parallelism are being used to improve write performance under duress, but under the covers there's going to be a lot more work that needs to be done and ultimately this means more write wear on the drive.
m
0
l
a b G Storage
August 10, 2011 6:19:20 AM

sminlal said:
No matter how much GC has changed there's still a fundamental problem if the SSD controller isn't aware that blocks are not being used by the file system. It means a lot more work on its part in order to create clear flash memory pages that are ready to accept writes. TRIM and Secure Erase are the only mechanisms by which the system can inform the SSD that the information in specific sectors no longer needs to be retained and can be put into the free page pool.

Onboard write cache, compression and parallelism are being used to improve write performance under duress, but under the covers there's going to be a lot more work that needs to be done and ultimately this means more write wear on the drive.


If TRIM and secure erase were the only mechanisms to do that then using apps like AS Cleaner(free space cleaner) would never work as they do on some controllers. I only run raids on all my systems(and even tested a few different single drives with TRIM turned off) and the newer firmwares do in fact keep up if garbage collection time is allowed.

TRIm(not available in raided volumes) and SE is not needed since I can and often do write many times the capacity of my drives without ever seeing read/write/modify speed degradation effects. Have to avoid doing that all in one session though and implement idle time recovery/GC in between logins to recover dirty blocks for the next sessions workflow.

The drive keeps maps of the logically viable data in comparison to physically viable data and easily cleans what's been deleted with only idle time being needed to do it most effectively. You can even help the GC process along by shrinking the partition down to let the controller know(again.. through mapping comparisons) that the unallocated space is no longer containing valid data. Still needs time to GC that space though whereas TRIM marked blocks will be utilized/returned that much more quickly on controllers that do it in near real time. TRIM is just a quicker means to the same end as GC, is all.

Although you are completely right about overhead/WA increases for such complex algorithms but seems to be a very small price to pay for such an awesome recovery algorithm, IMO. Especially when we consider just how many TB's worth of data can be written before nand burnout even becomes a concern.
m
0
l
August 17, 2011 1:42:07 AM

people who are using ssd in raid or using windows xp need some good options besides trim.

so I downloaded as cleaner and ran it it did not take very long at all.
Now how long do I need to log off for before the drive will fully recover.

At the moment I am using agility 3 120gb drive on windows xp.
m
0
l
a c 415 G Storage
August 17, 2011 3:45:00 AM

groberts101 said:
If TRIM and secure erase were the only mechanisms to do that then using apps like AS Cleaner(free space cleaner) would never work as they do on some controllers.
AS Cleaner writes "1" bits to the empty blocks on the drive, and that happens to be the same state that a fresh, ready-to-write flash memory page has. If the SSD firmware recognizes this, it can move any flash memory pages that contain nothing but "1" bits into the free space pool. So that's a kind of "poor man's TRIM" which will work even with a RAID array. But this method is a lot less efficient than TRIM because you have do it manually and because it has to actually write "1"s to every affected sector instead of just sending a nice compact little "TRIM sectors 1000 through 1999" command.

In the end analysis you're still doing the same thing - you're telling the SSD (in this case via a very indirect mechanism) that there are sectors that it can reuse for garbage collection. It doesn't matter whether you let Windows 7 do it automatically for you or whether (with Windows XP, for example) you manually run a utility to do the same thing - the end result is that the SSD will be in a much better position to optimize its garbage collection if it knows what flash memory pages are free to be reused.
m
0
l
August 17, 2011 4:06:05 AM

ok
thanks
any idea how long it will take the drive to recover in this state if i log off but don't power down?
m
0
l
a c 415 G Storage
August 17, 2011 4:10:38 AM

I don't think this is the sort of thing you need to worry about. The SSD firmware, if it's designed and working properly, should be able to do its garbage collection in the background while you work. If you shut the system down it should remember where it left off and resume work the next time you turn the system back on again.
m
0
l
a b G Storage
August 17, 2011 6:07:03 PM

LOL.. I should have asked you which SSD you were using. Sandforce controlled drives will NOT regain speeds(unless currently in a heavily throttled state) with AS Cleaner.

Only thing that will do that completely is a secure erase to reset the drives internal mapping back to an empty state.

Next best thing you can do is to make sure that power remains to the drive throughout the idle period(bios implemeted S1 sleeps will maintain power but S3 will not) and disk activity is kept extremely low such as a logged off or bios idle will achieve. Best to temporarily shut sleep off completely to be sure, though.

Also need to be aware that the SSD will be misaligned in XP unless you preformat it(plug it in and quick-format it as a spare) with another newer machine(Vista/W7) or use diskpart. 1024k is Windows Vista/7 default offset and works well.

I won't even go into details on how various controllers do things from an internal algorithm standpoint(though sminlal was very close a couple posts up) since your options are limited there with a Sandforce drive like that.

Typically adding about 1 overnight logoff per week is sufficient to keep the free block pool full enough to avoid throttling or performance/latency hits. If you are writing larger amounts or the drive has become noticably degraded? 2 consecutive overnight idles should help you catch up a bit faster.

Also be sure to never fill your drives capacity beyond about 70-80% as that will have greater impacts on recovery and stamina potential as well. Systems with less free space will require more idle time recovery to be implemented to clean up the already too small fresh block pool. Free space and idle time will give you stamina and consistency on any SSD drive but especially with a Sandforce controlled drive.
m
0
l
!