It's also a horrible, ugly hack of a solution.
"Well, finally we can make some jokes about
![Apple :apple: :apple:](https://forums.macrumors.com/mrimages/appleblack.png)
It's also a horrible, ugly hack of a solution.
It's also a horrible, ugly hack of a solution.
What else would you suggest?
Garbage collection does the same thing automatically.
How is it elegant? It doesn't work on its own. It requires your screen saver or the like to kick in and inform the drive, do something.
GC cannot possibly duplicate TRIM. All it can do is it's best to maximize the number of free blocks of NAND. TRIM makes this much easier. GC without TRIM is moving a lot of data around that may no longer be needed.
This is about the funniest thing that I've ever read on MacRumours !
Especially since about the only bit of fact involved is that proactive *garbage collection* will run when the disks are idle (that is, often when the screensaver is running).
When data is written to an SSD, if the NAND block has any existing data in it already, the data needs to be read, the block erased, and then the whole block (with new data and old) rewritten. This read-erase cycle incurs a performance penalty and thus it's ideal to write to empty blocks.
GC helps by collecting pages of data into complete blocks and doing it's best to free up blocks so that this read-erase penalty can be avoided. However, due to the fact that file systems are abstracted from the media, they do not communicate which files are deleted, GC will continue moving deleted data around. And since it's juggling deleted data along with relevant data, it's got less space to work with and therefore less truly free blocks that can be used without the read-erase penalty.
TRIM aids CG by telling it which data has been deleted so GC doesn't need to keep moving it around. It's a pretty simple solution really... much simpler than the alternative of writing a new file system.
GC cannot possibly duplicate TRIM. All it can do is it's best to maximize the number of free blocks of NAND. TRIM makes this much easier. GC without TRIM is moving a lot of data around that may no longer be needed. People use to say that because SandForce compressed the data, there was actually more free space to work with than it appeared so it's GC could do a better job. The fact is, even Sandforce GC will eventually get burdened and run out of free blocks and in the absence of TRIM will degrade.
It wouldn't take a lot of effort for the drive makers to invest in understanding directory structures of NTFS, HFS, FAT32, Linux and baking that into GC.
Embedding knowledge of filesystems into the SSD firmware is an incredibly bad idea.
Not only do you have synchronization issues, you have issues with filesystem evolution (and "Linux" isn't a filesystem, it's ext2,ext3,ext4,zfs,xfs,btrfs,...). See http://en.wikipedia.org/wiki/Comparison_of_file_systems .
On top of that, if you have software or hardware RAID the individual drives don't have the full filesystem visible - so the drive is blind.
And in practice, plain GC works great. 40GB free on a 960GB SSD, never bothered to put TRIM on, just with GC
I don't see any synch issues, but then again, I'm not a file system coder.
Some questions and comments.
- Your 960GB SSD really contains 1100GB of NAND, overprovisioning by 140GB.
- Is your "40GB" free what the filesystem in a 960GB partition reports, or did you do additional overprovisioning and create a 920GB partition to increase the overprovisioning to 180GB?
- If the former, you might not have any free space. Without TRIM, if any block is ever written, it's in use forever* regardless of what the OS reports for unused space.
The beauty of TRIM is that any free space in the filesystem is effectively overprovisioned space. If you fill the disk, the overprovisioned percent drops. As you free up space, the overprovisioned space increases.
* "forever" means until a secure erase resets the drive to unused.
Consider the sequence:
If you follow that link and it seems complicated - then you know exactly why I said that making the drive firmware aware of the filesystem on-disk structures is a very bad idea.
Especially since there's a simple and elegant solution called TRIM (or "discard") that lets the filesystem inform the disk (at step 2 in the last sequence) that blocks aren't referenced.
Yes, my drive is 960GB, and 40gb is free from that. So 920gb used.
On the long run TRIM is indispensable.
Because this system uses TRIM, the 48GiB or so of free space in the filesystem is effectively part of the overprovisioning, although this number varies depending on how full the drive is.
Jesus, the point is it requires the OS to manage stuff on the drive instead of the drive being self managed.
sts = mark_blocks_as_free (partition_handle, start_block, number_of_blocks);
sts = mark_blocks_as_free (partition_handle, start_block, number_of_blocks);
if (trim_enabled (partition_handle))
send_trim_notification (partition_handle, start_block, number_of_blocks);
Particularly when you have apple being asshats about not letting any drive (but theirs) benefit from trim.
The OS does not "manage" anything on the drive, it simply issues a notification to the drive at the point that the OS manages the space allocation.
Code:sts = mark_blocks_as_free (partition_handle, start_block, number_of_blocks); if (trim_enabled (partition_handle)) send_trim_notification (partition_handle, start_block, number_of_blocks);
Nothing is managed - an advisory notification is sent to the drive using information that is already at hand.
Seems like a problem with Apple
Um, dude, that is the definition of management. It's notifying of the event, and directing the drive to the right spot. If that's not management, nothing is.
"Seems like a problem with Apple"
On this part, we can wholeheartedly agree.![]()
How is it elegant? It doesn't work on its own. It requires your screen saver or the like to kick in and inform the drive, do something. Instead, a really elegant solution would just take care of this in the drive, instead of requiring a rube goldberg domino switch to turn it on. It's an abortion. That said, to each their own.
Then why not each cell should work on its own, but GC is bad?
What's the point to have a SSD? Work in a computer!
Will you ever run a modern computer without SSD / HDD, CPU, OS....? If not, then all these components should work as a team to achieve maximum performance. If the OS (TRIM) + SSD combination can make both of them perform better, then why don't take the synergy? Which provide a win win situation to both SSD and the OS.
If you will ever take your SSD out, play it on the street like what you do to your mobile phone. Then I agree that the SSD should able to handle everything on its own.
Of course You can run the SSD without TRIM, but there is nothing to support that a SSD can run better without TRIM. Only the other way around.
From a philosophical and design point of view, it's HORRIBLE design not to make devices that are self contained abstractions.
...
I [am] personally against "The Apple way of supporting TRIM", but not against TRIM.
...
I don't know if there will be any better SSD internal solution to replace TRIM. However, at this moment, even though TRIM is a horrible and stupid idea. It's still better to use it.
So, in your opinion, all computer's components (GPU, USB controller, optical drive, etc) should contain it's own driver, and the OS should not do anything, or provide any driver (software support) to those devices. Isn't it?
Obviously we have different point of view. I treat the whole computer as one device, so it is self contain everything it need, including TRIM. I personally against "The Apple way of supporting TRIM", but not against TRIM.
I don't know if there will be any better SSD internal solution to replace TRIM. However, at this moment, even though TRIM is a horrible and stupid idea. It's still better to use it. "Is TRIM horrible?" and "Should we use TRIM?" are 2 different matters. There is nothing can replace this "stupid" and "horrible" function yet. And this "horrible" solution which actually really make a SSD perform better under a modern OS.
You can say TRIM is bad, this is your opinion. You can against it and don't use it. However, you can't change the fact that TRIM helps both the SSD and OS to perform better.
There's a bit of a contradiction here....![]()
My point is that with 7% overpovisioning and GC, you basically don't need trim, at least on the drive that I've been using,..
Haha, sorry for my poor English. I personally love TRIM and don't think its stupid and horrible. However, "even though" it is, we still better to use it.![]()
GC cannot possibly duplicate TRIM. All it can do is it's best to maximize the number of free blocks of NAND. TRIM makes this much easier. GC without TRIM is moving a lot of data around that may no longer be needed. People use to say that because SandForce compressed the data, there was actually more free space to work with than it appeared so it's GC could do a better job. The fact is, even Sandforce GC will eventually get burdened and run out of free blocks and in the absence of TRIM will degrade.
TRIM really needs to be added to the base SATA spec (which looks like it's in progress.) That way Apple can't implement or claim to support SATA without supporting TRIM for any drive on that bus.
Doesn't necessarily solve the PCI-E drive issues.
If TRIM had been added to the SATA spec when it first came out, we wouldn't be here. So when I say it's a hack of a solution, I mean it's not part of the SATA spec, therefore it's a hack on SATA.
http://en.wikipedia.org/wiki/Serial_ATA#SATA_revision_2.0_.283_Gbit.2Fs.2C_300_MB.2Fs.29
SATA revision 3.1[edit]
Released in July 2011, revision 3.1 introduced/changed these features:
- mSATA, SATA for solid-state drives in mobile computing devices, a PCI Express Mini Card-like connector that is electrically SATA.
- Zero-power optical disk drive, idle SATA optical drive draws no power.
- Queued TRIM Command, improves solid-state drive performance.