News for hackers. Stuff that matters.
Re:Apple Silicon M1: Black Magic Fuckery by koffiezet on Tuesday November 24, 2020 @08:11PM (#25204895)
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 ci/cd pipeline where a dev screwed something up and debugging it locally is no longer an option. If I wasn't freelance, I could probably get away with some cloud instance to run all my docker stuff, but I'm dealing with too many different environments, for clients with various different legal requirements making this simply 'not an option'.

Too bad, because the machines look very promising for everything else. Development tools aren't there yet, but I expect that to be fixed pretty quickly.

Re:Apple Silicon M1: Black Magic Fuckery by thinbeige on Tuesday November 24, 2020 @11:44PM (#25206109)
FWIW, I never run docker on my local machine (I develop on a remote machine), benefits: remote machine os + setup is very close to production and GBit bandwidth up and down at my hoster is so much nicer when working with Docker images.
Re:Apple Silicon M1: Black Magic Fuckery by seabrookmx on Wednesday November 25, 2020 @01:45AM (#25206550)
VS Code Remote SSH makes this a really nice experience too.
Re:Apple Silicon M1: Black Magic Fuckery by kilroy123 on Wednesday November 25, 2020 @03:12AM (#25206978)
It really does, I started using it recently, and I was very impressed.
Re:Apple Silicon M1: Black Magic Fuckery by donmcronald on Wednesday November 25, 2020 @03:59AM (#25207246)
The dev containers that power codespaces are pretty exciting tech imo.
Re:Apple Silicon M1: Black Magic Fuckery by cjgk on Wednesday November 25, 2020 @04:01AM (#25207260)
> If I wasn't freelance, I could probably get away with some cloud instance to run all my docker stuff, but I'm dealing with too many different environments, for clients with various different legal requirements making this simply 'not an option'.

While not the exact same reasons as GP, I also need to be able to do this locally.

Re:Apple Silicon M1: Black Magic Fuckery by thinbeige on Wednesday November 25, 2020 @04:26AM (#25207391)
Even with legal restrictions: just put an Ubuntu server at home and ssh to it. Then you wouldn't have the GBit connection but still better than using Docker on a non-production OS.
Re:Apple Silicon M1: Black Magic Fuckery by ghayes on Wednesday November 25, 2020 @11:14PM (#25216743)
I'd argue there's some benefit to being able to code on a train. While Internet connectivity has grown with tethering, it's just nice sometimes to not need to be connected to do your work. That's my opinion, anyway.
Re:Apple Silicon M1: Black Magic Fuckery by seabrookmx on Wednesday November 25, 2020 @01:44AM (#25206547)
> 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.

Re:Apple Silicon M1: Black Magic Fuckery by IceWreck on Wednesday November 25, 2020 @02:21AM (#25206717)
> 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.

If youre at the point where you have to run a container running inside an emulator inside a VM on an ARM Mac then you should just get an x86 linux machine and enjoy performance and native support for containers.

Re:Apple Silicon M1: Black Magic Fuckery by hnarayanan on Wednesday November 25, 2020 @02:52AM (#25206864)
This is not what running an ARM64 Linux VM means.
Re:Apple Silicon M1: Black Magic Fuckery by skohan on Wednesday November 25, 2020 @03:29AM (#25207084)
Are you just talking about using an ARM64 container your root container? This kind of breaks the point of docker if you're running on x86 in the cloud, doesn't it? You're no longer developing in your exact deployment environment, which is one of the key benefits of docker.
Re:Apple Silicon M1: Black Magic Fuckery by hamilyon2 on Wednesday November 25, 2020 @06:45AM (#25208228)
How many years left till everyone run arm on server side too anyway?
Re:Apple Silicon M1: Black Magic Fuckery by skohan on Wednesday November 25, 2020 @06:58AM (#25208299)
I mean, greater than zero, so it's still a relevant problem
Re:Apple Silicon M1: Black Magic Fuckery by the_duke on Wednesday November 25, 2020 @02:16AM (#25206695)
Qemu performance without hardware virtualization is painfully slow and is not really practical for eg running a Kubernetes cluster.
Re:Apple Silicon M1: Black Magic Fuckery by seabrookmx on Wednesday November 25, 2020 @11:35AM (#25211024)
Yeah that's what I was getting at.

There is no hardware virtualization here because it's emulating a different architecture.

Rosetta 2 is able to do this entirely in software with very impressive performance but I doubt QEMU will be in the same league.

That said, if you can get most of your containers in native ARM (you can already run k8s on ARM, for instance), it might be a valid escape hatch for the odd image that hasn't updated yet.

Re:Apple Silicon M1: Black Magic Fuckery by ant6n on Wednesday November 25, 2020 @08:21AM (#25208901)
Docker has QEMU built in. You can run ARM docker images on x86, and I believe you can run x86 docker images on ARM.

This is not very widely talked about, I stumbled across it by accident: I was working on an x86 emulator on my Chromebook, and was going back and forth between the ARM Chromebook and an x86 laptop. I was working within docker on both machines. At some point I was running a test binary saying "this is an ARM-binary" and forgot to run it using the emulator - but it still executed directly on the x86 machine. It was very confusing and took me a while to figure why my x86 cpu was executing this little static ARM binary just fine - QEMU inside Docker.

Re:Apple Silicon M1: Black Magic Fuckery by zamadatix on Tuesday November 24, 2020 @10:16PM (#25205660)
It'll be interesting what happens in a couple of years if server side gets more mixed with ARM as well.
Re:Apple Silicon M1: Black Magic Fuckery by mhh__ on Tuesday November 24, 2020 @11:37PM (#25206080)
Linus Torvalds was and is probably still right that unless developers have the same breed of processor (not just AArch64 but the actual chipset, for example) on the bench it'll probably never be particularly prevalent server-side.

That and Apple presumably dream of not letting developers touch anything without going through their stack, so no touching the hardware for you. For example, I believe Apple expose Performance counters through Instruments in Xcode - but without a Mac to test it on I should say - it doesn't seem to be close to perf. The wider point being that Apple will probably never let you run Linux on their hardware, and your server will probably not be running MacOS either.

Re:Apple Silicon M1: Black Magic Fuckery by ogre_codes on Wednesday November 25, 2020 @12:54AM (#25206362)
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 well.

Re:Apple Silicon M1: Black Magic Fuckery by bitwize on Wednesday November 25, 2020 @01:25AM (#25206466)
That was for x86 Macs. Apple is not supporting alternative operating systems on the M1 Mac except via virtualization.
Re:Apple Silicon M1: Black Magic Fuckery by zamfi on Wednesday November 25, 2020 @01:42AM (#25206534)
Re:Apple Silicon M1: Black Magic Fuckery by ogre_codes on Wednesday November 25, 2020 @01:53AM (#25206586)
From the sounds of it, Apple hasn't put anything in the way of installing Linux or Windows on the M1 based Macs. They don't have the sort of built in support the Intel based Macs have, but they should be able to boot Linux or Windows on bare metal.

Recently there was a Apple support article posted here on HN detailing it.

https://news.ycombinator.com/item?id=25145119

Re:Apple Silicon M1: Black Magic Fuckery by mhh__ on Wednesday November 25, 2020 @02:04AM (#25206639)
Making Linux work on an ARM SOC is a lot harder than on a regular laptop. It basically requires help from the vendor to make the peripherals and such work, although there. Will be a lot of eyes on this so I'd be surprised if someone hasn't got it working within a year or so (working is not equal to usable)
Re:Apple Silicon M1: Black Magic Fuckery by ogre_codes on Wednesday November 25, 2020 @02:16AM (#25206694)
> Making Linux work on an ARM SOC is a lot harder than on a regular laptop.

Yep. It's going to be a while, and it'll be pretty rudimentary for some time. I think Linux on the Mac mini will be viable well before it's interesting on the MacBook.

Re:Apple Silicon M1: Black Magic Fuckery by lucian1900 on Wednesday November 25, 2020 @11:36AM (#25211039)
If for no other reason than because power management is not essential.
Re:Apple Silicon M1: Black Magic Fuckery by skohan on Wednesday November 25, 2020 @03:35AM (#25207118)
> The wider point being that Apple will probably never let you run Linux on their hardware, and your server will probably not be running MacOS either.

I agree the idea of running Apple Silicon in the cloud seems far-fetched, but at the same time, if Apple actually does achieve the best price/performance processors in the world, it almost seems like a failure of the market if they do not also serve the cloud market.

Re:Apple Silicon M1: Black Magic Fuckery by ed25519FUUU on Tuesday November 24, 2020 @11:16PM (#25205988)
Unless AWS starts selling their graviton CPU, whose going to create chips for the arm server market? The volumes are huge and the margins are tiny, which is not something Apple was ever interested in.
Re:Apple Silicon M1: Black Magic Fuckery by ojosilva on Thursday November 26, 2020 @10:08AM (#25220613)
For a myriad of reasons, I don't think Apple would ever want to sell their chips standalone.

OTOH, Apple could consider releasing a line of Apple silicon cloud servers.

Even if more expensive than x86 servers, they could eventually become VERY competitive if they are more power efficient, which is a real issue for cloud providers. It would pay off any upfront cost if, on the long run, the server uses ie. 50% less energy than x86 alternatives for the same bang.

Now, the thing is that the typical cloud or datacenter machine today is more of a custom built piece of witchcraft than an off-the-shelf blade. So, meh, maybe not. But an ARM-based cloud, Apple or not, sound like the way to go, at least for the long term.

Re:Apple Silicon M1: Black Magic Fuckery by threeseed on Wednesday November 25, 2020 @01:31AM (#25206499)
> whose going to create chips for the arm server market

Why not Microsoft and Google ? Amazon did.

And they surely aren't going to let AWS/ARM run away without any competition in the cloud space.

Re:Apple Silicon M1: Black Magic Fuckery by timthorn on Wednesday November 25, 2020 @02:45AM (#25206835)
Ampere and Marvell have already.
Re:Apple Silicon M1: Black Magic Fuckery by jhgb on Wednesday November 25, 2020 @03:30AM (#25207089)
AMD could still revive the K12 and apply their Zen 3/4/5 experience to it.
Re:Apple Silicon M1: Black Magic Fuckery by pertymcpert on Wednesday November 25, 2020 @03:08PM (#25213693)
Uhhhh...quite a few companies?
Re:Apple Silicon M1: Black Magic Fuckery by runeks on Thursday November 26, 2020 @02:20AM (#25217683)
> [...] 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.

Is there any reason why Apple couldn’t add support for emulated virtualized x86 code in a future ARM CPU? The M1 doesn’t support it, but might the “M2” or “M3” support it?

I ask because I’m in the same situation as you, where not being able to run x86 Docker containers would make me not buy an ARM MacBook Pro.