Jump to content
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

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

  • Similar Content

    • By RyzenDude
      Hi everyone,
      Today I finished my High Sierra install with OpenCore. I got everything up and running but I can't seem te get rid of this text on te boot screen while booting up. Does anyone have a solution to this?
      Thanks in advance!
      Hardware:
      CPU: Ryzen 5 1600
      GPU: GTX 980
      RAM: 16 GB DDR4 2666 MHz
      Motherboard: ASUS EX-A320M-GAMING
      Audio Codec: AppleALC
      Ethernet Card: Realtek RTL8111
      Bootloader: OpenCore 0.5.5

    • By NoEnd
      Hi team,
       
      I'm looking for the best route to achieve this upgrade, so I have been stuck with HS since Nvidia drivers stopped being supported on newer MacOS releases. Now I'm having an AMD 5700 xt on the way and want to plan the upgrade properly. I have added some information below and questions that might help with your recommendation.
       
      Current GPU 1080 ti with Nvidia webdrivers installed. So should I uninstall the webdriver before adding the new GPU? Clover is being used and EFI attached. Any kext must be removed? or parameters adjusted MacOS HS 10.13.6, should I upgrade before using the new GPU? CPU: 9900K Motherboard:ROG MAXIMUS XI HERO (WI-FI) Dual Monitors I have a Time machine backup, Do you recommend a fresh install? and If I did, will I be able to restore my data/apps as-is?  
      Please let yourself free to explore further aspects to considers.
      EFI-20200204.zip
    • By Tushark2
      Hello,
      1st my laptop spec. 
      CPU - 2.53 GHz Intel Core i3 380m
      RAM - 6 GB 1333 MHz DDR3
      GPU -  1st gen Intel HD Graphics 288 MB
      Laptop - Dell Vostro 3500 series
      BT/WIFI - AzureWave BCM94352HMB
       
      I installed Olarila Mojave 10.14.6 and managed to install 1st gen intel HD graphics but it was bit laggy bcos this gnu doest support metal and its a old machine, so I decided to move to Olarila High Sierra.
      I installed it with most of things working fine expect some issues, for that I want to make SSDT and DSDT to make it run without glitches.
       
      I am atteching my sendme.zip , can some take a look to my current settings and suggest me some changes  
      (Olarila down from few days for me )
       
      Send me MacBook-Pro.zip
    • By kushwavez
      Hi!

      Could anyone help me installing High Sierra on this system?
      I succesfully installed Sierra before on this system with help of Jake Lo (thanks!!), I just wondering if could High sierra possible to installed on this system?
      Boot stopped at this. I'll attach my Clover folder and a picture from boot.
      UEFI enabled, and for skylake I used IntelGraphicsDVMTfixup and IntelGraphicsFixup kexts. My bios is very limited and does not have any option to change dvmt prealloc or anything else.
      Everything works fine on Sierra.
      Here is my system:
       
      THIS TOPIC IS OUTDATED AND WILL NO LONGER UPDATED.
      PLEASE GO TO THIS LINK FOR GUIDE & UPDATED FILES:
      https://osxlatitude.com/forums/topic/11355-acer-aspire-v-15-v5-591g-catalina-windows-10/
       


      Acer Aspire V15 V5-591G-55TU
       
      (Note: Bootpack works fine with another versions of 591G, for example: V5-591G-71K2, -764Z, -59PU, etc.)

      Mobo: Skylake USOPP_SLS
      Bios: Insyde corp latest version
      CPU: Intel Core i5-6300HQ 2.30 GHz (Skylake)
      GPU: Geforce GTX 950M 2 GB (optimus, disabled), Intel HD 530
      Ram: 8 GB DDR4 (4+4 GB)
      Wifi: Qualcomm Atheros QCNFA344A, Replaced to BCM94352Z
      Ethernet: Realtek 8168B/8111B
      Audio: ALC 255 (layout-3 fix)
      Card Reader: Realtek
      HDD: 1 TB
      Dual-boot with Windows 10

      Any help appreciated!

      UPDATE! (2017.10.30)
      UPDATE! (2017.11.09)
      UPDATE! (2018.02.01)

      Successfully installed High Sierra 10.13, 10.13.1, 10.13.3
      SEE THIS POST: #49 IF YOU THINK YOUR CPU IS HOT (60+°C) OR NOT GOING UNDER 1.3GHz FREQUENCY WHEN IDLE
      (Original OSXLatitude post link: https://osxlatitude.com/forums/topic/11355-acer-aspire-v-15-v5-591g-catalina-windows-10/)
      Working:
      Wi-Fi and Bluetooth with BCM94352z: (enabled with BrcmFirmwareRepo.kext, BrcmPatchRAM2, FakePCIID.kext, FakePCIID_Broadcom_WiFi.kext, install them with Kext Utility or another kext installer) (Original WiFi is Qualcomm Atheros, unsupported but BT works) Hand-off with BCM94352z Full Graphics enabled on HD 530, HDMI, VGA. ALC 255 Audio: (Internal Speakers, Internal Microphone, Headphone jack (microphone not tested) with layout-3 fix (you can use AppleHDAPatcher) Ethernet Realtek 8168B/8111B App Store, Messages, FaceTime, Siri, iCloud (native) Integrated webcam (native) 3.0 USB (native) Touchpad and Keyboard: Fn keys are good, the weird thing is the Brightness key. On my keyboard it's Pause Break:Br-up, Fn+F12:Br-dwn. (VoodoPS2Controller.kext) Battery info: Install ACPIBatteryManager.kext with kext utility or other installer. Sleep Mode: In High Sierra sleep mode not worked for me natively. Inject custom EDID to fix the blank screen after wake from sleep
      See here for instruction (thanks black.dragon74 and Jake Lo !!) Please add these 2 patches to ACPI\DSDT\Patches in your config.plist in order to avoid not responding applications after sleep: (added in "v5_591g_55tu_updated_CLOVER.zip") HECI to IMEI 48454349 494d4549 EC0 to EC 4543305f 45435f5f Before updating to a new version of High Sierra please update kexts to new versions to avoid kernel panics Note: No need for "IntelGraphicsDVMTFixup.kext" so you should delete it. Not working:
      Original Wi-Fi: Qualcomm Atheros QCNFA344A unsupported, you need switch to BCM94352Z or just use a mini usb wifi dongle. NVIDIA GTX 950M: Optimus not supported. Card Reader: Unsupported For WiFi:
      You can choose an external USB wifi dongle (I used tp-link Archer T1U (5GHz support), Tp-link have official macOS drivers, you just need to install it (OR)Replace your M.2 Qualcomm Card with a compatible BCM94352Z card (you will have hand-off Bluetooth too), just install the kext I wrote above I'll attach my EFI folder for anyone who want to install High Sierra (acer_aspire_v5_591g_55tu_hs.zip).
      *REUPLOADED updated CLOVER folder, attached as "v5_591g_55tu_updated_CLOVER.zip" (uploaded to OSXLatitude forum, can't upload here).
       
      I'm using High Sierra in Dual-boot with Windows 8.1. To do this in a clean install or with Windows installed first try my little minimal guide:
       
      Dual-boot clean install (on one drive):
      1. Boot into your Mac installer, Create 2 partitions in GUID table (1 for Win (I used FAT32 but I think it's no matter what), 1 for Mac), 
      2. Install Mac, boot with your USB, *mount your EFI partition (use terminal or an EFI mounter app), create an EFI folder, copy the CLOVER folder I attached to the EFI folder, restart,
      3. Boot into your Win installer, Format the partition you created for Win, install. 
      4. Now, it's automatically booting into Windows. To use Clover open cmd in administrator, type:
      bcdedit /set {bootmgr} path \EFI\CLOVER\CLOVERX64.efi 5. You're done! It will booting into Clover when you start the system, and you can select Win or Mac (or another OS if installed on a 3rd partition).
       
      Dual-boot with Windows installed first (on one drive):
      If you already have Windows and you don't want to lose all your data there is a hope:
      You need bootable Mac Installer and a full system restore image (you can search for it).
      (You may see errors if your EFI partition is not 200 MB)
      1. Boot into your Windows, resize your partition or create one for Mac.
      2. Boot into your Mac installer and in Disk Utility format the partition you created.
      3. Restore from image: select your full system restore image.
      4. When it's finished restoring you just need to restart, then boot to the system with your usb.
      5. Do Step 2. from "*" from clean install dual-boot above. but KEEP "Microsoft" FOLDER IN IT!
      6. Do Step 4. from clean install dual-boot above.
      7. You're done! You can select your old Windows and your new macOS!
      (I only tried with Windows 8/8.1/10. I don't know Windows 7,etc.)
       
      IF YOU GETTING ERRORS DURING MAC RESTORE:
      Make sure you have partitions in GPT The best version for restore method is Windows 8.1. It's using 200 MB EFI. Windows 10 using 100 MB EFI and will annoy the Mac restore. You can use with Windows 10, just ignore the errors IF YOU GETTING ERRORS DURING WINDOWS INSTALLATION (could not be formatted, etc):
      Make sure you have GPT partitions, and GPT installer IF YOU USED RESTORE METHOD THEN CAN'T MOUNT YOUR EFI PARTITION (No EFI partition found)
      It's because your EFI is not 200 MB or not an "Apple" original EFI,  but do not worry, try another EFI mounter, or mount from terminal (I used EFI mounter v3: Getting errors, but you can mount and use without problem) You also could "mount" the EFI from windows, for that open cmd and type: diskpart list vol (Now select the "System" volume,(FAT 32) For example I select 4) sel vol 4 list part (Select System type partition, for example 2) sel part 2 assign letter=b (This will "mount" your EFI partition, to manage files download totalcmd or explorer++ (run as admin)) remove letter=b (This will "unmount" your EFI) Here is a video from dual-boot with Windows installed first (on one drive):
      https://www.youtube.com/watch?v=0_Q8uPkwcWQ
      Here some pictures:




×