Is TRIM support now a basic OS feature?

Status
Not open for further replies.

murphyc

Senior member
Apr 7, 2012
235
0
0
This perhaps could be a storage question, but it's more technical/ideological than "how do I..."

Apple apparently only supports TRIM with their own SSDs, within OS X. Is Apple just being Apple? Or is there some good reason for not having widespread TRIM support for any 3rd party SSD? :confused:
 

murphyc

Senior member
Apr 7, 2012
235
0
0
Yeah the marketing/sales angle doesn't add up completely because they don't even sell an Apple branded SSD *except* at the time of purchasing a laptop with one already installed.

Obviously XP and even Vista pre-date the TRIM command, so how are people on XP and Vista getting by with SSDs? Hacks to enable TRIM somehow?

Further, on linux for ext4 you add 'discard' to fstab to enable TRIM support within ext4. I don't know that this is an autosensing feature for mount or not since I don't yet have an SSD installed. But you wouldn't want TRIM being used on a drive that can't accept the command. So are SSD's identifying themselves to the OS as an SSD?
 

murphyc

Senior member
Apr 7, 2012
235
0
0
I'm seeing quite a few SSD's have Windows only diagnostic software. I wonder if Apple is proposing "we will give you disk TRIM if you make nice diag stuff for OS X like you are on Windows". It's not a totally unreasonable trade.
 

murphyc

Senior member
Apr 7, 2012
235
0
0
Something interesting about newer SSDs, is that as incoming data streams in from the file system, the firmware knows which LBAs are new assignments (previously not used) vs are overwrites of existing data.

When the LBA's requests are overwrites, the firmware doesn't actually overwrite that data, it simply de-references the LBA assignment to the physical sectors, and writes the data on previously zero'd and ready sectors. Later it goes back and zero's out those de-referenced sectors so they're ready to accept data again. TRIM command not required for this. In effect such an SSD implements copy-on-write.
 

anongineer

Member
Oct 16, 2012
25
0
0
Obviously XP and even Vista pre-date the TRIM command, so how are people on XP and Vista getting by with SSDs? Hacks to enable TRIM somehow?

An SSD is treated by WinXP like any other spinning hard drive. TRIM speeds up physical block erasure, but the SSD's garbage collector will get to them eventually. Creating and deleting large numbers of files in a short span of time could swamp the garbage collector and cause performance to decrease.
 

imagoon

Diamond Member
Feb 19, 2003
5,199
0
0
TRIM is not required at all. However it improves performance on writes to sectors where the data is deleted. Editing a file may or may not save data back to the same sector. It is obvious to the drive in that case that the copy on write would indicate that the original blocks could be cleared and reused. However a delete would only result in a modification to the filesystems tables and the blocks are not cleared. The drive has no way to know if this is useful data or not so it has to wait for the OS to request a write to that sector to know it would be "ok" to clear it. Copy on write helps reduce the write delays but eventually there will be "no free blocks" as far as the SSD is concerned.

TRIM commands sent to an non TRIM device result in an "ATA command not supported" response from the drive controller. It doesn't cause harm to the device.
 
Status
Not open for further replies.