5 ms·
I understand that part of the "magic" behind the M1 is how it has some cores that are "performance" cores and other cores that are highly efficient "low power"
by 2bitencryption 5y ago
I understand that part of the "magic" behind the M1 is how it has some cores that are "performance" cores and other cores that are highly efficient "low power" cores.
My question is, how much of the sublime performance of M1 Macs comes from MacOS being fine-tuned to take advantage of these two different type of cores?
If you simply get the bare minimum of NetBSD booting on an M1, will it not achieve nearly the same performance unless the OS is fine-tuned to schedule properly across the "performance" cores and the "efficient low power" cores?
I remember reading a recent article [0] about how future Intel chips plan to have similar "perf" and "low power" cores, and part of the presentation included someone from Microsoft saying they spent lots of time on the Windows team making sure Windows could schedule across these properly. So I wonder how much work it really takes.
[0] https://www.pcworld.com/article/3629502/intels-alder-lake-what-you-need-to-know.html https://www.pcworld.com/article/3629502/intels-alder-lake-wh...
- gjsman-1000 5y agoIf that is the case though, I wouldn't be surprised if newer Linux and BSD releases gain additional support for per-core-type performance scheduling and optimizations therein. It's not entirely new - Remember pretty much all ARM processors that aren't MCUs have big.LITTLE, but there is no doubt additional work to be done in the area.
- mhh__ 5y agoAnd Intel are going with it now also.
- heavyset_go 5y agoARM big.LITTLE[1] SoCs have been a thing for about a decade now, and most operating systems have schedulers that take advantage of each set of cores. macOS isn't doing anything special that Linux et al. aren't doing. [1] https://en.wikipedia.org/wiki/ARM_big.LITTLE https://en.wikipedia.org/wiki/ARM_big.LITTLE
- kbenson 5y ago> macOS isn't doing anything special that Linux et al. aren't doing. MacOS isn't doing anything Linux and others aren't doing, or MacOS isn't doing anything those others can't do? That is, do we actually know how well tuned MacOS is for these cores and their capabilities, or is that an assumption? I thought I had read there were some specific instructions in the chip that were either new to it or were more aggressively used by MacOS to get additional energy savings or performance gains.
- hedgehog 5y agoI don't know of anything really magical but for years Apple has been steadily pushing apps towards APIs that give the OS a lot of latitude to manage energy [1]. Grand Central Dispatch, AVFoundation, etc. Then on iOS BackgroundTasks etc (and iPhones have had little cores for quite a while now). I would imagine a lot of that experience transfers to macOS. The centralized + draconian approach they take has a lot of problems but does help sweeping changes like this. 1. https://developer.apple.com/library/archive/documentation/Performance/Conceptual/power_efficiency_guidelines_osx/index.html https://developer.apple.com/library/archive/documentation/Pe...
- fomine3 5y agomacOS do some clever scheduling, but I don't know is it improves performance, Maybe mainly improves power efficiency at user idle. https://news.ycombinator.com/item?id=27182244 https://news.ycombinator.com/item?id=27182244
- imwillofficial 5y ago> macOS isn't doing anything special that Linux et al. aren't doing. And you base this comment on, what exactly?
- heavyset_go 5y agoCare to share what special things macOS is doing? Because according to Apple's documentation, it doesn't seem like they're doing anything special when it comes to heterogeneous multiprocessing and scheduling that Linux hasn't been doing for quite some time.
- vbezhenar 5y agomacOS/iOS have API for marking jobs as background which will run on slow cores. And this API is used, AFAIK. I'm not sure if widely used Windows or Linux software routinely marks its threads for background jobs. I know that I never did that in my software.
- ing3ng 5y agoWell you could determine that from the priority of the process couldn't you?
- heavyset_go 5y agoOn both macOS and Linux, process scheduling goes further than just niceness. On macOS in particular, it has a concept of process priorities[1] and I/O policies, and the OS itself defines special priorities and policies for background processes. [1] https://www.manpagez.com/man/2/setpriority/ https://www.manpagez.com/man/2/setpriority/
- wmf 5y agohow much of the sublime performance of M1 Macs comes from MacOS being fine-tuned to take advantage of these two different type of cores? Basically none. The performance comes from the big cores. Linux/BSD can guarantee good performance in the short term by disabling the little cores.
- ggm 5y agoThis answer seems optimistic. Unless you have a single execution state cpu bound, which has no parallelism, and no other tasks exist needing runtime, having more cores, even little ones, seems like a win. Even just pedestrian clock processing for interrupts could exploit the other cores. Or keyboard and mouse processing, whatever. Playing an mp3 while you compile? That other core sure would stop context switching in the compiler...
- FullyFunctional 5y agoMy Ubuntu VM on my Mac Mini gets outstanding performance which validates the point that macOS isn't essential for the performance. I'm sure however that macOS is very helpful in ensuring the power efficiency on laptops.
- nextos 5y agoSame here. For many years, a MacBook Air 11 was my daily driver. After some time, I wiped up Mac OS X and I ran a minimal Linux configuration: XMonad, Emacs, Firefox and XTerm. With a few tweaks, mostly those suggested by powertop, my battery range was indistinguishable from Mac OS. Which is impressive, given that Safari is known to be very optimized towards low energy usage. I guess I compensated that with a simpler graphics stack that generated less CPU wakeups.
- wwweston 5y agoI’m with you up through XMonad, Emacs, and XTerm but... Firefox? Right now I’m currently struggling with an attempt to use a circa 2015 Dell XPS 13 as a Linux-based daily driver, and Firefox is nigh unusable with even only a few tabs, 4GB of RAM apparently doesn’t go far enough, swap degrades performance even with SSD but turning it off just means stuff dies. I’d love to find out I just set things up wrong but I’m shocked to discover I was getting better performance out of Windows.
- webmobdev 5y agoApple system developers definitely deserve a lot of credit for optimising ios / macOS Big Sur for its ARM hardware platform. If we could run another OS on it, it would be evident that part of the performance boost of Apple's M1 ARM processor is definitely due to the optimised software it runs.
- cpleppert 5y agoI used an intel macbook pro with an older version of Mac Os that had lots of background processes and features disabled just to get the performance I wanted. My M1 Air was noticeably faster even with spotlight indexing and a massive build inside a virtual machine out of the box.
- webmobdev 5y agoThe system software (OS) is highly optimised for M1 and thus greatly adds to its performance. Note that Apple has been developing ios / iPad OS on ARM platform for many years now.
- 1vuio0pswjnm7 5y agoWonder if the manual scheduler control utility will work on the M1. https://man.netbsd.org/schedctl.8 https://man.netbsd.org/schedctl.8