TRIM & using SSD and mSATA as PATA
  • Priest of the Order of the Butterfly
    Priest of the Order of the Butterfly
    ausPPC
    Posts: 543 from 2007/8/6
    From: Pending...
    Some time after reading this article - http://hardware.slashdot.org/story/14/11/16/1749220/apple-disables-trim-support-on-3rd-party-ssds-in-os-x it occurred to me that solid state drives being used with PATA converter hardware might also miss out on performing this function. Is this the case and does it matter to MorphOS users?
    PPC assembly ain't so bad... ;)
  • »23.11.14 - 08:59
    Profile Visit Website
  • ASiegel
    Posts: 1377 from 2003/2/15
    From: Central Europe
    MorphOS does not provide TRIM support. You could create a backup of your files and manually "trim" via Linux, however.

    Source: Piru
  • »23.11.14 - 09:08
    Profile
  • Moderator
    Kronos
    Posts: 2334 from 2003/2/24
    TRIM enhances performance if the system is writing/deleting files over and over again, something not very common under MorphOS.

    Also an SSD cluttered by not being trimmed will still stay faster in accesstimes than any HD, read/write operation might take longer, but since we can't use the current interfaces at max speed that is also not a real issue.
  • »23.11.14 - 09:58
    Profile
  • MorphOS Developer
    geit
    Posts: 1053 from 2004/9/23
    Trim "frees" unused blocks on the media. In easy words: It tells the SSD which blocks the file system currently does not use.

    This - as said - speeds up ssd access, as the SSD knows a block is unused and so the controller does not need to backup that block if it decides to use another block to store constant data. (wearleveling)

    So in theory trim would also extent the live span of your SSD. Practically this does not really matter unless the physical block size matches the file system block size and all partitions are proper allined. In most cases, I guess, this is not the case as most SSDs use at least 2K block. Probably even 8K or bigger chunks and you would need to use the same blocksize in SFS or whatever file system you use. Also the RDB section and the reserved block area must match that size or the block offset is wrong.

    If you want to do something to keep the health of the drive, follow the instructions given by ASiegel/Piru. Also when reparitioning the drive after trimming, keep the above in mind. I would simply not care about allinement and just leave some non partitioned area at the end. Since these blocks will never be touched by MorphOS, the SSD will forever know these blocks are free to use.

    If you want to use trim to increase your SSDs speed, this is a waste of time. Even in worst case any recent SSD is multiple times faster than any of our systems can handle.

    Geit


    [ Edited by geit 23.11.2014 - 14:35 ]
  • »23.11.14 - 12:33
    Profile
  • vox
  • Priest of the Order of the Butterfly
    Priest of the Order of the Butterfly
    vox
    Posts: 616 from 2003/11/24
    From: Belgrade
    Quote:

    ausPPC wrote:
    Some time after reading this article - http://hardware.slashdot.org/story/14/11/16/1749220/apple-disables-trim-support-on-3rd-party-ssds-in-os-x it occurred to me that solid state drives being used with PATA converter hardware might also miss out on performing this function. Is this the case and does it matter to MorphOS users?


    As explained:

    a) TRIM is safety option, and its sad if Apple disables it
    b) MorphOS doesn`t have it done in software, so if you plan to use SSD with MorphOS machine it should have hardware TRIM
    c) Don`t use converters :-) There are SATA SSD drives
    ------------------------------------------
    iMac G5 1GB with MorphOS and MacOS X
    Lame PC with AmiKit XE, Linux, AROS and sadly Win11
    Telegram MOS group: https://t.me/+zCLnwCvwhs4wMTI0
    Steam https://steamcommunity.com/profiles/76561198164221485/
  • »28.11.14 - 00:43
    Profile
  • Yokemate of Keyboards
    Yokemate of Keyboards
    Andreas_Wolf
    Posts: 12199 from 2003/5/22
    From: Germany
    > MorphOS doesn`t have it done in software, so if you plan to use SSD with
    > MorphOS machine it should have hardware TRIM

    TRIM needs to be supported by both the hardware (firmware) and the software (operating system), so you can't use TRIM with MorphOS even when the hardware supports it. Pure "hardware TRIM" does not exist (and cannot exist by concept).

    > Don`t use converters :-) There are SATA SSD drives

    ...for which you'd need a converter to use it with a PATA-only machine, wouldn't you? But as said, this is moot for MorphOS anyway, as it doesn't support TRIM no matter if with SATA SSD going through converter or with PATA SSD used directly.
  • »28.11.14 - 12:38
    Profile
  • Priest of the Order of the Butterfly
    Priest of the Order of the Butterfly
    matt3
    Posts: 704 from 2004/2/10
    This might be a solution:

    http://eshop.macsales.com/shop/SSD/OWC/Mercury_Legacy_Pro

    It does have some firmware to reduce wear.

    [ Edited by matt3 28.11.2014 - 22:01 ]
  • »29.11.14 - 01:59
    Profile
  • MorphOS Developer
    geit
    Posts: 1053 from 2004/9/23
    Quote:

    matt3 wrote:
    This might be a solution:

    http://eshop.macsales.com/shop/SSD/OWC/Mercury_Legacy_Pro

    It does have some firmware to reduce wear.


    If you want to waste your money. ANY SSD does wear management. Just forget about it and use the damn drives.

    They work fine even in long term and with IDE adapters. I use a 120GB SSD connected to an IDE2SATA adapter in my pegasos and it is my server and running 24/7.

    I cannot even remember when I used a harddrive in Pegasos2. I even use an 64GB SSD as external drive, which gets entirly wiped and overwritten twice a week.

    I used 2.5" harddrives before and they died in half of the time due transport damage.

    Geit


    [ Edited by geit 29.11.2014 - 10:20 ]
  • »29.11.14 - 08:19
    Profile
  • Paladin of the Pegasos
    Paladin of the Pegasos
    Jupp3
    Posts: 1193 from 2003/2/24
    From: Helsinki, Finland
    Quote:

    ASiegel wrote:
    MorphOS does not provide TRIM support. You could create a backup of your files and manually "trim" via Linux, however.


    Emphasis on word "could", it doesn't say "should". You might do this when f.ex. formatting partition anyway. Not something you would want to do each month, for example.

    Quote:

    geit wrote:
    I would simply not care about allinement and just leave some non partitioned area at the end. Since these blocks will never be touched by MorphOS, the SSD will forever know these blocks are free to use.



    Also you probably should NEVER use full format with SSD. Without trim, that sets ALL contained blocks to the "might be in use" state (instead of "known to be free"). Better let that happen gradually, when you start filling the partition with data.

    The only exception that comes to my mind right away, is crypted partitions.

    -EDIT-

    As for Apple, they didn't "disable TRIM", but rather "disabled TRIM on non-Apple-branded devices". AFAIK, they already did this in the previous OS version, BUT there you could switch this on/off for drives at will. Now on the newest version, you must disable "bigger chunk of security features" to get TRIM working normally on non-Apple drives.

    I just wonder, what is this supposed to do with security? It's as (un)secure with and without TRIM...

    [ Edited by Jupp3 02.12.2014 - 14:55 ]
  • »02.12.14 - 11:30
    Profile Visit Website
  • MorphOS Developer
    geit
    Posts: 1053 from 2004/9/23
    Quote:

    Jupp3 wrote:
    Quote:

    geit wrote:
    I would simply not care about allinement and just leave some non partitioned area at the end. Since these blocks will never be touched by MorphOS, the SSD will forever know these blocks are free to use.



    Also you probably should NEVER use full format with SSD. Without trim, that sets ALL contained blocks to the "might be in use" state (instead of "known to be free"). Better let that happen gradually, when you start filling the partition with data.



    Sure, but he wanted to format and repartition a used SSD, where TRIM makes it fresh as new.

    Well, I did not do this for any of my SSDs. They all work in worst case mode. 512KB blocksize, no proper alignment, no trim supporting file system and no unused area. :D

    Quote:

    Jupp3 wrote:

    As for Apple, they didn't "disable TRIM", but rather "disabled TRIM on non-Apple-branded devices". AFAIK, they already did this in the previous OS version, BUT there you could switch this on/off for drives at will. Now on the newest version, you must disable "bigger chunk of security features" to get TRIM working normally on non-Apple drives.

    I just wonder, what is this supposed to do with security? It's as (un)secure with and without TRIM...


    I guess Apple did that because some vendors had problems with their TRIM handling and the OS using TRIM, simply corrupted the file systems and data on the drives. By disabling it for these "non Apple SSDs" (==untested SSDs) they avoid any of these problems.

    Geit
  • »02.12.14 - 13:15
    Profile
  • Paladin of the Pegasos
    Paladin of the Pegasos
    SoundSquare
    Posts: 1213 from 2004/12/1
    From: Paris, France
    Apple can disable it it doesn't really matter, a lot of tools are available to re-enable it. Could hackintoshes live without TRIM ? : )
  • »02.12.14 - 14:00
    Profile