On 2017-02-23 15:01, nospam wrote:
> you didn't provide any such thing.
I'll repeat again, since you have hard time with this.
Prior to Yosemite, you could enable TRIM with a kernel extension which
hacked the SSD disk driver.
At early Yosemite, that extension required you to disable kernel
extension verification to function. (boot would hang as it switched from
EFI disk driver to the OS-X disk driver which would fail verification).
At about 10.5.3 or .2, Apple introduced an unsupported utility that
enabled TRIM in 3rd party drives without needing that extenstion hack.
So yes, what version of OS-X you have matters with regards to 3rd party
support.
> apple tests trim with its own ssds, which have apple custom firmware so
> that trim works properly.
Breaking news: Apple tests its hardware.
Other Breaking News: TRIM is pretty standard SATA command now so any
drive that support TRIM (they all do now) will work.
> there are ssds with buggy trim implementations, where problems can
> occur. do you want to trust your data to a buggy ssd?
These are very old drives. TRUM has been standard for quite some time
now. And if it doesn't support TRIM then it will ignore the TRIM
commands and functions as if TRIM were not enabled.
> modern ssds have their own garbage collection. trim is nice but it's
> not required.
All SSDs recycle a page once all the blocks inside have been
invalidated. Updating one block in a page causes the whole page to be
rewritten to another page, and the old page is invalidated, made
available for recycling.
But with TRIM, when a file is deleted, the OS sends TRIM commands to the
disk to invalidate all the blocks that had been allocated to the now
deleted file. This allows the SSD to 1- stop copying those blocks
whenever another block in same page is updated and 2 to send to
"recycling" any pages where all the blocks inside were TRIMmed.
Cosndier also this: with a page size containing 4 blocks of 512bytes.
Say you delete a file 1 that occupies blocks 1 and 2. You then rewrite
block 3 which belongs to file 2.
The SSD does not know that blocks 1 and 2 are no longer in use, so it
copied blocks 1 2 and 4 to a new page, and inserts the contents of the
updated block 3 into the new page. (then invalidates the old page).
End result: you have a new page with 4 occupied blocks. (even if 2
belong to a deleted file).
With TRIM: You delete file 1, blocks 1 and 2 are TRIMmmed.
When you update block 3, the SSD copies only block 4 to a new page,
inserts the updated contents of block 3 and leaves blocks 1 and 2
unwritten.
Therefeore, the next time the SSD needs to map a disk block, it can use
blocks 1 and 2 of that page since they are free to write to. This
reduces the need to copy the whole page to a new one, and invalidate the
old one.