- Feb 13, 2012
- Gigabyte Z490i Aorus Ultra - OC 0.6.8
- GT710 - 1920x1080
- Classic Mac
- Mobile Phone
Computer science is really a vast subject...
As for drives, you must distinguish between mechanical defects (typically bad blocks — of which TestDisk can do nothing about, AFAIK) and logical/structure issues. While TestDisk, TechTool, DiskWarrior and the likes deal with HFS structure, (B-Trees and so on), only reformatting the drive puts physical bad blocks aside for not using them.
I had a few dead HDDs, even in real Macs, it can happen even after a few days of existence, but usually it either happens very soon or very late... Anyway, if you begin to have bad blocks, and the number of them increases in the next days/weeks, it's time to replace the drive before it's too late.
Run some SMART utility from time to time to check your drives.
(that's were filesystem is important: ZFS and APFS have some form of security, duplicating files before actually copying it, checking data integrity, etc. that HFS+ has not)
As for learning the guts of MacOS, you first need to understand its structure, it's not that complicated once you get it, and I'm sure you already know the basics.
To summarize a few things:
1) you have more or less the same folders at System level (System/Library...) which are used for the overall working order, then in /Library which apply to every user once they log in, then ~/Library which loads for that specific user only
2) in any of those /Library folders, there are LaunchAgents and LaunchDaemons folders that contain any kind of processes — you can create your own for mounting a disk image at login, launch a particular app when a particular event happens, set variables for an app, change your monitor calibration, etc. It's really powerful!
3) the captain of your OS is launchd, a daemon that runs constantly and is in charge of loading quite anything: https://en.wikipedia.org/wiki/Launchd
You can ask him not to load useless or faulty processes, or only load a kext when you need it, etc.
There's a lot more to say and it would need a big tutorial that exceeds the scope of this discussion (every folder has a role, and I don't know them all... ), but once you understand those basics, you understand better what we do with our hackintoshes with kexts, etc. and maybe feel that you can optimize things a bit by getting your hands in those muddy folders.
How recent MacOS optimizations for SSD and multicore CPU work, I have no idea, but it's plain to see when you compare things. I think it's a bit expensive to change my i3 for a 300$ i7, though, just for the sake of installing the latest OS or having a snappier Finder... Especially for an old build like mine where the mobo could die even before the new CPU is delivered...
Hence my optimizing as much as possible what I have.
Very useful my friend. Thankyou . Having read the Launchd reference I find it fascinating. The nearest I get to the deep, dark heart of macOS is probably Terminal and the Linux command-line reference book which I often use to explore .
Sadly here in the UK an i7 is just too expensive for me. The quad-core i3 I have now is a superb CPU but probably uses the same power as an i7-8700 with 6-cores. Buying an older one as @trs96 suggests seems a good, cost-effective, way to go.