Live data from Hacker News

M1 Pro First Impressions: Core Management and CPU Performance

eclecticlight.co

11–20 of 234 posts

Re: M1 Pro First Impressions: Core Management and CPU Performance

#11
I am curious, since Intel is relying more and more on P and E cores as well, is there any reference or research available for optimizing multithreaded userland process tasks with varying QoS?

A lot of the pthreads books I see are from the late 90s. Is there a more recent reference? What's the best way to write cross-platform (e.g. not Grand Central Dispatch) multithreaded apps with these new chip architectures?

Re: M1 Pro First Impressions: Core Management and CPU Performance

#12
Mine just arrived today and I'm blown away.

After upgrading our app's dependency chain to run native arm64 builds (which took a bit of googling) webpack's incremental build time on our app is down to 116ms from 983ms on my 2016 Macbook Pro. Over 8x faster.

Our Tensorflow.js (webgl) models that previously ran about 8fps in the browser are now running at the camera's native 30fps framerate. (Similar to my desktop 2080ti.)

Re: M1 Pro First Impressions: Core Management and CPU Performance

#13

Earlier quoted context omitted.

Like sibling comment says, it’s more efficient. It allows those cores to sort of pretend they’re ECs. It also reserves those PCs for bursty workloads which would otherwise be contentious for cache and memory bandwidth in an evenly balanced scheduler.

Is it basically giving programs some automatic core affinity or are the unused cores meant to be unused until the first set are saturated? I guess also, are the 4 unused cores always the same?

My guess is it’s treating the “extra” cores as a throttling mechanism without throttling. If your thermal budget is 9 (8 + 2*1/2), and you operate normally with a thermal budget of ~5, you can temporarily go to 9 without any noticeable difference in actual performance, or heat, or cooling. In another sense, they’re probably leaving a lot of performance potential on the table to achieve that perception.

As far as which cores are demoted… I definitely don’t know enough to speculate. If favoring the same set would affect longevity of the device, they’d rotate. If not it’s simpler not to do that. I have no idea which is more likely.

Re: M1 Pro First Impressions: Core Management and CPU Performance

#14

I am curious, since Intel is relying more and more on P and E cores as well, is there any reference or research available for optimizing multithreaded userland process tasks with varying QoS? A lot of the pthreads books I see are from the late 90s. Is there a more recent reference? What's the best way to write cross-platform (e.g. not Grand Central Dispatch) multithreaded apps with these new chip architectures?

I think people are just now starting that research and blog posts like this one are all we have so far.

Re: M1 Pro First Impressions: Core Management and CPU Performance

#15
In my usage, which is game development with Unity, I haven't really been particularly impressed with the performance improvements on my 10-core M1 Pro machine. I'm sure most of the blame is due to Unity (the app is a buggy mess), but it definitely took the initial "wow this is magic" down to reality very quickly for me.

Re: M1 Pro First Impressions: Core Management and CPU Performance

#16
post #14

I am curious, since Intel is relying more and more on P and E cores as well, is there any reference or research available for optimizing multithreaded userland process tasks with varying QoS? A lot of the pthreads books I see are from the late 90s. Is there a more recent reference? What's the best way to write cross-platform (e.g. not Grand Central Dispatch) multithreaded apps with these new chip architectures?

I think people are just now starting that research and blog posts like this one are all we have so far.

Asymmetric multiprocessing has been a big topic of research for many, many years.

https://scholar.google.com/scholar?hl=en&as_sdt=0%2C33&q=asy...

Re: M1 Pro First Impressions: Core Management and CPU Performance

#17

I am curious, since Intel is relying more and more on P and E cores as well, is there any reference or research available for optimizing multithreaded userland process tasks with varying QoS? A lot of the pthreads books I see are from the late 90s. Is there a more recent reference? What's the best way to write cross-platform (e.g. not Grand Central Dispatch) multithreaded apps with these new chip architectures?

My understanding is as long as you specify the QoS currently, GCD takes care of it (as it has done for Apple Ax SoCs on iPhone).

Re: M1 Pro First Impressions: Core Management and CPU Performance

#19

I am curious, since Intel is relying more and more on P and E cores as well, is there any reference or research available for optimizing multithreaded userland process tasks with varying QoS? A lot of the pthreads books I see are from the late 90s. Is there a more recent reference? What's the best way to write cross-platform (e.g. not Grand Central Dispatch) multithreaded apps with these new chip architectures?

For Linux, I believe it will dispatch based on the niceness level and overall CPU utilization - past a certain threshold, it will start putting work at default or higher priority onto the performance cores.

For the Mac, I believe you have equivalent access for scheduling between posix and GCD, but the scheduling configuration is likely way more approachable in GCD.

Also: On M1, there is an added capability to run in a stricter memory model to speed up x86_64 emulation. This only is available on the performance cores, which is one of the reasons people observe non-native code draining the battery quicker.

Re: M1 Pro First Impressions: Core Management and CPU Performance

#20
post #15

In my usage, which is game development with Unity, I haven't really been particularly impressed with the performance improvements on my 10-core M1 Pro machine. I'm sure most of the blame is due to Unity (the app is a buggy mess), but it definitely took the initial "wow this is magic" down to reality very quickly for me.

Unity is slow on any machine.

With that said, there is a huge M1 hype on HN. It reminds me of the 64-bit ARM hype when someone benchmaked encryption (because ARMv8 has AES instructions) and everyone were made to belive that the new iPhone would be 3-4 times faster.

Post reply on HN