Jump to content
About Just Joined group Read more... ×
IUTniun

High Sierra slow booting with TRIM enabled

15 posts in this topic

Recommended Posts

The latest issue with APFS comes in the form of introducing an extra 15 seconds of booting time when Trim is enabled. It is currently believed that the filesystem is performing a routine Trim-related cleanup process during this time, which is causing boot times to increase for users who want their SSD’s to benefit from Trim.

Trim is an important feature for Solid State Drive performance and longevity. Some users who want to enable Trim on High Sierra may notice an increase in boot time for now. I am convinced this is an unintentional bug in APFS from Apple’s side that should be fixed in an upcoming version of High Sierra.

Share this post


Link to post
Share on other sites
Advertisement

APFS has its own built-in "TRIM" garbage collection that is optimized for SSDs. No reason to enable normal TRIM feature on APFS formatted SSDs.

Any source for that? Maybe I'll switch to APFS next week.

Share this post


Link to post
Share on other sites

On 10.13.1 I was booting in about 20 seconds (trim enabled) . Now on 10.13.2 it it taking 2 minutes with trim enabled.

 

I just built my first Hackintosh and read the Clover wiki to gain a better understanding of the config.plist.  I am really stumped at this point as to why this is happening. I upgraded Lilu 1.2.1, fakeSMC, and the new apfs file as per the TonyMac86  and I am using Hackintosher's config.plist since 10.13 which has been working perfectly.

 

I tied resetting permissions, resetting kext cache, putting the kexts in other instead of 10.13. Nothing has worked so far.

 

If someone can take a look at my attached boot.log and point me in the right direction I would very much appreciate it!  I normally boot directly into macOS 10.3.2 and hide my preboot volumes, so I only see MacOS, Recovery and Windows 10.

 

Thank you!

 

EDIT: I disabled Trim, checked my BIOS settings and redid my EFI folder and config file.  I boot up fast as before, problem solved

Edited by SeriusNtentions

Share this post


Link to post
Share on other sites

On my MacBook Pro 13 2012 as on pc with SSD Kingston SV300S37A120G (APFS) after enabling TRIM loading takes ~45 seconds, if TRIM disabled loading takes ~15 seconds.

 

APFS has its own built-in "TRIM" garbage collection that is optimized for SSDs. No reason to enable normal TRIM feature on APFS formatted SSDs.

 

 

That is on APFS not needed turn on TRIM, as APFS has something like own TRIM? Right?

Share this post


Link to post
Share on other sites

Any source for that? Maybe I'll switch to APFS next week.

o APFS is optimized for solid-state drives (SSDs) and other all-flash storage devices https://support.apple.com/en-us/HT208033

 

o TRIM operations are issued asynchronously from when files are deleted or free space is reclaimed, which ensures that these operations are performed only after metadata changes are persisted to stable storage. https://developer.apple.com/library/content/documentation/FileManagement/Conceptual/APFS_Guide/FAQ/FAQ.html

 

 

On 10.13.1 I was booting in about 20 seconds (trim enabled) . Now on 10.13.2 it it taking 2 minutes with trim enabled.

 

I just built my first Hackintosh and read the Clover wiki to gain a better understanding of the config.plist.  I am really stumped at this point as to why this is happening. I upgraded Lilu 1.2.1, fakeSMC, and the new apfs file as per the TonyMac86  and I am using Hackintosher's config.plist since 10.13 which has been working perfectly.

 

I tied resetting permissions, resetting kext cache, putting the kexts in other instead of 10.13. Nothing has worked so far.

 

If someone can take a look at my attached boot.log and point me in the right direction I would very much appreciate it!  I normally boot directly into macOS 10.3.2 and hide my preboot volumes, so I only see MacOS, Recovery and Windows 10.

 

Thank you!

 

First we do not support tonymac installations and second, stop using normal TRIM if you are going to use APFS

Share this post


Link to post
Share on other sites

o APFS is optimized for solid-state drives (SSDs) and other all-flash storage devices https://support.apple.com/en-us/HT208033

 

o TRIM operations are issued asynchronously from when files are deleted or free space is reclaimed, which ensures that these operations are performed only after metadata changes are persisted to stable storage. https://developer.apple.com/library/content/documentation/FileManagement/Conceptual/APFS_Guide/FAQ/FAQ.html

 

 

 

First we do not support tonymac installations and second, stop using normal TRIM if you are going to use APFS

 

I fixed my problem. I redid my EFI (Hackintosher method) and verified my bios. TRIM is disabled. I boot quickly again! 

Share this post


Link to post
Share on other sites

APFS has its own built-in "TRIM" garbage collection that is optimized for SSDs. No reason to enable normal TRIM feature on APFS formatted SSDs.

 

You are completely wrong.

 

EDIT: I disabled Trim, checked my BIOS settings and redid my EFI folder and config file.  I boot up fast as before, problem solved

 

what do you mean "redid my EFI folder"? If you disable TRIM boot will be fast but problem is not solved.

I solved it in 4 different systems 3 hackintosh and a macmini by backing up the entire system with time machine and restoring it to ssd. In all 4 cases boot time was 30 seconds faster with TRIM enabled and disk still in APFS.

Share this post


Link to post
Share on other sites

Before saying someone is wrong please provide documentation, as you can see I provided the documentation showing APFS has its own “TRIM”

Share this post


Link to post
Share on other sites

I checked the documentation, the links you provided.

 

It seems to me that only apple products have the necessary hardware to running safely APFS

 

"... all Flash/SSD and hard disk drives used in Apple products use Error Correcting Code (ECC)

ECC checks for transmission errors, and when necessary, corrects on the fly. Apple File System uses a unique copy-on-write scheme to protect against data loss that can occur during a crash or loss of power."

 

So I think APSF has TRIm support but only on apple ssd-s.

I mean how can we be sure that our SSDs are compactible with the APFS -- ECC implentation apple uses?

 

 

 

 

 

Before saying someone is wrong please provide documentation, as you can see I provided the documentation showing APFS has its own “TRIM”

Share this post


Link to post
Share on other sites

Before saying someone is wrong please provide documentation, as you can see I provided the documentation showing APFS has its own “TRIM”

 

The links you provided don't tell anywhere that APFS performs TRIM ops on it's own. 

The disk and the file system don't know 'horse manure' of what files your are deleting and what sectors to flag as unused. The command is issued by the OS not by the file system.

"APFS supports TRIM" means it can handle the TRIM commands issued by the OS. If you disable TRIM in the OS then you are not trimming anything.

 

"A trim command (known as TRIM in the ATA command set, and UNMAP in the SCSI command set) allows an operating system to inform a solid-state drive (SSD) which blocks of data are no longer considered in use and can be wiped internally."

 

https://en.wikipedia.org/wiki/Trim_(computing)

 

"The APFS code, like the HFS+ code, uses the TRIM command, for better space management and performance."

 

The command is issued by the OS both for HFS+ and APFS (or NTFS, etc..), if you disable it TRIM is gone.

 

https://en.wikipedia.org/wiki/Apple_File_System

I checked the documentation, the links you provided.

 

It seems to me that only apple products have the necessary hardware to running safely APFS

 

"... all Flash/SSD and hard disk drives used in Apple products use Error Correcting Code (ECC)

ECC checks for transmission errors, and when necessary, corrects on the fly. Apple File System uses a unique copy-on-write scheme to protect against data loss that can occur during a crash or loss of power."

 

So I think APSF has TRIm support but only on apple ssd-s.

I mean how can we be sure that our SSDs are compactible with the APFS -- ECC implentation apple uses?

 

TRIM command is issued by the OS regardless of APFS or HFS or what SSD you have on your system. If you disable it you don't get TRIM at all, pure and simple. 

 

More on ATA TRIM:

 

https://www.thomas-krenn.com/en/wiki/ATA_Trim

 

In order for ATA Trim to work, the following components must be supported:

  • by the SSD itself
  • by the operating system (Windows 7, for example)[2] or Linux kernels as of version 2.6.33[3])
  • by the file system

Share this post


Link to post
Share on other sites

Also from the Samsung FAQ on SSDs:

 

What is TRIM?

 

TRIM is a facility by which the OS can notify the SSD when data is either marked for erase or no longer valid.

TRIM helps to make Garbage Collection more efficient by preparing invalid data for deletion. When the OS “deletes” data, the data does not actually go anywhere.

The space in which it resides is simply marked as “free space” that may be used later.

By default, the OS doesn't let the SSD know which data is now free.

TRIM allows the OS to inform the SSD which data is no longer valid, allowing the SSD to skip over invalid data when performing Garbage Collection.

 

Does Windows XP support TRIM?

 

No, only Windows 7 and above supports the TRIM feature.

The Samsung SSD Magician software enables you to manually use TRIM on both Windows XP and Windows Vista.

 

As you can see TRIM is OS dependent. XP uses NTFS and even VISTA does but TRIM is only supported from Windows 7.

 

http://www.samsung.com/semiconductor/minisite/ssd/support/faqs-03/

Share this post


Link to post
Share on other sites

Argh! So difficult deciding whether to have TRIM enabled at the OS level for my Samsung 3rd party SSDs! After reading Chris74's post, I'm thinking best to enable it again. That does seem right to me - it's a hardware feature, so I've never quite understood how just using APFS can reach down to the level of the SATA/NVME commands in the HAL... 

Gah! Thanks for everyone's input though :)

Share this post


Link to post
Share on other sites

  • Recently Browsing   0 members

    No registered users viewing this page.

Announcements

  • Similar Content

    • By gekko.be
      I have an old Hackintosh that I have brought back to life. An ASUS P5KPLAM-SE mobo, Intel Core 2 Quad, with a Sapphire HD 5670 1GB graphics card. It used to work just fine on High Sierra 10.13.3 (I think it was .3) However I only used the DVI port. Updated to 10.13.6 and with AMD kexts rollback to the previous versions I got everything o wrk just fine: boot, HDMI video, HDMI audio etc etc. The only problem I face is that my USB keyboard and mouse freeze/hang seemingly very random... I can not seem to get it right. Unplugging and replugging the USB device makes it work again, sometimes for a few seconds sometimes for an hour ... No idea what's wrong... Have tried tons of options in clover, USBInjectall.kext with port limit patch, whatever I could find... Would there be anyone out there who would have an idea of what could be the problem?
    • By macinsane
      *This guide is deprecated and will not be maintained anymore*

      Update: Now running Mojave! Thanks to mojave2core! Yeah   Still using C2D in 2019!
      Inserted a nice and cheap GT710 that is not relying on nVidias Webdrivers and runs OOB under Mojave.
       
      Nice, seeing High Sierra running on this old but capable system! It rocks with a new ASUS GT1030
       
      Config:
      Gigabyte EP43-DS3L
      Core2Quad Q9300
      6 GB DDR2 RAM
      Asus GT1030 2GB
      Sandisk SSD 128GB
      TP-Link AC1200 Wifi USB
      Inateck KT4006 USB 3.0 PCIe (No boot)
       
      SMBIOS: iMac14,1
      Clover: 4297  4360
       
      A good deal of DSDT editing was necessary to get this machine to boot High Sierra but finally it works flawlessly, even sleep and wake!
      You NEED to have the DSDT put in place for installation because otherwise macOS doesn't recognize the SATA ports.
      There are a few important BIOS settings: SATA hast to be set to AHCI and "native" and HPET has to be run "64-bit", I'd recommend to disable IDE and the serial and parallel port.
      For the GT1030 nVidia Webdrivers are needed, have to boot with nv_disable=1 until you have them installed.
      You have to install Clover in legacy mode because this old fella does not support UEFI.
       
      Only downside: The so often recommended Inateck USB-card isn't recognized by BIOS, so you cannot boot from it. It works perfectly within macOS though, have the ac-Wifi connected to it.
      config.plist.zip
      DSDT.aml.zip
    • By eLDeus
      Hello, can't figure out why there's no Line-In input option with VoodooHDA, but I definetly have it in my built-in audio card on the motherboard.
      Thanks!
    • By Rajan Pandit
      Hai, I have i5 2500k with 8GB Ram, GA-Z86 AP-D3 Rev. 1 (F3 Bios) with Samsung EVO SSD... 
      I Installed High Sierra 10.13.6, I use ##### to activate boot... everything is fine..
      but sometime my system Freeze..... and sometimes screen freeze but mouse worked
      means system is running.. mouse is also moving.. but Screen got freeze...
      please help me to resolve.. I really frustrated now. I install many times...
      but same problem... There is no graphic card in my system...
       
      please help me.. I am attaching my clover folder.. please help
      CLOVER.zip
    • By surfermax
      buon giorno 
      spero tu mi possa aiutare ,perche' non riesco piu' a far partire i miei 2 ssd 850 samsung sui quali highsierra funzionava perfettamente da 1 anno e non ce' maniera di farlo ripartire .unica cosa e' che riesco ad arrivare alla console dell'istaller e ho tentato varie volte di ripristinare da una time machine che ho salvato su un altro disco usb .
      il mio sistema e' un asus p5qd turbo ed e7500 dual core . grafica gtx1050 chr funzionava con accelerazione e webdriver nvidia .audio voodoo 282. e boot clover che e' sempre stato il 5103 che poi  ho aggiornato a 5120 proprio il giorno prima che succedesse il fattaccio .quel giorno ho aggiornato dal sito apple la comboupdate 10.13 .6 da 10.13.4 .e qui al riavvio boom niente diski in clover nn li visualizzava piu .ora sciacciando f3 visualizzo il preboot e lssd con highsierra aggiornato ma arrivato alla console andava in reset loop .
      a questo punto riesco a ripartire togliendo l'accelerazione .e installando i nuovi webdriver di nvidia aggiornati all 10.13.6 .
      al riavvio non parte piu' con accelerazione e sempre problema in clover dei diski ma riuscivo a partire con f3 e preboot .
      ora decido di installare da time machine e tornare alla versione 10.13.4 del giorno prima ..e al riavvio niente piu dischi ne preboot .sono fermo a questo punto ..riesco solo a far partire installer ma nn so i comandi da dare in terminal per aggiustare le cose . ho anche linux su un altro notebook. ti ringrazio anticipatamente per l'aiuto .
×