Contribute
Register

Extremely slow 6-7 minute boot time with Monterey 12.0.1

As I understand the problem, the Samsung controller appears to have problems performing TRIM on the APFS formatted NVMe drives, and the delay got worse in Monterey.

This still fascinates me ...

If this is correct - and I have no knowledge to the contrary - then all macOSs back to High Sierra should be affected by the 'bug' because that is when APFS was introduced. As it is today, the problem only seems to be affecting Monterey.

Also firmware Trim should be OS agnostic.

I would like to know more about this issue. It seems to me Monterey must have some new code which is conflicting somewhere, maybe security etc.
 
This still fascinates me ...

If this is correct - and I have no knowledge to the contrary - then all macOSs back to High Sierra should be affected by the 'bug' because that is when APFS was introduced. As it is today, the problem only seems to be affecting Monterey.

Also firmware Trim should be OS agnostic.

I would like to know more about this issue. It seems to me Monterey must have some new code which is conflicting somewhere, maybe security etc.
As I understand it, there have been several versions of APFS since the days of High Sierra. I suppose its possible the that TRIM issue could be APFS version specific.
 
Last edited by a moderator:
@BusterMachine - make sure you give credit to whom credit is due! The mighty @macntosh has been on top of this situation from the beginning, and I think I'm just parroting what he and others have deduced from this whole debacle.

As for a different brand, well that's up in the air. At one point, the Samsung EVO NVMe's were the premium brand. I can attest that the Western Digital SN750 Gen3 series seems to be rock solid so far, and boots Monterey quickly.

@UtterDisbelief - what is a fascinating problem for some is a headache for another! TBH, I haven't put much thought into it other than chalking it up to another case of trying to make a component work when it's not supposed to work. I'm more fascinated on how the Hackintosh community has been able to make a continuously evolving and disparate landscape of PC components actually run the MacOS. The Radeon 6900XT XTXH, AMD Ryzen chips, and now the Alder Lake chips. Really cool stuff. I hope the wizards are able to figure out something after Apple fully transitions to the AppleSi.
 
Last edited by a moderator:
@BusterMachine - make sure you give credit to whom credit is due! The mighty @macntosh has been on top of this situation from the beginning, and I think I'm just parroting what he and others have deduced from this whole debacle.

As for a different brand, well that's up in the air. At one point, the Samsung EVO NVMe's were the premium brand. I can attest that the Western Digital SN750 Gen3 series seems to be rock solid so far, and boots Monterey quickly.

@UtterDisbelief - what is a fascinating problem for some is a headache for another! TBH, I haven't put much thought into it other than chalking it up to another case of trying to make a component work when it's not supposed to work. I'm more fascinated on how the Hackintosh community has been able to make a continuously evolving and disparate landscape of PC components actually run the MacOS. The Radeon 6900XT XTXH, AMD Ryzen chips, and now the Alder Lake chips. Really cool stuff. I hope the wizards are able to figure out something after Apple fully transitions to the AppleSi.

These problems are part of the reason I rarely touch components that haven't been used and tested previously. Not being smug or anything, just watching my wallet! :lol:

The exception to this was when I took on the challenge of building an ASRock B560 ITX system. My colleagues will attest to the problems I worked through behind the scenes to get all macOSs back to High Sierra working. It wasn't a labour of love, it was a chore.

Finally it is something I don't recommend anyone else tries. Gigabyte or Asus all the way!

:)
 
The exception to this was when I took on the challenge of building an ASRock B560 ITX system. My colleagues will attest to the problems I worked through behind the scenes to get all macOSs back to High Sierra working. It wasn't a labour of love, it was a chore.


:)
but it was a good read though! :)
 
This still fascinates me ...

If this is correct - and I have no knowledge to the contrary - then all macOSs back to High Sierra should be affected by the 'bug' because that is when APFS was introduced. As it is today, the problem only seems to be affecting Monterey.

Also firmware Trim should be OS agnostic.

I would like to know more about this issue. It seems to me Monterey must have some new code which is conflicting somewhere, maybe security etc.

If Trim delays were moved from startup to shutdown, would it be more or less annoying.

The application of Trim is OS specific. It's a common approach on Linux servers to not allow Trim on unlink (delete) and run a Trim pass via cron at scheduled times. Trim is a form of write which has -interesting- properties.

It's also architecturally incredibly stupid as it takes internal mgmt details of the storage device and exposes them as a chore for SW at the wrong level of abstraction and where you prefer the OS has no knowledge of the device feature because it should be hidden by a black-box.

The Trim spec as originally conceived is absurdly incomplete and simplistic. Drive makers are free to do anything they want with Trim commands including ignore them, blow up the command queue (which didn't exist in ATA at the time Trim was introduced) or generally bog down I/O. And drive makers are known to just botch Trim.

What needs to be understood about Trim is that it's a Microsoft invention in the worst sense, where some storage ninnies decided to deal with a point-in-time workaround to limited logic in early SSDs by ratifying a standard ATA command to let the OS "help" manage inner workings of a storage device. If you are Microsoft you want your stupid OS in there gumming things up as much as possible because it's a profit center. Here is where we can find a direct analogy to Winmodem, which was Intel's snazzily stupid idea of putting old Hayes-style mod/demod for data over voice lines (remember AOL YOU'VE GOT MAIL) in the CPU because it used an expensive CPU that you can't live without to save a few dollars of system build cost on dedicated mux chips. Another hellish design history that relates to the dungeon of Trim is old CHS block addressing of disks, where the OS driver was expected to know and manage the platter/head geometry of the drive. If you were to suggest today that what storage devices need is CHS addressing to improve this lame LBA setup so the OS can get more involved in sector allocation, well that's how Trim is to SSD garbage collection.

It's a fact of history that Microsoft didn't think through any of the long-term problems with the Trim approach and their general ignorance combined with weak early SSD designs to make customers start to demand the feature, partly because they know even less about viable systems architecture trends than Microsoft — and who doesn't worry a lot about their precious drives getting all used up and everything!

For Mac this hit an apex with 'informed' users griping openly that Apple was short changing them by not enabling "TRIM SUPPORT" on 3rd party drives, when actually Apple was just making sure that 3rd party drives don't throw away your data.

The big picture is that Trim does add some value because history conspired to provide Trim, but history is stupid too.

Here's another way to think about what Trim does that doesnt require a special write command I OFFER THIS FREELY TO THE INDUSTRY: If you allow controller logic to get arbitrarily complex, which it now can be, and you look at the problem Trim is designed to solve which is pre-allocating writes by getting the OS to tell you that it plans to rewrite-some-blocks-in-some-arbitrarily-distant-future-so-why-not-waste-time-now-setting-up-the-flash-pages-for them, you should quickly realize that the OS is already telling the drive what it plans to write in the future by issuing... WRITES! As all drives start empty, incoming normal writes tell the controller everything it needs to know about free flash: if flash pages are under a write request, they're free to be cleaned. So the drive can just note the extents that the OS has requested, map some factory-fresh clean pages to the addresses space that's been requested, and add the pages that were under the write request to the GC queue to clean up when not otherwise busy. All that's needed is something like a flash pagetable that works pretty much like OS virtual memory, with some buffering and vendor juju and secret sauce for market workloads. I bet the controller designers have already figured this out! Or have they?

As to what Trim actually does today, and how the OS interacts with it is all juju with some general trends which allow a carefully crafted storage subsystem with some knowledge of device specific details to overcome some point-in-time workload issues IFF the storage system designer is totally aware of what a specific device does and the specific device actually does what the OS thinks it does... What about this arrangement is not agreeable to a hackintosh style of system build?! Omg so here we are with some edge cases that are making users with zero pull cranky because their cobbled-together systems are hodge-podges of parts that nobody owes architectural fidelity for an application the industry doesn't want! What part of this is mysterious?

Any way, yes please add new entries to the lists of known-to-not-yet-break-and-destroy-all-your-data drives.

Carry on
 
If Trim delays were moved from startup to shutdown, would it be more or less annoying.

The application of Trim is OS specific. It's a common approach on Linux servers to not allow Trim on unlink (delete) and run a Trim pass via cron at scheduled times. Trim is a form of write which has -interesting- properties.

It's also architecturally incredibly stupid as it takes internal mgmt details of the storage device and exposes them as a chore for SW at the wrong level of abstraction and where you prefer the OS has no knowledge of the device feature because it should be hidden by a black-box.

The Trim spec as originally conceived is absurdly incomplete and simplistic. Drive makers are free to do anything they want with Trim commands including ignore them, blow up the command queue (which didn't exist in ATA at the time Trim was introduced) or generally bog down I/O. And drive makers are known to just botch Trim.

What needs to be understood about Trim is that it's a Microsoft invention in the worst sense, where some storage ninnies decided to deal with a point-in-time workaround to limited logic in early SSDs by ratifying a standard ATA command to let the OS "help" manage inner workings of a storage device. If you are Microsoft you want your stupid OS in there gumming things up as much as possible because it's a profit center. Here is where we can find a direct analogy to Winmodem, which was Intel's snazzily stupid idea of putting old Hayes-style mod/demod for data over voice lines (remember AOL YOU'VE GOT MAIL) in the CPU because it used an expensive CPU that you can't live without to save a few dollars of system build cost on dedicated mux chips. Another hellish design history that relates to the dungeon of Trim is old CHS block addressing of disks, where the OS driver was expected to know and manage the platter/head geometry of the drive. If you were to suggest today that what storage devices need is CHS addressing to improve this lame LBA setup so the OS can get more involved in sector allocation, well that's how Trim is to SSD garbage collection.

It's a fact of history that Microsoft didn't think through any of the long-term problems with the Trim approach and their general ignorance combined with weak early SSD designs to make customers start to demand the feature, partly because they know even less about viable systems architecture trends than Microsoft — and who doesn't worry a lot about their precious drives getting all used up and everything!

For Mac this hit an apex with 'informed' users griping openly that Apple was short changing them by not enabling "TRIM SUPPORT" on 3rd party drives, when actually Apple was just making sure that 3rd party drives don't throw away your data.

The big picture is that Trim does add some value because history conspired to provide Trim, but history is stupid too.

Here's another way to think about what Trim does that doesnt require a special write command I OFFER THIS FREELY TO THE INDUSTRY: If you allow controller logic to get arbitrarily complex, which it now can be, and you look at the problem Trim is designed to solve which is pre-allocating writes by getting the OS to tell you that it plans to rewrite-some-blocks-in-some-arbitrarily-distant-future-so-why-not-waste-time-now-setting-up-the-flash-pages-for them, you should quickly realize that the OS is already telling the drive what it plans to write in the future by issuing... WRITES! As all drives start empty, incoming normal writes tell the controller everything it needs to know about free flash: if flash pages are under a write request, they're free to be cleaned. So the drive can just note the extents that the OS has requested, map some factory-fresh clean pages to the addresses space that's been requested, and add the pages that were under the write request to the GC queue to clean up when not otherwise busy. All that's needed is something like a flash pagetable that works pretty much like OS virtual memory, with some buffering and vendor juju and secret sauce for market workloads. I bet the controller designers have already figured this out! Or have they?

As to what Trim actually does today, and how the OS interacts with it is all juju with some general trends which allow a carefully crafted storage subsystem with some knowledge of device specific details to overcome some point-in-time workload issues IFF the storage system designer is totally aware of what a specific device does and the specific device actually does what the OS thinks it does... What about this arrangement is not agreeable to a hackintosh style of system build?! Omg so here we are with some edge cases that are making users with zero pull cranky because their cobbled-together systems are hodge-podges of parts that nobody owes architectural fidelity for an application the industry doesn't want! What part of this is mysterious?

Any way, yes please add new entries to the lists of known-to-not-yet-break-and-destroy-all-your-data drives.

Carry on

Excellent! Thank you for a great read (maybe I'm a bit geeky at times.)

Two points I note:

1) I didn't know Trim existed for conventional HDDs. I'd really only considered various defragmentation techniques.

2) Given the "quantum" nature of the concept of Trim - your description seems to indicate it depends on whether it's observed or not! - perhaps Apple has only bothered to optimise it for the limited SSDs it uses? Why cater for third parties it doesn't support?

Something else I wondered idly is, might Apple buy in SSD chips and controllers that have no firmware Trim of their own, leaving that to their own code?

But then I thought, why re-invent the wheel?

:)
 
Well I now have a my Hack running on a WD2tb M2 drive. It boots fast and now I also have a 2Tb Samsung "Scratch Drive" I tried to use CCC but didn't work.

1. Installed new M2 drive (There was a second slot available on my Z390.) Then downloaded Monterey and installed it on the WD drive.
2. Before rebooting to finish install, I mounted both EFI's and copied the existing contents to the new drive.
3. COntinued install and watched...
4. Transferred over everything from the Samsung through the installer
5. Rebooted and all just like normal "new mac"
6. Kicked back with an carbonated beverage.

Boot Time: 16 seconds after OpenCore pics the drive

Thanks to all and the @CaseySJ for his assistance.

Jules
 
Last edited:
These problems are part of the reason I rarely touch components that haven't been used and tested previously. Not being smug or anything, just watching my wallet! :lol:

The exception to this was when I took on the challenge of building an ASRock B560 ITX system. My colleagues will attest to the problems I worked through behind the scenes to get all macOSs back to High Sierra working. It wasn't a labour of love, it was a chore.

Finally it is something I don't recommend anyone else tries. Gigabyte or Asus all the way!

:)
I shudder at the thought of the amount of patching that must have been involved.
 
Last edited by a moderator:
Back
Top