With his permission, I am going to re-post a private conversation with Tecmo34. The subject is, once again, whether Garbage Collection can replace TRIM, or if they are complementary.
Despite the massive number of posts on GC being sufficient, everything I have read about GC indicates that it collects used pages into entire used blocks, thus making more space available for immediate writing and reducing write amplification. But when a file is deleted, the pages of the file are not touched; it's done with the directory entry in the filesystem. So unless the SSD can read the filesystem or allocation tables, I can't believe that GC can replace TRIM.
If you managed to read through all of that.... So I have two conflicting pieces of information. First, experienced users say that GC is sufficient. Second, I have seen no explanation of a mechanism other than TRIM by which the SSD can tell that these 5,000 pages are now free space after a file is deleted.
If anyone knows how GC can accomplish this, I would greatly appreciate an explanation. If anyone knows for sure that the two are complementary and GC cannot make free blocks from files that were deleted, I would greatly appreciate that.
If there is a way to get an SSD to tell you how much space it thinks is used, I could do an easy test. Put the SSD on an XP system, in IDE mode. Write a bunch of files to it, and look at how much used space the SSD thinks it has and Windows Disk Manager thinks it has. Delete the files, and again check both measures of used space - they should disagree by the amount deleted (if they agree, did TRIM happen?). Then let the drive sit overnight to run GC. Finally, check the two measures of space used. If the SSD and Disk Manager agree, it saw that the space was deleted. If the SSD still thinks that the space is used, then TRIM is still necessary in addition to GC.
This inquiring mind really wants to know.
Despite the massive number of posts on GC being sufficient, everything I have read about GC indicates that it collects used pages into entire used blocks, thus making more space available for immediate writing and reducing write amplification. But when a file is deleted, the pages of the file are not touched; it's done with the directory entry in the filesystem. So unless the SSD can read the filesystem or allocation tables, I can't believe that GC can replace TRIM.
WyomingKnott:
A side question on SSD cleaning. For garbage collection to work, wouldn't the drive have to be able to read the allocation information or directory information that is part of the filesystem? The blocks themselves don't have allocation flags on each block; all 4K is available for data.
This came up from a discussion with a colleague who is using an SSD in Vista for his data only - he does video editing, and data reads and writes are his limiting factor.
Thanks in advance
-Peter (WyomingKnott)
Tecmo34:
Peter,
Here is a few things you can read through to get a better understanding... 1) is from Wikipedia & 2) a thread from Tom's... [<user xxxxx> is one of the most knowledgeable users for SSD's (he is a beta tester of OCZ & works with their tech group & is very respected in their forum)]
http://en.wikipedia.org/wiki/Garba [...] collection
http://www.tomshardware.com/forum/ [...] ative-trim
The key with GC is idle time... It works just as well as TRIM does just at a slower pace. You have to remember TRIM is just a command to speed up the identification process and GC does all the work.
If you have any other questions, feel free to ask any time
Best Regards,
Doug
WyomingKnott:
/*** Begin embedded quote
tecmo34 wrote :
Peter
Here is a few things you can read through to get a better understanding... 1) is from Wikipedia & 2) a thread from Tom's... [<User xxxx> is one of the most knowledgeable users for SSD's (he is a beta tester of OCZ & works with their tech group & is very respected in their forum)]
<snip>
The key with GC is idle time... It works just as well as TRIM does just at a slower pace. You have to remember TRIM is just a command to speed up the identification process and GC does all the work.
If you have any other questions, feel free to ask any time
Best Regards,
Doug
/*** End embedded quote
Me again. The Wikipedia article seems to confirm my original suspicion (but I am aware that a person will read 20 reports and find the one thing that supports hist point of view).
/*** Begin embedded quote
If the user or operating system erases a file (not just remove parts of it), the file will typically be marked for deletion, but the actual contents on the disk are never actually erased. Because of this, the SSD does not know the LBAs that the file previously occupied can be erased, so the SSD will keep garbage collecting them.
/*** End embedded quote
So overwritten blocks are easily Garbage Collected. If I had a pre-allocated database on an SSD, I'd be writing to the same allocated space over and over and GC would see the overwritten pages.
But if I'm Joe User, which I am, and I'm doing cleanup by deleting files that I no longer need, without the TRIM command the SSD has no way of knowing that those pages are no longer used and will continue to protect them, and even copy them as part of the GC process.
Groberts101 wrote
/*** Begin embedded quote
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.
/*** End embedded quote
But he didn't describe any way that the SSD could be GC'ing deleted files. So I am still, despite my usually open mind, hoping to get
Wikipedia also writes that
/*** Begin embedded quote
SSD Manufacturers that did not originally build TRIM support into their drives can either offer a firmware upgrade to the user, or provide a separate utility that extracts the information on the invalid data from the OS and separately TRIMs the SSD. The benefit would only be realized after each run of that utility by the user. The user could set up that utility to run periodically in the background as an automatically scheduled task.
/*** End embedded quote
Despite the fact that I can do a Google search myself, I haven't found such an object. Do you know of one, and if they are vendor-specific or will work with any SSD?
And then later: Ignore my dumb question about a utility. I managed to read the thread without AS Cleaner registering. It registered when I re-read the thread.
If you managed to read through all of that.... So I have two conflicting pieces of information. First, experienced users say that GC is sufficient. Second, I have seen no explanation of a mechanism other than TRIM by which the SSD can tell that these 5,000 pages are now free space after a file is deleted.
If anyone knows how GC can accomplish this, I would greatly appreciate an explanation. If anyone knows for sure that the two are complementary and GC cannot make free blocks from files that were deleted, I would greatly appreciate that.
If there is a way to get an SSD to tell you how much space it thinks is used, I could do an easy test. Put the SSD on an XP system, in IDE mode. Write a bunch of files to it, and look at how much used space the SSD thinks it has and Windows Disk Manager thinks it has. Delete the files, and again check both measures of used space - they should disagree by the amount deleted (if they agree, did TRIM happen?). Then let the drive sit overnight to run GC. Finally, check the two measures of space used. If the SSD and Disk Manager agree, it saw that the space was deleted. If the SSD still thinks that the space is used, then TRIM is still necessary in addition to GC.
This inquiring mind really wants to know.