Hacker News new | past | comments | ask | show | jobs | submit login
The Apple M1, ARM/x86 Linux Virtualization, and Boinc (2021) (sevarg.net)
98 points by behnamoh on May 23, 2022 | hide | past | favorite | 75 comments



(Author here)

Just a reminder, this article was published in Jan 2021, I'd had the M1 Mac Mini for about a month, and virtualization was still very rough around the edges. My understanding of the state of it today is that it's far better, with VMWare and such having actual working products for it (the very early beta was out, and it wasn't very good).

The Speedometer numbers are a bit suspect, it turns out that some of the browser extensions were impacting performance more than I realized, so the "raw" speed is a bit higher on the M1 than I was reporting. However, I stand by my point that it's a properly quick little Linux VM.

Unfortunately, I no longer have the M1, so I can't provide any current comparisons. Apple went in some directions I'm not OK with and I've stopped using their stuff pretty much entirely.


Any documentation about how to install homebrew that does not remind the user to run the commands to disable its embedded Google spyware is incomplete.


Link? I didn't include those instructions because I'm not aware of the issue. I'm first and foremost a Linux user when it comes to building stuff, hence my interest in having a hot little ARM VM on the M1. I tended to keep my Macs back when I used them (see another reply for details) rather "clean" in terms of what was installed, so this was the first time I'd had to mess with Homebrew.



> Unfortunately, I no longer have the M1, so I can't provide any current comparisons. Apple went in some directions I'm not OK with and I've stopped using their stuff pretty much entirely.

As a non-Apple user considering an M1 myself, I'm curious what you mean by this


You can find some other posts on my blog relating to it - https://www.sevarg.net/2022/05/07/tech-philosophy-2022/ is one such.

I'd been somewhat uncomfortable with some of the decisions Apple has been making for a while, mostly related to China. The "iCloud in China" thing in which Apple gave the keys to iCloud in China to the CCP (you can spin it how you wish, but from my point of view, if you've given a Chinese company physical access to the servers, you've granted everything on those servers to the CCP, regardless of how much you go on about keeping the encryption keys yourself) was one issue, the treatment of workers was another. They've supply chained themselves into a corner called China, and are now entirely subject to the whims of the Chinese government, under the "Nice factories, it'd be a shame if something were to happen to those agreements you've got!" logic.

So I was considering what I wanted to do, and then they went down the whole on-device CSAM scanning path, complete with the internal email sharing the quote from a third party talking about crushing the "shrieking voices of the minority" who would dare oppose this obviously good thing. That, which I've also written about (doing some experiments in what it takes to change the hash and such), was a giant leap too far for me. I'm not OK with so overtly turning my devices against me with a system that has clearly not seen the slightest bit of adversarial analysis ("How can this be abused?").

Apple hasn't actually forced it out that we know of, but to borrow the punchline from a joke, "Well, we know what kind of company you are, now we're just haggling about timing" (https://quoteinvestigator.com/2012/03/07/haggling/). They built up quite a "privacy capital" credit with their actions in the debate with the FBI over backdoors, and appear to have decided it was worth burning it all down over the CSAM scanning, which they've yet to deploy.

So I've de-Appled my life quite substantially. I swapped from using an iPhone as my daily driver phone to a KaiOS Flip IV (wrote about that if you're curious on my blog), I sold the M1 and LG 5k monitor with it at a rather substantial loss, I don't use the iPad for anything anymore except ForeFlight (aviation software), I picked up a Kobo Elipsa for PDF reference for work to replace the iPad/Goodreader combo, and I've generally de-Appled my life as a result of their actions.

It leaves me lurking in the weeds of Linux on ARM small board computers (a weird hobby of mine, but they're quite capable these days if you understand their limits), and Qubes on x86, though I've not entirely purged legacy Linux because I do enjoy Kerbal Space Program and Minecraft on occasion, as do my kids.

The M1 Mac Mini was, for the time I had it, the best computer I'd used. It was blisteringly fast, and despite only 16GB RAM, didn't feel like it - you could just keep throwing workloads at it and it would chew through them, only occasionally spinning the fan above idle. The GPU was solid, the CPU performance was world class, and the entire experience, even running x86 binaries, just worked.

The M1 MacBook Pro is literally exactly what I want in a laptop. A slab sided machine with a set of useful ports, blisteringly fast ARM CPU, battery life for days, and having abandoned the abomination that the Ive era keyboard was (thin for the sake of thin, functionality be damned). And I will never own one at this point, because I cannot trust Apple anymore not to turn my hardware against me anymore.

So, I'm working out how to do my computing on far less. My daily driver laptop is a PineBook Pro, which is... adequate for my needs, if I'm willing to redefine my needs into "That which the PBP can do." Same for most of my desktops being weird little gutless ARM boxes anymore. Spotify won't run on ARM/Linux? Fine, ncspot it is. Etc.

Anyway, I don't expect a lot of other people to agree with this path or to take similar actions (though I wish many would), but I simply couldn't be as strongly against Apple's CSAM proposal as I was and continue using their products. And having cracked that box open, we now see the EU proposals that expand drastically on what Apple has done, "because clearly it can be done, nerd harder to solve it!"

... I don't actually like consumer tech and what we've done with computers very much anymore, if it hasn't come through.


Thank you for such an honest and in-depth reply. The CSAM stuff was definitely one of my biggest issues with Apple as well. It felt like none of their other privacy efforts really mattered if they were willing to backdoor the device itself. It turned me off to their products as well. And your blog post had a lot of good points about Microsoft and Intel as well. There really is nobody left eh?

One of the alternatives I'm looking at is to just use the laptop as a thin client and offloading heavy tasks to a home server. Still can't be too thin a client, just in case I have poor network, but it seems like one of the best ways to get portability + privacy + power nowadays. But I'm also trying to be careful to do proper threat modeling [1] so that I don't burn out, as the rabbit hole goes very deep.

Overall it's great to hear from others that they are able to de-Apple their lives, it makes me think maybe I don't really need that M1 after all :) Though it's true that the direction of personal devices and the war on computing [2] is rather disheartening.

[1]: https://www.privacyguides.org/basics/threat-modeling/

[2]: https://boingboing.net/2011/12/27/the-coming-war-on-general-...


> But I'm also trying to be careful to do proper threat modeling [1] so that I don't burn out, as the rabbit hole goes very deep.

I have never been applefied, but my exit from google and meta is also a statement (that I wish more people would do). Think of it as putting your money (or rather privacy) where your mouth is.

As nice there devices seems to be, they are never perfect either (see complaints about the keyboard) and it is fairly easy to de-Apple. The same is much harder for Google and in some regions meta, mostly of whatsapp.


> There really is nobody left eh?

Linux, on the most open hardware you can find? That's about all I'm willing to use anymore, and if that closes, I'll find something else to do with my life. I keep coming back to, "I cannot defend modern consumer electronics from any ethical starting point I pick." They're built on the backs of slave labor, using materials extracted in "What toxic sludge pile about to collapse?" conditions, used to extract behavioral data for tech overlord profits (I've never been a tech overlord, but I certainly have worked for some of those companies over the years), and then get burned in third world countries when they're artificially obsoleted because you ought to buy a new one for more profits. Yay?

> Still can't be too thin a client, just in case I have poor network, but it seems like one of the best ways to get portability + privacy + power nowadays.

It depends what you're doing, but I don't really need much power "on the go" in my life anymore. The PineBook Pro is remarkably useful for portable light use, and at $200 and "way more open hardware than anything x86 or Apple," it's not a bad little system. It's also quite repariable, though they're less durable than I'd really prefer.

> But I'm also trying to be careful to do proper threat modeling [1] so that I don't burn out, as the rabbit hole goes very deep.

The rabbit hole goes very deep indeed. The threat modeling is hard when the very foundations of modern computing (process isolation) are cracked and crumbling. If you told someone that VMs were a hard isolation boundary in the Haswell days, you'd have been quite wrong (L1TF). You just wouldn't have known it for a few years yet. The burnout is real, and I'm not convinced it's a bad thing, really. There are a lot of deep technical types I know in my general peer group (call it "mid 30s to mid 40s, have grown up with this stuff, have done it professionally their entire post-college lives") who more and more want no part of what we call consumer electronics, and are doing things like "buying plots of fruit trees" and "no longer carrying smartphones." There will be an entire group of "gentleman farmers who run oddly Amish-seeming farms" in the next decade, and they'll be former security and low level tech types.

The threat modeling from a security perspective is hard, but from a behavioral surplus perspective, it's simple enough: "If there is a way something can be collected, it is being collected. If you can't envision a way something can be collected, odds are very good that someone smarter than you has been paid very well to figure out how to collect it anyway."

Buy some Field Notes pocket notebooks, carry those instead of a smartphone. I now regularly go out for entire days without a cell phone on me, and with a mechanical watch. It's nice, and I suggest getting in the habit.

> it makes me think maybe I don't really need that M1 after all

Vote with your wallet. If you object to Apple's CSAM stuff with your words, and buy a M1 with your actions, you don't really object that much - actions speaking louder than words and all.

The forum attached to my blog has a small collection of people working through this stuff as well. You're quite welcome to join there!


> Linux, in hardware virtualization on the M1, is fast. Like, vastly, hugely, mind-bogglingly fast. Absolutely useful for anything that “needs Linux” on a M1, and very likely the fastest Linux machine you can get right now for single threaded work.

Author seems to be basing this from their results of https://browserbench.org/Speedometer2.0/ :

* M1 - Chrome on macOS: 127

* M1 - Chrome on Linux via QEMU: 160

I just ran the benchmark on my framework laptop (2021 version - 11th Gen Intel® Core™ i7-1185G7)

* Framework - Chrome on Windows 11: 138

* Framework - Chrome on Linux (manjaro): 160


Those numbers look like they run Intel Chrome on the M1 Mac. The Universal Chrome binary gets close to 300 on an M1 Mac.


I think the issue is improvements to Chrome since the article was published.

Regardless the takeaway that "M1, and very likely the fastest Linux machine you can get right now for single threaded work." is conjecture.

If someone can benchmark chrome on asahi linux it would give us a better comparison.


(Author of the article)

> Jan 9, 2021

Asahi Linux literally wasn't a thing when I wrote the article.

I fully expect my conclusions from over a year ago, when the M1 first was available and virtualization was rough around the edges, to "not remain accurate."


Tried it on my 14" M1 Pro (10-core) now, got 264 on native Chrome and 286 on Safari.

EDIT: noticed the author's comment saying extensions may lower the performance, so tested again in raw chrome and got 304.


Have seen linux machines with cheaper hardware than the M1 getting a lot higher scores on Speedometer


Another question is - do you want to carry multiple notebook or just 1 machine do it all.


Things have improved a lot since this article was written. Running Linux VMs on an M1 Mac is easier than ever. Homebrew Qemu and UTM work out of the box. UTM also supports bridged networking. I haven’t had a chance to try it myself, but I believe libvirt also works now without doing anything special.


I have installed Ubuntu Server 20.04 on a M1 Max on UTM and it was the fastest linux installation ever by an order of magnitude! I tried the x86 version with UTM but got a crash. Highly recommended!!


I should have been clear in my original comment that I was referring to virtualization, i.e. ARM Linux guests.


I was using UTM yesterday and it works great vor ARM vm's. x86 is to slow to use. Like, opening firefox takes 10 minutes.

Not sure where that goes wrong yet. Or if qemu emulation is just that slow. This article suggests it could be better

EDIT: nevermind, misread/understood the post. x86 code is fast, x86 emulation is not. It works, but is hardly usable.


Why not just SSH into a significantly more capable machine and enjoy two days between battery charges instead?

(AMD just got done with their 5nm Zen 4 Computex keynote right now)

https://www.anandtech.com/show/17399/amd-ryzen-7000-announce...


I SSH into a local XEON server homelab, or one of several Hetzner servers over Wireguard (which runs in a Proxmox container). Symmetrical 1gbit fiber connection helps. Only disadvantage is that it doesnt work on (long) flights.

For me, MacBook Air M1 is just a "dumb terminal", with VSCode and its remove development server it doesnt matter where all the stuff is.


My only problem with this is that Apple form factors/OS choices are limited.

I want a tablet dumb terminal because:

- when I'm working I'm plugged into a monitor 99% of the time (with dedicated keyboard/mouse) - when I'm traveling/consuming media/couch surfing/shopping with wife - tablet is much more convenient

But I can't really use iOS for work - iPad pro would be perfect otherwise.


"when I'm traveling/consuming media/couch surfing/shopping with wife - tablet is much more convenient"

I hear people say this but I really disagree. I have never found a tablet more convenient.

With a tablet you either have to hold it up with one hand, while you use your other hand to navigate, or you have some sort of case with a built-in stand that is never as stabile as a laptop. You also have to be very careful holding the tablet, because otherwise you'll touch the screen and unintentionally open or close the app you're using. Also when you use a case with a tablet it often makes it as heavy as an actual laptop.

Not to mention all the keyboard shortcuts that make navigating the OS faster than a touch-based OS. I just don't really "get" tablets. I've tried iPads and Android tablets but I always grab my laptop instead.


I feel like a Samsung tablet would work really well there. DeX for your desktop work with Termux and the like and Android for the rest. I know people say Android has no tablet apps and while it's definitely missing stuff like Procreate it is still good for web browsing, watching streaming services etc. And Samsung's version of Android is very good at multitasking allowing things like having 4 apps running split screen, windowed apps etc. Way better than what iOS allows.


I'd still miss a "proper" OS - for example I can't run IntelliJ remote development client on Android. It's sad that Windows is so bad at this point, and Linux tablet support was 0 last time I checked.


There is the JingPad A1 at least. A ChromeOS tablet might be another avenue as well.


I've actually seen some students use ChromeOS for development but haven't thought much about it. Do you know if there are some decent ChromeOS 2in1s ?


The store is down.. :(


I’ve been using an iPad Pro with the blink shell app for almost a whole year now. I just use mosh to connect to my homelab development environment, and it works really great!

But yeah, if work doesn’t quite fit with just needing a terminal, and a few web sites or iOS apps, then it’s not going to work.


I’ve been looking into buying Surface Pro, but the battery is somewhat disappointing. And then there’s Windows. I’ve been using it on my gaming machine and i don’t enjoy a single minute of it.

But yeah, I wish there’s was a good 2 in 1 as well.


Yeah - using Windows 11 on my desktop for the last month or so - it's downright ridiculous what it devolved to


> Only disadvantage is that it doesnt work on (long) flights.

mosh?


> For me, MacBook Air M1 is just a "dumb terminal"

A $1000 dumb terminal? Wouldn't a cheaper laptop be perfectly sufficient then? Or, if the performance is not that important, something like an asus laptop with an oled, pro-motion, higher res, ... screen (same price)?


Gotto go through this again?

- Battery life - Trackpad - No keyboard flex - Superb screen and superb handling of the high dpi - M1 is superior to anything intel or Amd.

It's not fanboy'ism it is what it is.


Read the above post again? You are arguing about an entirely different question.

> M1 is superior to anything intel or Amd.

Agreed, but the above post explicitly said "dumb terminal" -> not relevant.

> Superb screen and superb handling of the high dpi

Again, yeah, but "dumb terminal" and 120Hz, oled, more pixels, ... is better. Normally you could argue that the M1 makes it worth the trade off, but if that is not in consideration....

> It's not fanboy'ism it is what it is.

Yeah,... so please stop that. Again "macbook air is a good laptop" is pretty uncontroversial; "For a dumb terminal the macbook air is the best/natural/../adjective choice", maybe, maybe not.


Okay I'll bite. Does that machine exist? You linked to a CPU page, not a machine-with-two-day-battery-life page.


I think GP meant to say that one could use a VM running on that CPU (e.g. EC2) and SSH into it with an M1 (which might provide up to 2 days of battery when used that way).


Aaaahaaaa thank you.


Because then you need two machines :)


its like when people bought two ipads to multitask XD

Ah, Apple life.


This isn’t an Apple thing, it’s a “laws of physics” thing. The parent is suggesting that you do your intensive computing on a computer that isn’t battery powered so as to prolong your laptop’s battery between charges. “Apple life” in this case is having two days between charges rather than a few hours.


When did that happen?

Asking as an iPad owner.


It doesn’t matter whether it happened or not. The comment says something some people want to hear.


Well the data will need to move with you. Not very feasible if you need the whole media library / codebase to be transported via cellular all the time. I understand the appeal when you just need terminal access tho.


I can’t think of a reason you’d need to pull your whole media library. Usually it’s just whatever show you want to watch. As for code, it’s typically small, and you can either pull incremental diffs a la git or you just do everything on your server so you don’t have to pull anything to your client at all.


Because you can buy an M1 Mac today.

By the time this Ryzen CPU appears in a real PC you can buy, the next-gen Apple Silicon Macs will have arrived, and they will be several years ahead of this Ryzen.


> Because you can buy an M1 Mac today

You can order one today. I'm still waiting for mine I ordered in March.


I had this exact struggle. Got hit by the delays a couple weeks ago, and got frustrated, cancelled my order, put in another order because I was minorly desperate to get the hardware for a new job, then discovered B&H not only was getting the exact config I wanted in stock, they had a waiting list that I could use to temporarily reserve one. Got the email early in the AM, logged in that day and my hold was still there, and was able to check out without hassle. 2 days later, new laptop in my hot little hands.


You can buy one today… if you’re willing to settle for bare minimum RAM & disk.


Just looked at my local electronics store's website, they have multiple 32GB RAM 14" Pro and 16" Pro models available for pick up.


Just checked and this is true for 14 and 16 inch MacBook Pros and Studios. Mini, and Air ship quickly, even with additionally ram or storage.


...but you better don’t settle for a minimum RAM if you are buying it not just for web surfing.


Memory management on M1 is actually quite amazing. With an entry level M1 mini, I can have a crap ton of stuff open and it doesn’t choke. I can run UTM and have Chrome and a few electron apps open, and have many terminal windows open. No sweat.

For disk, I just put a 1tb NVMe in an external USBC enclosure, cuz most of my data doesn’t need crazy I/O and I feel like Apple charges too much for disk space.


I own one M1 with 8Gb RAM, one with 16Gb, and one with 32 - 8Gb was enough only for basic tasks (I’m a web developer, TS + Rust). Anything non-trivial was causing swapping.

Memory management is quite usual, nothing magical. The disk is faster, but it's not the reason to rely on swapping, still.


That just isn't true on these M1 machines. People are editing 4k, 6k, even 8k video on these and have stated that it runs better than their 2020 16GB i9 MacBooks.


There is no magic, and “unified memory” just means that you need some more memory because you have no additional “VRAM”.


What’s the entry level spec for RAM? Like 8GB? That’s plenty for most things. I’d be more worried about disk.


16. I have an M1 Mac mini under the desk that has been doing more than fine for most of my development work on 8 GB of RAM.


Also there is more to a laptop than just its CPU. Doesn't matter how great the Ryzen processor is if they can't get laptop manufacturers to put them into great laptops.


GP is proposing using Macbook as thin client to Ryzen build server. Laptop cpu is never loaded hence 2 day battery life, performance is better on anything benefiting from significant parallelization. I use same workflow with 5950X[0], works great.

[0] https://www.hetzner.com/dedicated-rootserver/ax101


Quite interesting, would linux running on quemu give a better experience than asahi linux ?


Yea I also want to know, I love linux and mac-hardware (almost any generation, tbh)


Are you asking if virtualization is worse than not using it?


It will take a while before we get Linux GPU drivers for M1, and if even if we do, it will be buggy.

So running Linux on QEMU with a virtualized GPU should provide a better experience than using CPU rendering or buggy drivers for most day-to-day tasks like browsing the web.


Why do you assume they will be buggy? Marcan is really good at these things, I guess time will tell.


It's worth noting that emulating x86 linux on M1 macs with qemu still sucks pretty bad. This was an important use case for me that I basically gave up on and got an EC2 instance, in addition to buying a couple more spare x86 machines.


Since the article at least seems to be saying the opposite, can you give some specifics about just how it sucks?


But the article is not saying the opposite. It praises a virtualization. About an emulation it says "while I’m not going to call it “fast,” it’s not utterly unusable either."


Virtualization of arm linux seems to work fine. Virtualization of x86 linux is very slow.


I'm currently using VMware fusion (tech preview) and Vagrant (with the free vmware plugin) to spin up several Ubuntu VMs in my new (got it last week!) Mac M1. So far so good, although sometimes I need to restart the vmware thingy because it may not assign the custom private ip addresses I define in my Vagrantfile. One needs a Vagrantbox for Ubuntu arm (you either can trust one of the uploaded ones in Vagrant cloud or bake yours using Packer or similar tooling).

Nice thing about this setup is that it's all free (just like I used to have when using Intel and Virtualbox).


Interesting claims on emulation. Perhaps a custom qemu build is in order. I’ve tried running a x86 linux on UTM yesterday and it was to slow to even boot before I gave up.

I’ve entirely give up on doing x86 docker builds for the same reason..


Was this satire at the time?

Genuinely asking as its comparing a cheap pos system to a new one that's 6x the price and then playing a game that happily runs on a Core 2 Duo with 4Gb of ram.


Kerbal Space Program does not "happily" run on a core 2 duo with 4gb of ram lol. It's a very intensive game once you make anything even remotely complex.


The KSP reference, probably not well expanded, was in comparison to the 2018 Intel Mac Mini I had previously, which basically could not play it - it was barely livable with graphics turned all the way down, because Intel Integrated Graphics on that era Mac Mini suck (I don't think it even had the eDRAM cache).

KSP ran fine on my 2014 iMac with discrete graphics. It absolutely did not run acceptably on the 2018 Mac Mini, and it ran wonderfully on the ARM M1.

But, no, the post was not satire. Not sure why you would think it was. It was trying to, very soon after the M1 came out, work out some concrete ways to do Linux VMs and such, and playing with performance.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: