223 points · by cedws · 4y ago · 271 comments
But the migration to ARM is proving to be quite a pain point. Not being able to just do things as I would on x86-64 is damaging my productivity and creating a necessity for horrible workarounds.
As far as I know none of our pipelines yet do multi-arch Docker builds, so everything we have is heavily x86-64 oriented. VirtualBox is out of the picture because it doesn't support ARM. That means other tools that rely on it are also out of the picture, like Molecule. My colleague wrote a sort of wrapper script that uses Multipass instead but Multipass can't do x86-on-ARM emulation.
I've been using Lima to create virtual machines which works quite well because it can do multiple architectures. I haven't tested it on Linux though, and since it claims to be geared towards macOS that worries me. We are a company using a mix of MacBooks and Linux machines so we need a tool that will work for everyone.
The virtualisation situation on MacBooks in general isn't great. I think Apple introduced Virtualization.framework to try and improve things but the performance is actually worse than QEMU. You can try enabling it in the Docker Desktop experimental options and you'll notice it gets more sluggish. Then there's just other annoyances, like having to run a VM in the background for Docker all the time because 'real' Docker is not possible on macOS. Sometimes I'll have three or more VMs going and everything except my browser is paying that virtualisation penalty.
Ugh. Again, I love the performance and battery life, but the fragmentation this has created is a nightmare.
How is your experience so far? Any tips/tricks?
In reality I have hardly turned on the Intel MBP at all since I got it. At all.
Docker and VMware Fusion both have Apple Silicon support, and even in "tech preview" status they are both rock solid. Docker gets kudos for supporting emulated x86 containers, though I rarely use them.
I was able to easily rebuild almost all of my virtual machines; thanks to the Raspberry Pi, almost all of the packages I use were already available for arm64, though Ubuntu 16.04 was a little challenging to get running.
I also had to spend an afternoon updating my CI scripts to cross-compile my Docker containers, but this mostly involves switching to `docker buildx build`.
Rosetta is flawless, including for userland drivers for USB and Bluetooth devices, but virtually all of my apps were rebuilt native very quickly. (Curious to see what, if anything, is running under translation, I just discovered that WhatsApp, the #1 Social Networking app in the App Store, still ships Intel-only.)
Often times people experience different levels of difficulty using Apple Silicon precisely because my workload is not yours, and yours is different again from OP's
So I feel this particular Ask HN is more about wondering how different everyone's workflows are, and how that impacts M1 usage.
I envision that workflow options/pathways will start converging into one "way" which is the Apple way. You already are getting shunted into relying purely on Metal for gpu acceleration and you see the various plurality of gpgpu libraries start converging on only the Apple blessed/authorized and optimized version.
There are people fighting against this, for example the Linux on Apple Silicon project bringing up the GPU, but it's slow going.
Give it another few years, and people will stop using x, y, or z frameworks, and only use whatever API's Apple gives us, because that is the Apple Way.
Proceed at your own peril. The future is fast, but there is only one road.
https://developer.apple.com/documentation/apple-silicon/abou...
There are a handful of apps that aren't supported, but few of these are popular apps. Virtualbox is notable, but unsurprising: Rosetta is not designed for x86_64 virtual machines, and Virtualbox doesn't support arm64. (I submitted a correction to the Wine entry, since wine64 has worked under Rosetta 2 for a year.)
https://isapplesiliconready.com/for/unsupported https://liliputing.com/2021/06/wine-6-0-1-lets-you-run-windo...
On my m1 I see 16x performance differences in builds in favour of native over emulated. Even simple shell script run slow or seem to stall when emulated.
E.g. if I wanted to start building ARM binaries on a x86 host, is that the sort of thing this would enable?
docker buildx build --platform linux/amd64,linux/arm64 .
I constantly use buildx to build x86 images on my M1 so that I can run these images in my x86 Kubernetes cluster.
I found this article with some overview and example command lines: https://www.docker.com/blog/multi-arch-images/ . As best I can tell, you don't actually need a custom builder. You can just skip the `docker buildx create` and go straight to `docker buildx build` after one workaround below.
I needed the workaround from this comment to make it work (to install qemu? not sure): https://github.com/docker/buildx/issues/495#issuecomment-754...
Overall a very slick experience for going from zero to multiarch containers. Well done, Docker.
There's a useful app called Silicon Info on Github (https://github.com/billycastelli/Silicon-Info) and also on the Mac App Store.
It adds a menu bar icon that switches according to the currently-focused app's architecture.
We had to put so much effort to just run things on Rosetta because all of our compiled code had AVX enabled. We also needed to chase down pre-compiled binaries and re-compile them without AVX, we still haven't finished this work.
https://developer.apple.com/documentation/virtualization/run...
https://developers.apple.com/videos/play/wwdc2022/10002/
If you are not familiar, Rosetta is how Apple Silicon Macs run existing Mac x86 binaries and it is highly performant. It does binary pre-compilation and cacheing. It also works with JIT systems. They are now making that available within Linux VMs running on Macs.
Last thing I read, 70% of the native performance was shown by running GeekBench through Rosetta (with a few odd results noted).
If somebody has better info...
Edit: I see that Nov 2020 checks returned an 80% performance, and there was discussion on HN at (at least) https://news.ycombinator.com/item?id=25105597
ARM Geekbench single core on M1 MacOS is 1734. ARM Geekbench single core on WinARM in VM on M1 is 1550. x86 single core on i9 MB Pro MacOS is 1138. x86 in emulation on M1 MacOS is 1254.
Yes, 72% x86 Rosetta vs. M1 Native. However, x86 Rosetta on M1 was faster than the previous i9 2019 Macbook Pro x86 native. I consider that to be performant for running code that was compiled for a very different architecture.
Benchmarks are good for bragging rights and maybe convincing over-zealous accounting to approve a purchase (but even then that’s probably not all there is to it.)
You can decide beforehand if increased speed with respect to your experience on your machines is beneficial to you or not.
And how do people without disposable income judge?
When benchmarking x86 and ARM containers, our application seems to be around ~5x slower with x86-rosetta, and similarly can be observed for mysql-server or just doing `apt install`.
This is still significantly better than using qemu emulation, but it's not really usable in our case.
I've also encountered segmentation faults when running x86 `npm` inside Docker, so couldn't even install packages, but didn't dig further as to what's the cause.
(Note: I've created a simple macOS app using Virtualization framework, enabled Rosetta, and loaded Ubuntu Focal. I've installed the latest version of Docker, which automatically used `rosetta` when encountering x86 executables. Maybe this setup is not ideal.)
Much more impressively it also leverages a custom hardware x86-like memory model unique to the M1/Apple ARM chips. That's where most of the performance really comes from, as I understand it.
Hopefully, this is the right timestamp:
https://developer.apple.com/videos/play/wwdc2022/10002/?time...
https://threedots.ovh/blog/2022/06/quick-look-at-rosetta-on-...
My solution was to give up using my M1 mac for development work. It sits on a desk as my email and music machine, and I moved all my dev work to an x86 Linux laptop. I'll probably drift back to my mac if the tools I need start to properly support Apple Silicon without hacky workarounds, but until GitHub actions supports it and people start doing official releases through that mechanism, I'm kinda stuck.
It is interesting how much impact GitHub has had by not having Apple Silicon support. Just look at the ticket for this issue to see the surprisingly long list of projects that are affected. (See: https://github.com/actions/virtual-environments/issues/2187)
That wouldn’t be too much of an issue if you could just cross compile like you can with go. However graalvm can’t do this yet.
In nutshell I don't see how having Apple Silicon locally makes the problem - if your non local env (dev, prod, stage) is running on x86 Linux or even arm Linux, shouldn't be any issue to build for that architectures on your build farms anyway.
I may be missing some important part here.
Putting on my tin-foil hat for a sec: GitHub is owned by Microsoft, who would really stand to benefit from slowing down Apple Silicon adoption a bit...
As a primarily Linux user these feel like very familiar stories.
It's kinda refreshing to hear those stories from mac users. Maybe we are not so different after all.
After all, macOS is certified Unix and Linux is Unix-like.
To me, the core of the Linux experience consists mostly of things that are not part of macOS:
- uniform, comprehensive, robust package management, including for the system software
- GNU coreutils and related utilities (sed, grep, find, etc.)
- good filesystems
- 'root is root'; no policy or other bullshit restricting what root can do by default
- lots of featureful, performant terminal emulators (to the point that the DE default is almost always fine)
- some choice w/r/t desktop experience
- popular apps don't just entirely stop working between OS releases
- pretty much everything is discoverable and configurable if you're determined
Those are given more or less in order of importance, or how essential they are to the Linux experience to me. They don't include any specific complaints about the macOS desktop on its own terms, or things that I miss from my favorite desktop environment (Plasma). But I have plenty of both of those as well.Using Linux just feels good to me, and using macOS really doesn't, even after a year or more 'living in it' every day. Uniform, automated software management is at the heart of it for me. But regardless, using macOS doesn't really feel similar to using Linux to me, even with highly opinionated desktop environments which are not my favorites, like GNOME.
Honestly that's subjective. I preferred GNOME, but to each their own. There's too much flashiness for my taste, and some icons and UI just look like something for kids (big, bright, round).
> ecosystem/3rd party integrations
Eh. A big part of that ecosystem is paid for really basic features. The App Store requires an iCloud account to be used. That ecosystem also relies on various hacks to achieve things which are IMHO rather basic - like Karabiner which is a keylogger, just so you can do relatively basic key remapping. What's stopping Apple from saying keyloggers are no longer allowed in the next version, like how they broke all VPNs by deprecating the existing framework used by all of them? Also there are entire, sometimes paid, apps to do basic features the OS should support itself, like having a different scroll direction between the touchpad and mouse.
The hardware, in it's current iteration ( no butterfly keyboard), is very good. I don't particularly care about magsafe ( i keep knocking it off by mistake, which puts the device to sleep) or the giant touchpad that weirdly strains my palm when using it for prolonged periods of time, but those are purely personal. Can't wait to be able to run Linux on an M* Apple device, I might even buy one.
A working GUI, to be exact. Source: switched to Macs from Linux in 2013.
They all just use VS Code or Jetbrains and that's about it, so hell if I know why they need a $3000 machine to run shell commands they don't understand on.
I desperately wish one of the big boys would push enterprise Linux dev machines hard.
Not quite _pushing hard_ though.
2. Everything you install will be arm based. Docker will pull arm-based images locally. Most every project (that we use) now has arm support via docker manifests.
3. Use binfmt to cross-compile x86 images within prlctl, or have CI auto-build images on x86 machines.
That pretty much does it.
We were using UTM but have recently switched to Parallels, which is nice.
Our prod stayed on x86 but we’ve started moving to graviton3 which is better bang for buck. Suspect it’ll end up being a common story for others too.
m1s are just such nice machines that I’d go quite out of my way to stay on them now.
https://news.ycombinator.com/item?id=31094361&p=2#31101729
This makes so much sense now for many workflows. I no longer complain about my computers being slow so I don't even think of upgrading, and if something's annoying it's mostly about software rather than hardware anyway, so no point in upgrading, although the M1 seems to have convinced a lot of people otherwise. Looking forward to adopt this new tech... in 3-5 years or so.
This also makes it cheaper to upgrade through second-hand device, just stay one or two models behind.
I'm only half joking. I'm of the group of people who know that Docker is a security nightmare unless you're generating your Docker images yourself, so wherever I've had to support that, I insist on that. If you don't use software that's either processor centric (and therefore buggy, IMHO) or binary-only, then this is straightforward and a win for everyone.
Run x86 and amd64 VMs on real x86 and amd64 servers, and access them remotely, like we've done since the beginning of time (teletypes predate stored program electronic computers).
Since Docker is x86 / amd64 centric, treat it like the snowflake it is, and run it on x86 / amd64.
Even though docker runs natively on Linux, perhaps a similar vm setup can be achieved for security reasons.
I use Podman on Linux which is compatible with docker but without the root issue.
I work on scientific software, so the biggest technical issue I face day-to-day is that OpenMP based threading seems almost fundamentally incompatible with M1.
https://developer.apple.com/forums/thread/674456
The summary of the issue is that OpenMP threaded code typically assumes that a) processors are symmetric and b) there isn't a penalty for threads yielding.
On M1 / macOS, what happens is that during the first OpenMP for loop, the performance cores finish much faster, their threads yield, and then they are forever scheduled on the efficiency cores which is doubly bad since they're not as fast and now have too many threads trying to run on them. As far as I can tell (from the linked thread and similar) there is not an API for pinning threads to a certain core type.
GOMP_CPU_AFFINITY=“1 2 5 6”
With thread 1 bound to core 1, thread 2 on core 2, thread 3 on core 5, thread 4 on core 6. I don’t have an M1 to play around on but I’d have assumed that the cores are fixed IDs.
Aside from that, if the workload is predictable in time, using a more complex scheduling pattern might help. You could perhaps look at how METIS partitions the workload, but see if it’s modifiable by adding weights to the cores reflective of their relative performance. Generally, to get good OMP performance I always found it better to treat it almost like it’s not shared memory, because on HPC clusters, you have NUMA anyway which drags performance down once you have more threads than a single processor has cores in the machine
I agree with your other points though!
Assuming your base images are themselves already multi-arch, most of the tooling we needed was already built into the `dockerx` build tool, which is awesome - check it out if you haven't (2). Docker has bundled all the tooling and emulation packages (qemu) needed into a single docker image that can publish multi-arch docker images for you! You run docker to emulate docker to publish docker... There are some interesting things that you'll need to do if you publish multi-stage builds, like publish a tmp tag and delete it when you are done, but it's not /too/ terrible. Since Airbyte is OSS, you can check out our connector publish script here (3) to see some examples.
I'd recommend that spending the time to work your multi-arch tooling - not only does it make the local dev experience faster/better, it:
1. unlocks ARM cloud compute, which can be faster/cheaper in many cases (AWS)
2. removes a class of emulation bugs when running AMD images on ARM - mostly around networking & timing (in the JAVA stack anyway)
Links:
1. https://github.com/airbytehq/airbyte/issues/2017
2. https://docs.docker.com/buildx/working-with-buildx
3. https://github.com/airbytehq/airbyte/blob/master/tools/integ...
Some months ago a guy had bricked its own MacBook by running data analysis tools all the day every day, until the ssd finally gave up (and you can’t change that in a macbook pro, it’s soldered).
The only thing that ever makes it sluggish is if I open VSCode with a large workspace. Even with all plugins disabled. No idea why. I just stopped using VSCode.
There are no magical computers, just a great Reality Distortion Field that's still at work.
Then tried again early this year with a M1Max MBP, and it has been the biggest step change productivity boost of my life. Definitely still some pain points, but the way this thing handles anything I throw at it is incredible.
I'm mostly doing front-end dev (react native). Have a minimum of 2 IDEs, 1 iOS simulator, 1 Android simulator, Windows (ARM) Virtualbox, 2 browsers open at all times. And then add a mix of Docker, XCode, Android Studio, Zoom, Sketch, Affinity apps, Slack, Zoom, etc. I haven't ever heard the fan spin up. I was carefully managing what I had open on the 2018 MBP, and now I don't even think about it.
The only thing I'm still running in Rosetta is Apple software: XCode and the iOS simulator, but they run smooth, so I don't even think about it.
The MBA setup I was just flailing my way through. For the M1Max setup, I found this guide very helpful in my initial setup (mostly focused on a RN Dev): https://amanhimself.dev/blog/setup-macbook-m1/
But is anyone else surprised how long it's taking to get the iOS Simulator for ARM? I feel like it would make a massive difference to my developer experience (especially in battery). And I haven't seen any indication that it's coming anytime soon.
I open up my 13.3 beta 2 and go to the xcode tab go down to open developer tool click on simulator and then click on file and then open simulator my mouse over to iOS 15.4 go down to the iPhone 13 for example click on it and then I have a simulated iPhone 13...
And if I check the activity monitor nothing in my activity monitor is showing up as Intel code except for parsec right now...
And your comment made me go look back at my react native project setup. Looks like the main reason my app is still building to x86 is because of one Expo dependency that doesn't yet compile to arm64. So more of a Expo concern.
Thanks for checking on your end.
How old is your version of xcode? From what I can see they added M1 support 1.5 years ago.
Android? Android Studio has problems? That would be vital to me if i went Mx.
My 2nd try with the MBP in 2022, following the guide I linked above, Android Studio has been perfect.
We are completing a project to upgrade to Java 11 for most of our micro services. This will also mean we do multiarch container builds for our entire pipeline. Once that is complete, we will begin developing against ARM as the primary target for devs. This is needed because we are in the middle of a hardware refresh so by EOY, something like 80% of devs will be running on M1 Pro.
This should end up saving us money long term as we move all the cloud workloads to Graviton2/3 and Ampere A1 hosts.
We'll be multiarch for many years to come. I also don't see a timeline for us to sunset x86 support considering we also do on-prem installs and ARM rack mount servers are nearly impossible to source.
I think we're entering a long period of multiarch for the "traditional" server/desktop. I expect a lot of good to come out of this on the compiling side (easier to target any OS-arch), and (perhaps more importantly) on the general cross-platform front.
Early on there were major issues if you were targeting x86-64 systems code in C++. A lot of common tooling was broken for months on end. Time has solved some of these problems but ultimately I wrote code to support native ARM targets as first-class code citizens. There was a significant learning curve (I was not fluent in ARM64 ISA) but now that everything is ported, running native, and the tooling has finally started to catch up, it works pretty smoothly and I don't have much to complain about. The x86 emulation has limitations so native is the only way to go for many things, and you'll still want to test some code on real x86 server hardware.
That said, the latest OS on (at least) the M1 is noticeably buggy. Lots of behavioral artifacts that I wouldn't expect. Not sure if it is the hardware or the software, or both. Nothing catastrophic, just annoying.
For this type of development, the number of external dependencies you have is very small. Aside from the compiler, build system, and testing, the number of third-party libraries linked into a release can usually be counted on one hand. Again, for good reason.
Basically, I am doing what I did before Docker, writing a small set of scripts that can perfectly reproduce the environment where I need it. This is made much easier because modern build systems have good dependency management built-in so writing those scripts is a lot less involved.
For whatever reason the m1 mac's are crazy different. They feel like they have more ram (maybe a faster NVME for swap?), they run the fan crazy less, some don't even have fans (the mac book air). I've heard it speculated they use hardware assist for compression for swap. In any case don't assume that a 16GB M1 will feel like a 16GB x86-64.
The amount of trouble that some seem to be having with backend dev on M1 makes me wonder if maybe it wasn't the best idea for the industry to put its collective eggs in the single basket of trying to perfectly match dev and prod environments. If nothing else, it feels weird for progress and innovation in the world of end-user/developer-facing computing to be held back by that of the server world.
We run macOS aarch64 locally and Linux x86 on production and have yet to have a single compatibility issue (and we run a staging environment that’s identical to prod, so if there was occasionally an issue it probably wouldn’t make it to production.
There were a couple libraries my company needed that didn't have ARM support but I ported them and made pull requests to the repos, and now they work alright. It wasn't difficult at all, since lots of stuff already had ARM code because of ARM-Linux, Android or iOS.
I go weeks without turning on my work-provided Intel Mac. I actually only use it for "personal" stuff (I help maintain some open source C/Asm stuff that use multiple OSs and architectures). My boss asked if I want an upgrade tho.
The only problems we've had is slow performance of Docker for us with our databases. So much so, we've moved those out of Docker and back to the native. Performance is easily 6x faster. MySQL was also a headache because finding a MySQL 5.7 official Docker container didn't exist for ARM so we needed to use the slow emulation through qemu.
We also have a CLI dev tool that is written in Python and distributed in Docker (x86) which has also been slow. Not enough time to build ARM based Docker image.
Regarding slowness - i'm curious, how that's the problem - from my understanding on local dev env datasets are small and even 6x times slower (say what is 1 ms on production be 6 ms on your machine) shouldn't be any issue? Can you provide some examples? (I may need to run DB locally for tests one day, getting prepared)
Here's a tip for anyone with docker compatibility problems: If you add `platform: "linux/amd64"` to your docker-compose (there's also a similar command for Dockerfile iirc), it just gets the x64 images and emulates those.
There is emulation overhead of course, but it's not perceivable in my experience, compared to running native images.
I've never seen docker crash until I did this.
Currently running a bunch of Ubuntu (arm) virtual machines and my mbp m1 handles it really nice.
Running x64 and ARM together on one machine will work through tricks like Rosetta but I don't believe that stuff will ever work well in virtual machines, not until Apple open sources Rosetta anyway.
I'd take a good, hard look at your tech stack and find out what's actually blocking ARM builds. Linux runs on ARM fine, so I'm surprised to hear people have so many issues.
What you could try for running Docker is running your virtual machines on ARM and using the native qemu-static infrastructure Linux has supported for years to get (less efficient than Rosetta) x64 translation for parts of your build process that really need it. QEMU is more than just a virtualisation system, it also allows executing ELF files from other instruction sets if you set it up right. Such a setup has been very useful for me when I needed to run some RPi ARM binaries on my x64 machine and I'm sure it'll work just as well in reverse.
For my 9-5 employer, biggest drawback we've come across is that SQL Server can't be installed on Windows 11 ARM, which is preventing us from having a truly local development environment.
We've gotten everything else working via Azure SQL Edge running via Docker for Mac, but it lacks several features that we require (e.g. full-text search, spatial data types).
Despite a recent announcement (https://blogs.windows.com/windowsdeveloper/2022/05/24/create...) that Visual Studio will soon support ARM, There are no signs that SQL Server 2022 will support ARM.
My employer is still moving forward with provisioning M1 MBPs for developers.
But apart from that it’s been incredibly smooth.
This will also download the Intel versions of all the providers when terraform executes. Which reduces the problems a ton since there are some providers that are definitely not aarch64, especially when it comes to older versions.
Maybe this will help:
https://arstechnica.com/gadgets/2022/06/macos-ventura-will-e...
I don't expect many teams to volunteer to suffer this sort of slowdown and complexity in the near term.
Since it's all BuildKit, you can swap `docker buildx build` for `depot build` and it works exactly the same - I made a depot/build-push-action to drop in place of the docker/build-push-action in GitHub Actions.
It also has a persistent SSD cache disk for each builder, that was my other pain with GitHub Actions, time saving and loading layer cache was negating the speedups from cache hits - with a persistent disk, there's no saving or loading.
Anyways, combo of having a local cache and running on real ARM machines gives like an order of magnitude speedup to builds compared to the QEMU emulation.
Still a new project, not yet officially launched, and hosted services aren't for everyone, but exactly as you said, the status quo is amazingly painful.
You can add hosted arm GitHub runners or register arm hosts for docker and see down to earth build times.
In one case the devs were given the condition of getting their containers working on ARM to get the new MacBooks they wanted - and the cost savings of moving to ARM in cloud even subsidised the cost of them a bit too...
The prior goal was to mock production as closely as possible.
The realization is that macos as a host machine for orchestration is close enough to build. More strict validation can be done in CI and a staging env.
So for this project, the forced transition away from virtualbox Has actually led to simplification and asking questions about why it was “required” previously.
It is a bit of a pain only because some team members will need more support than others so the entire setup kind of needs to be clean and carefully documented when there is other stuff to do.
What do you do to manage language versioning?
I use Homebrew for Postgres where IME the version doesn't tend to matter too much as long as it's new enough.
Node is managed using either nodenv or asdf which both allow you to install multiple versions side-by-side and control which one runs in a given directory using a .node-version file containing the desired version number (I use asdf, most of my colleagues use nodenv - they're compatible with each other).
Hasura is the only one that's a bit of a pain as they don't provide native binaries at all (only a docker image). So we compile that from source. They do at least provide comprehensive instructions (https://github.com/hasura/graphql-engine/blob/master/server/...), and I didn't have too much trouble even though I'd never used Haskell before.
The sub-second restarts are totally worth it!
Our application is Gstreamer based, which means it uses highly optimized codecs that eventually render to OpenGL. I was very worried it wouldn't work on the M1.
It works flawlessly. Rosetta is amazing. I'm not an Apple fanboy at all but Apple has done an amazing job with M1 and this is true even though many applications are just running x86 code via Rosetta.
I like how ARM is progressing (I owned a second-batch RPi!), and M1 would probably be right for me if I wasn't a technical user, but it's simply too exhausting to fight the machine, architecture, package manager and product all at the same time. Docker is (and has been for a while) loathsome on Mac. Virtualization is usually pretty bad too, which makes regression-testing/experimentation much slower. I might give it another go if Asahi figures out GPU acceleration, but I'm not very hopeful regardless. The M series of CPUs doesn't really make sense to me as a dev machine unless you have a significant stake in the Apple ecosystem as a developer. Otherwise, it's a lovely little machine that I have next to no use-cases for.
> Any tips/tricks?
Here's one (slightly controversial) tip: next time you're setting up a new Mac, ditch Homebrew and use Nix. This is really only feasible if you've got a spacious boot drive (Nix stores routinely grow to be 70-80gb in size), but the return is a top-notch developer environment. The ARM uptake on Nix is still hit-or-miss, but a lot of my package management woes are solved instantly with it. It's got a great package repository, fantastic reproducability, hermetic builds and even ephemeral dev environments. The workflow is lovely, and it lets me mostly ignore all of the Mac-isms of MacOS.
The two pain points:
1. No support for running older virtualized macOS. I like to test back to 10.9 and need an Intel Mac to do that.
2. One Python wheel which doesn't have Apple Silicon builds and doesn't build cleanly: https://github.com/CoolProp/CoolProp/issues/2003
I mean in general, but they have also not released ARM instantclient or even an ARM version of Java. I think its crazy that I'm using Microsoft's version of ARM java.
I'm also using Windows 11 ARM in Parallels, which does seamless emulation of Oracle instantclient / Java / PL/SQL Developer. So most of my workflow has not been interrupted.
Still, just another excuse to move to a better database. Now all I have to do is convince our heavily bureaucratic IT department to move away from Oracle. It'll be easy, right?
[0] https://jdk.java.net/archive/
And here is instanclient for ARM: https://www.oracle.com/database/technologies/instant-client/...
Java has been available on ARM since the days of Nokia phone dominance. Not sure what you're referring to?
My philosophy on most things is: if nobody else has done it, I’ll go first. I started compiling and bundling my Go applications as multi-platform universal binaries for macOS.
Last week, I spent a few hours learning how to build multi-architecture Docker images, and push them into Artifactory. That knowledge came in handy yesterday when one of the developers on another team got a new M1 Mac and could no longer build his Docker images.
Over winter break, I started putting together a build matrix for compiling RPMs, DEBs, and Alpine APKs for some software that some developers were building as part of their CI pipeline. We’ve been curious about the ARM-based EC2 Graviton instances for a while, and I only had to update a handful of lines of code to begin building arm64 versions of those same packages.
In short, necessity is the mother of invention. I enjoy inventing things. If nobody else has started adding support for arm64 to your internal pipelines, then you should go first.
Even the x64 java8 SDK for macOS runs without a glitch, I mean how impressive is that, with JIT and everything? Mind blown.
I didn't even understand the point of the new macOS 13 ventura linux rosetta thing until I realized some people are still running x64 docker containers. (why, though?)
For testing container builds on developer machines most people are either using Docker on macOS which already handles multi-arch cleanly, or using buildah on Linux which also handles multi-arch automatically if you set up qemu binfmt support. So that has been pretty painless too.
I would say if you are doing a lot of horrible workarounds, it's probably time to step back and look at improving the processes (like your pipelines).
[1] https://github.com/GoogleContainerTools/kaniko#--customplatf...
The only issues I have ever really ran into were:
RKE had issues on arm early-on. Random containers didn't have arm image support. This went away quickly as an issue for me.
No nested virt. This one was painful for a few reasons, particularly when I was attempting to use the Canonical tooling to create preinstalled Ubuntu images, which I was doing in a vm via Multipass. Maybe M2/M3?
That's about it, really. I had to buy two Safari extensions when moving from Windows, but they were cheap and worth it (dark reader and some other one I can't remember rn)
I currently run Rancher Desktop every day as a replacement for Docker Desktop. Works spectacularly for me, and I can just not care about the environment. Just works.
I use Multipass when I need linux environments, and it's been spectacular.
Universal control has been the greatest enhancement in my workflow (and general daily use)
The main pain point with running linux on a laptop is finding a suitable pairing of the hardware and software so that everything works (device driver support, no bios/uefi/acpi bugs, etc).
Finding some good hardware to run linux only has to be done once maybe every 3-4 years and them you can just carbon copy the setup for all of your devs.
Heck, I will save you some work: the dell XPS 13 works great with the latest stable release of Ubuntu.
Does everything work? Special keys on the keyboard? GPU acceleration? Wifi? Going to sleep when you close the lid? Everything "just works" when you reopen the lid? Gestures on the trackpad?
For developers using VMs, Docker, multi-pass, etc I think it is more trouble than it is worth to jump on to the new shiny thing and invest time in workarounds that break on a new update. At least you weren't part of the November 2020 launch day chaos otherwise you would be waiting 6 months to do any work if you went all in on the M1.
Looks like Intel is (still) the way to go for VMs until Apple Silicon gets better (eventually).
Also, the post you linked is over a year old and the situation has changed since.
If you aren't ready to switch to ARM, consider Linux.
Yes. Exactly. It tells us that had the OP jumped all in to Apple Silicon since the day it launched, then they would have been waiting months to do their work. Little of the software from Intel was actually working in November 2020.
Thus, the sensible and smart action to do was wait and stick to Intel. By the time the software ecosystem caught up to Apple Silicon, the M2 Macbooks were announced meaning that they can upgrade directly to M2, skipping the M1 altogether with more working software than on release day.
For web development, I believe that Apple Silicon is really the place to be right now (especially if you also work on design projects!)
https://wiki.debian.org/CrossGrading https://www.qemu.org/docs/master/user/ https://asahilinux.org/
Most of the problems were foreseen because we had AIX and PowerPC systems in the past where we had to have multi arch pipelines already, I suppose most of the problems with the M1 were around monoculture setups that we see much more often around the world. Same architecture, same OS, everywhere. But that's actually much less 'normal' over the existence of computers than people think.
-occasional Postgres failures (i/o errors, especially with parallelization)
-kernel panics when connecting an external Sandisk ssd (known issue according to Apple forums)
It’s a shame because the machine is so much faster and energy efficient than my 16” intel MacBook Pro
Glad that the world is catching up a little but it’ll take time like anything else.
Biggest issue for me early on was android emulator, once an M1 version was released it was all easy going.
Not being able to run amd64 containers hit me hard. I fought it until I just gave in and made sure that everything we built could be built under amd64 or arm64. For specific builds on a specific architecture, GitHub action runner on a cloud box. (Or pick your flavor of CI/CD).
Once I looked past my machine into an ecosystem and embraced the arm as just another build artifact it was easier.
I also reject testing locally as a measure of working software. So that eliminates some pain. If your coverage is high then this is an easy shift. Have a dev environment that you can test that matches your assumed architecture, toolchain wise.
I have noticed that some apps can get "hangy," including Xcode, SourceTree, and Slack. I sometimes need to force-quit the system (force-quitting apps seems to now have about a 25% success rate). SourceTree also crashes a lot. A lot of this happened after I got my MBPMax14. I don't know if it would happen with any other machine.
These are not showstoppers (I've been having to force-quit for years. Has to do with the kind of code I write), but it is quite annoying. I have faith that these issues will get addressed.
And I never had any problems with it up until now. I use Chrome (Vivaldi) with tons of tabs and VS code with NodeJs and Java development and it was all snappy all the way
The main problem I had was at that time whether there will be application support for ARM and almost all the apps I use started supporting ARM as soon as the M1 came out
I only had to use Rosetta few times and NodeJS also started supporting ARM architecture as well
But next time I’ll be going for a higher RAM than 8gb for longevity
But I think I’ll be using this for couple more years and I think I’ll be skipping M2 since my M1 is good for now
The majority of Docker images that I use are available for ARM and the few that aren't perform fine under Docker for Mac emulation (although the big performance boost that I saw ultimately came from enabling VirtioFS accelerated directory sharing).
Just about all of the tools that I use are now available as universal binaries, but before that, Rosetta was utterly seamless.
I really can't complain.
I'm on my second m1 machine (m1 mba, now m1 max mbp), and I only had a few issues early on with terraform. My day to day software dev is web, go, and java.
Works great and I can move between a local and cloud servers depending on requirements
With good habits, it's rarely an issue anymore (though there is the occasional project when it turns out to be a hassle, usually something with an obscure node-gyp build).
If you rely on closed-source software it's a different story, I guess.
For actually creating multi-arch, I recommend you stay as far away as possible from Docker and use Podman and Buildah. The latter unbundles some of the Docker manifest commands, giving you far more control over how you create multi-arch images. I wasted 4 months on Docker tooling, and got it right in half a week with Podman. This meant switching from DCT (Podman doesn't support this at all) to Cosign, but Cosign is far more sensible than DCT.
There are a rare few containers that you can get away with running on x86.
You can run molecule against an ec2 instance or Docker containers. Since you can run x86_64 docker containers on Docker for Mac, you can continue to use molecule. I run molecule tests against Docker containers or LXD in the cloud though just because of how much faster they run on large Ec2 instances.
As for everything else, I haven't really noticed many issues. Most of the work I do is built through CI/CD pipelines so what I use locally to build doesn't affect what is deployed to production.
Maybe people here haven't lived through 68K to PPC migrations, or to DEC Alpha, or Sun SPARC to Intel, or PPC to Intel, or any number of platforms and platform shifts - some lasted longer than others, but all had their ups and downs. The largest 'down' was predatory business practices in the 80s and 90s, which set computing back a decade (and still apparently continues today). It's unfortunate that many of these FUD-type articles pop up whenever a new platform/chip is announced. I'm excited for technological progress and think that every new announcement is another small miracle that I'm happy to be around for.
I occasionally have to do exploratory processes where I have to figure out how to setup the same environment locally that my teammates are using. It can be time consuming, but overall I’m able to replicate it just fine. We’re far enough into the transition that most stuff is supported out of the box.
I admit I don’t know much about what’s going on under the hood. I used podman for containers so far.
Virtualization Framework’s VLAN support is not mature and getting more than 100 machines per rack has proven difficult. The need for additional switches, patch panels, uplinks and cooling makes multi-thousand machine installations slow due to the recent logistics unpleasantness.
Using Studios is hard because of massive delays to orders. Especially the ‘big’ machines in 1,000 unit quantities.
x86 and x86/GPU still seems to be the best approach for prod datacenter use.
Otherwise I am a fan
Almost perfect, but I did switch development tools from Xcode/Swift/SwiftUI -> VSCode/Dart/Flutter at the same time. So I am having a lot of problems! But nothing mush unexpected.
I copied my system over with timemachine. I think that a lot of binaries got copied that I should reinstall.
> none of our pipelines yet do multi-arch Docker builds, so everything we have is heavily x86-64 oriented
Another data point for the fundamental principal: Portability matters
Pros: - Setup is very simple. - It can run dozens of containers without overloading local machine. - Its stable. - SSL is working.
Cons: - I got issues with web sockets support. - Some times I get file conflicts.
I actually got ready solution for running remote docker with Mac but It need a bit of work. If someone would like to support project some front-end work, and a bit of docker/nginx work, please get in touch.
Everything was far easier than I expected it to be, the only issues I had was with installing python (a few cli Utils required it) but everything else has been smooth sailing and a much better experience than running things on my 2019 MBP
I’m not a huge docker user, but I run it for a few things and again, it was all smooth sailing.
In short it was painful but once you get over the attrition of compiling (mainly C) deps it's smooth sailing from there on out.
As far as I know, this has nothing to do with the M1 or ARM. This has always been the case. How else would you run Linux containers on a non-Linux OS?
0) still converting some stuff in Lineform. Shame there wasn't a 64-bit version before they stopped selling it.
Happy to be corrected if I am wrong.
So so glad, running plasma.
I also semi-professionaly use Photoshop, Sketch, DaVinci Resolve, XD, After Effects.
All butter smooth.
I had three-up before, and now I’m back to the laptop and one central display.
I could get a cheap DisplayLink hub but the performance is poor and I’m not happy with granting their driver screen recording permission. Or trusting it at all tbh.
For me, the performance and longevity I’ve been getting from a machine this light and without fans feels borderline unbelievable. Even now almost two years later.
I got an m1 right when they came out because I started a new gig right around that time, literally happened the same week. Trying to get all my dev tools installed became a rat's nest of issues. I work as a backend / dist sys / systems engineer for my day job and so I have to write and use things that are fairly close to bare-metal. Brew hadn't been forked yet, so that added a whole new layer of issues.
Docker still doesn't work, Rust libs compile in weird ways... just all kinds of stuff that I'm not smart enough or paid well enough to figure out. My title is "Developer", not "M1 developer advocate" so after about a month of running into issue after issue, I went back and found a used MBP with an intel chip. I'm excited about the future of Apple silicon, and ARM as a whole, but it needs another couple years of refinement.
I will say that I've been using an m1 mac mini for general office work as apart of my side business and it's quite good.
In my personal hobby stuff I do miss being able to virtualize x86 machines but have been able to get by with arm versions of Windows 11 and Linux running in parallels, and qemu for operating systems that don't have arm builds.
* Virtual VM's don't solve my problem everytime. There's software that still requires x86 and a VM isn't going to solve that problem in a few cases. I wish I could get into more details here but I'm kind of a noob in this realm. (TLDR: I need to use something called UAExpert and to resolve this, I have both a separate Linux machine and Windows machine in case I need it)
* Have to install homebrew and an x864 version of homebrew to run the right software. Homebrew does not document this so this solution was based off stack overflow posts.
* While docker states that it supports multiple architectures, I don't find that to be fully true. For our codebase, I need to push up x86 docker images but accidentally pushed up arm64 ones instead. There's a solution for it but it's definitely not an out-of-the-box solution at the moment.
Overall, still pretty happy with it. My older macbook pro had gotten sluggish so the tradeoff for me was worth it.
Installed Asahi Linux, it made possible to keep OS running all the time, keep HexChat IRC running, and not shutdown when away from keyboard like on macOS.
But that M1 did only last 4 days. Then it did not boot anymore. So I returned it to warranty repair, and canceled buying it.