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

  • Recently Browsing   0 members

    No registered users viewing this page.

  • Similar Content

    • By midi-sama
      After a long time of cooking this computer up with a lot of stuff, I'm finally releasing my guide for this P50 with OpenCore.
       
      Lenovo ThinkPad P50 macOS Install with OpenCore
       
      This thread may be used for questions/corrections/additions. Good Luck.
    • 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
×