Live data from Hacker News

Apple Silicon M1: Black Magic Fuckery

singhkays.com

471–480 of 1001 posts

Re: Apple Silicon M1: Black Magic Fuckery

#471

Earlier quoted context omitted.

How does this work? Isn't reference counting a lot of +1 and -1?

It's a lot +-1 on atomic variables guarded using atomic memory operations (mainly with the Aquire/Release ordering) on memory which might be shared between threads. So low latency of the cache to system RAM can help here, at least for cases where the Rc is shared between threads. But also if the thread is not shared between threads but the thread is moved to a different CPU. Still it's probably not the main reason. G…

Just to be clear, the RAM/memory and cache are not on the same chip/die/silicon. They are part of the same packaging though.

> which keeps the memory between caches and the system memory/RAM coherent Isn't this already true of every multi-core chip ever designed; the whole point of coherency is to keep the RAM/memory coherent between all the cores and their caches.

Re: Apple Silicon M1: Black Magic Fuckery

#472

Earlier quoted context omitted.

https://www.diyphotography.net/this-700-computer-can-edit-8k...

That's nice. But what does CPU/GPU horse power have to do with memory? If I want to spin up a bunch of VMs to do pre-commit test builds in clean environments, and each need RAM for the OS and user land, being able to edit a lot of raw video does nothing for me. I'm generally fine running macOS (or Linux), but sometimes I need to boot up Windows in a VM for specialized apps: how do I assign >16GB of memory to it if I…

Setting aside that you are way off thread here...

> how do I assign >16GB of memory to it if I only have 8-16GB of RAM?

This is Apple's slowest/ lowest performance M series CPU.

Complaining that the CPU they built for the MacBook Air and the lowest end MacBook Pro doesn't have 32GB of RAM misses the entire picture. This is Apple's first and lowest end M series chip, and it's blowing away Intel chips with discrete GPUs and more RAM. Their higher end processors which will be coming out over the next couple years are likely to be much better... and will support 32GB of RAM. In fact since Apple is migrating the entire line-up, it's likely the next generation of CPUs will support discrete RAM so the Mac Pro can offer systems with massive amounts of RAM as the current Mac Pro does.

> I need to boot up Windows in a VM for specialized apps

Aside from getting ARM Windows running on the Mac hypervisor, Windows VMs seem pretty unlikely. Another possibility is someone porting or creating an x86 emulator to run on the hypervisor.

Aside from that, Crossover by Code Weavers or something like AWS Workspaces are your best bets.

Re: Apple Silicon M1: Black Magic Fuckery

#473

This is fascinating: > Retain and release are tiny actions that almost all software, on all Apple platforms, does all the time. ….. The Apple Silicon system architecture is designed to make these operations as fast as possible. It’s not so much that Intel’s x86 architecture is a bad fit for Apple’s software frameworks, as that Apple Silicon is designed to be a bespoke fit for it …. retaining and releasing NSObjects i…

> This, in a nutshell, helps explain why iPhones run rings around even flagship Android phones, For the price, it better run circles and squares. It should cook my dinner too.

A new 2020 iPhone SE costs US$399 and outperforms flagship Android phones that cost much more:

https://www.androidcentral.com/cheapest-iphone-has-more-powe...

https://www.androidauthority.com/iphone-se-vs-most-powerful-...

Re: Apple Silicon M1: Black Magic Fuckery

#474

Tin foil hat warning - but how much of the M1 performance improvement is from optimizations made in Big Sur for Apple Silicon that they just didn't bother implementing for x86 since it's now the outgoing technology for Apple? I realize the reducing in power consumed for any given quantity of work is downright amazing for laptops, but I guess I'm more curious about workstation and (build) server kinds of applications.…

Apple has been using x86 for practically 15 years now. Your theory is this whole time they've been too lazy to bother to implement "god mode" ? What about Windows and Linux on x86? Also too lazy? It can be fun to put on the tin foil hat, but at least make sure the theory makes even a little bit of sense first.

> What about Windows and Linux on x86? Also too lazy?

No, Windows and Linux are significantly faster.

https://www.phoronix.com/scan.php?page=article&item=macos101...

Ubuntu has gotten significantly faster since 19.10, and other distros like ClearLinux are much faster still.

https://www.phoronix.com/scan.php?page=article&item=clear-fa...

Re: Apple Silicon M1: Black Magic Fuckery

#475
post #449

How far away (in years) are chips comparable from AMD and say ARM ( Microsoft SQ2 ) for Windows machines?

I think the biggest reason this has such a huge performance advantage is that the 8/16GB RAM is built into the chip. Modern CPUs are mostly limited by memory bandwidth rather than compute performance, and this has way more memory bandwidth than competing CPUs because of the tight integration. This RAM might also be clocked much higher than what we're used to, because there is no long bus to the CPU anymore.

The downside of this SoC design, though, is that while you can fit 8GB or 16GB on a chip, it might be difficult to fit more. The 8/16GB limit might explain why this design is reserved to the smaller laptops for now, and they haven't replaced x86 in all of their lineup. If you want more RAM than that, then you would again be stuck with less memory bandwidth to your external RAM. You would maybe end up with a design where some applications are kept in the internal RAM and some in the external, or where your internal RAM acts as an L4 cache to the external RAM.

It's not that difficult IMO for Intel or AMD to replicate this with an x86 design. They might not have to modify the CPU core and its caches that much, mostly the memory controller. How much time they would need though, I'm not sure. There's some probability they were aware that this was coming and already had something in the works. Otherwise, maybe one or two years?

Re: Apple Silicon M1: Black Magic Fuckery

#476
I didn't really understand the TSO explanation given in this article and found it to be a bit hand-wavy. The article says to emulate the x86 TSO consistency model on an ARM machine which is weakly ordered you have to add a bunch of instructions which would make the emulation slow. I followed that much but then after that it doesn't really explain how they would get around these extra instructions needed to guarantee the ordering. It just says "oh, it's a hardware toggle"; toggle of what exactly?

I could see them just saying no to following TSO for single core stuff and when running emulated code for single core performance benchmarks since technically you don't care about ordering for single core operation/correctness. That would speed up their single core stuff but then what about the multi-core.

Re: Apple Silicon M1: Black Magic Fuckery

#477

Earlier quoted context omitted.

I suspect the previous poster was referring to non-Apple ARM hardware, not Apple servers. > The wider point being that Apple will probably never let you run Linux on their hardware Apple has already issued docs on how to load alternative OSs on their system and has said explicitly that Windows support is up to Microsoft. Linux on Mac metal is not out of the question, but it's going to take some time to get running we…

That was for x86 Macs. Apple is not supporting alternative operating systems on the M1 Mac except via virtualization.

Not so: https://www.zdnet.com/article/top-apple-exec-native-windows-...

Re: Apple Silicon M1: Black Magic Fuckery

#478
post #57

Not to speak for anyone else, but one thing I gently disagree with: > Given that Hackintoshers are a particular bunch who don’t take kindly to the Apple-tax[...] I have zero issues with an Apple premium or paying a lot for hardware. I think a major generator of interest in hackintoshes has been that there are significant segments of computing that Apple has simply completely (or nearly completely) given up on, includ…

> I have zero issues with an Apple premium or paying a lot for hardware. Especially if the margins allow them to not engage in silliness on the software side of things like violating privacy and serving ads in the OS. There are certainly places that Apple can be criticized, but I think in these two areas they're acting pretty well.

There's 'a lot' (2-3k) and there is 'silly, can never justify unless I'm in some super niche segment in Audio/Video production' (10-20k).

Re: Apple Silicon M1: Black Magic Fuckery

#479

Earlier quoted context omitted.

Every 8gb mac I’ve used before was fine, and that was with running Xcode, Firefox, photoshop, mail, terminal, and other programs.

Seriously, I'm utterly baffled by all the people claiming that 8 GB isn't enough for the average user. The only situation I ever ran into where it was a problem was in trying to run multiple VM's at once. Otherwise it's just a non-issue. Programs often reserve a lot more memory than they actually use (zero hit in performance) so memory stats are misleading, and the OS is really good at swapping memory not touched in…

A friend of mine who was an iOS dev always used to complain though that his MBP running some 20+ tabs in chrome, and xcode and simulator, would freeze a lot, even with 16GB of RAM.

Re: Apple Silicon M1: Black Magic Fuckery

#480

I understand the machine is great or going to be great for most use cases. My mbp is my main workhorse, but as a freelance SRE "devops" guy, the Apple ARM platform won't be suitable for my job any time soon, if ever. Docker is not yet available - but even when it would become available, emulating virtualised x86 code is explicitly not going to be supported. That in many cases means pulling a docker image built in a c…

> emulating virtualized x86 code

I don't think this is an issue for Docker. They can run an ARM64 Linux VM instead of the current x86 one, and then use QEMU to run x86 Docker containers within it if they want.

The bummer is that this won't be taking advantage of Rosetta 2 so it'll likely perform bad, but it might be good enough for debugging the odd image or even development depending on _how_ bad.

Post reply on HN