Live data from Hacker News

How M1 Macs feel faster than Intel models: it’s about QoS

eclecticlight.co

321–330 of 427 posts

Re: How M1 Macs feel faster than Intel models: it’s about QoS

#321
post #270

Question for the peanut gallery: In a -nix OS system, let's say single-threaded process is running on core 0. It makes a syscall. Does core 0 have to context-switch in order to handle the syscall, or could the kernel code run on core 1? This would allow a process to run longer without context switching and cache dumping, which would improve performance (as well as potentially security). Corollary question: could one…

Cross-core interrupts and syscalls are slow. The caches for any memory to be transferred have to be flushed on the calling core and its APIC would have to interrupt the destination core to start executing the syscall, which means entering kernel mode on the calling core to get access to the APIC in the first place.

If the goal is low latency then staying on a single core is almost always better. To effectively use multiple cores requires explicit synchronization such as io_uring which uses a lock-free ring buffer to transfer opcodes and results using shared buffers visible from userspace and the kernel. io_uring has an option to dedicate a kernel thread to servicing a particular ring buffer, and this can also be limited/expanded to a set of cores. I have zero experience with io_uring in practice and so I don't know what a good tradeoff is between servicing a ring buffer from multiple or single cores. The entries are lightweight and so cache coherency probably isn't too expensive and so for a high CPU workload that also needs high throughout allowing other cores to service IO probably makes sense.

I think newer x86_64 chips also allow assigning interrupts from specific hardware to specific cores to effectively run kernel drivers mostly on a subset of cores, or to spread it to all cores under heavy I/O.

Re: How M1 Macs feel faster than Intel models: it’s about QoS

#322
post #9

Well, they don't just "feel" faster. They also complete lots of real-world tasks in shorter times, often significantly shorter than the last Intel Macbook Pro.

It’s funny how many articles that just won’t say the obvious - it’s a faster computer. I have two laptops side by side, one is an M1, the other a HP in a slightly higher price point (more memory, bigger SSD). The challenges Intel has in the form factor are obvious — it’s a 1.2Ghz chip that turbos almost 2x as heat allows. In any dimension that it can do what you need, the Apple wins. Cheaper, faster, cooler, longer b…

It can't run Intel-based OSs or VMs, of course, but the latest version of Parallels Desktop runs ARM-based Linux guests on M1 Macs, as well as the Windows 10 ARM preview. (VMware has implied that the next release of Fusion will support Apple silicon as well.)

Re: How M1 Macs feel faster than Intel models: it’s about QoS

#323

I would kill to pin Dropbox to efficiency cores like this. Half the time when my fans are whirring I discover it's just Dropbox frantically trying to sync things.

There are plenty of self-hosted dropbox alternatives that don't do that.

I get that not everyone is a "take matters into their own hands" kinda person, but it's worthwhile to at least look into it and see if it's something worth pursuing for you.

Re: How M1 Macs feel faster than Intel models: it’s about QoS

#324

Earlier quoted context omitted.

The problem I ran into the other day, had an app crash taking 50% of cpu. I was on the couch for hours on battery. Only noticed when my battery life was at 60% when normally it would be at 85%. My intel machine would have alerted me by burning my legs and trying to create lift with the fans.

Ha, speaking of burning legs, I was doing some video editing in FCPX last night, and I had to keep changing positions trying to optimize for not burning my legs too badly and not blocking the air flow through the vents on the bottom/sides causing even more throttling.

I was sitting cross legged during a long civ session and using my left hand to balance part of my MBP up.

It wasn't until the next day that I discovered a painful red spot on my hand. That was a few months ago. While the spoot is no longer painful, it is still there today. The macbook slowly cooked a portion of my hand.

The thermals on those old machines are just terrible, and I have evidence of it :-)

Re: How M1 Macs feel faster than Intel models: it’s about QoS

#325

Earlier quoted context omitted.

I did a side-by-side comparing with my friends' M1 macbook and my (more expensive, nearly brand new) ryzen 5800x workstation compiling rust. The ryzen was faster - but it was really close. And the macbook beats my ryzen chip in single threaded performance. For reference, the ryzen compiles ripgrep in 19.7 seconds. The comparison is way too close given the ryzen workstation guzzles power, and the macbook is cheaper, p…

Power consumption is a good point. I wonder what the M1's power consumption is during those 19.7 seconds of compiling ripgrep compared to other platforms.

Low.

For me, SoC power draw when compiling apps is usually around 15 to 18W on a M1 mac mini.

My example app (deadbeef) compiles in about 60 seconds on that mac mini.

On a 2019 i7 16” MBP (six core), it takes about 90 seconds, and draws ~65W for that period.

So… radically more power efficient.

edit: this is the same version of macOS (big sur), xcode, and both building a universal app (intel and ARM).

Re: How M1 Macs feel faster than Intel models: it’s about QoS

#326
post #270

Question for the peanut gallery: In a -nix OS system, let's say single-threaded process is running on core 0. It makes a syscall. Does core 0 have to context-switch in order to handle the syscall, or could the kernel code run on core 1? This would allow a process to run longer without context switching and cache dumping, which would improve performance (as well as potentially security). Corollary question: could one…

If the system call is being handled by core 1, what does core 0 do? It must somehow wait for the core 1 system call to return. I'm not sure the waste created by waiting is outweighed by cache benefits.

Re: How M1 Macs feel faster than Intel models: it’s about QoS

#327

Earlier quoted context omitted.

I did a side-by-side comparing with my friends' M1 macbook and my (more expensive, nearly brand new) ryzen 5800x workstation compiling rust. The ryzen was faster - but it was really close. And the macbook beats my ryzen chip in single threaded performance. For reference, the ryzen compiles ripgrep in 19.7 seconds. The comparison is way too close given the ryzen workstation guzzles power, and the macbook is cheaper, p…

I've done a side by side with my Ryzen 3700x compiling a Go project. 6 seconds on the Ryzen, vs 9 seconds on the M1 air. `time go build -a`, so not very scientific. Could be attributed to the multicore performance of the Ryzen. Starting applications on the M1 seems to have significant delays too, but I'm not sure if that's a Mac OSX thing. Overall it's very impressive, I just don't see the same lunch eating performan…

update:

time GOARCH=amd GOOS=linux go build -a

6s for the M1 too!

Re: How M1 Macs feel faster than Intel models: it’s about QoS

#328

Sounds like the consensus here is that the M1 feels faster, and is actually faster, for a lot of tasks. So, for a lot of engineers, the M1 is the better choice over Intels. (Faster compile times are a good thing for devs, among other things) In that regard, the moment feels similar to the mid 2000s, when you suddenly saw a huge uptick in Macbooks at technical conferences: software developers seemed to gravitate in dr…

> So, for a lot of engineers, the M1 is the better choice over Intels. I don't know which engineers you hang out with, but the only "engineer" I know who uses an M1 Mac does web design. Besides that, the M1 doesn't support most of the software that most engineers are using (unless you're working in a field already focused on ARM), and the fragility of a Macbook isn't really suited for a workshop environment. Among th…

I'm a VP of a small software shop focused on IoT. We do embedded, cloud, mobile, web and ML. My entire department is 100% mac.

Re: How M1 Macs feel faster than Intel models: it’s about QoS

#329

Earlier quoted context omitted.

I've done a side by side with my Ryzen 3700x compiling a Go project. 6 seconds on the Ryzen, vs 9 seconds on the M1 air. `time go build -a`, so not very scientific. Could be attributed to the multicore performance of the Ryzen. Starting applications on the M1 seems to have significant delays too, but I'm not sure if that's a Mac OSX thing. Overall it's very impressive, I just don't see the same lunch eating performan…

> `time go build -a`, so not very scientific. A tool I have enjoyed using to make these measurements more accurate is hyperfine[0]. In general, the 3700X beating the M1 should be the expected result... it has double the number of high performance cores, several times as much TDP, and access to way more RAM and faster SSDs. The fact that the M1 is able to be neck and neck with the 3700X is impressive, and the M1 defin…

M1 S Pro Max

Re: How M1 Macs feel faster than Intel models: it’s about QoS

#330

Earlier quoted context omitted.

I've done a side by side with my Ryzen 3700x compiling a Go project. 6 seconds on the Ryzen, vs 9 seconds on the M1 air. `time go build -a`, so not very scientific. Could be attributed to the multicore performance of the Ryzen. Starting applications on the M1 seems to have significant delays too, but I'm not sure if that's a Mac OSX thing. Overall it's very impressive, I just don't see the same lunch eating performan…

> `time go build -a`, so not very scientific. A tool I have enjoyed using to make these measurements more accurate is hyperfine[0]. In general, the 3700X beating the M1 should be the expected result... it has double the number of high performance cores, several times as much TDP, and access to way more RAM and faster SSDs. The fact that the M1 is able to be neck and neck with the 3700X is impressive, and the M1 defin…

Faster SSDs on the Ryzen machine? The SSD on even my 2019 Macbook pro is ridic
Post reply on HN