Ever since I discovered OrbStack, my M1 has become the perfect laptop for me. OrbStack has great UX, massive FS performance, Docker & Kubernetes support, and a bunch of really clever people behind it. Everyone doing linux development on a Mac should try it
It's really good but the fs caching has bit me a couple times before I realized what was going on.
Development on Apple Silicon with UTM
61–70 of 76 posts
Re: Development on Apple Silicon with UTM
#62Ever since I discovered OrbStack, my M1 has become the perfect laptop for me. OrbStack has great UX, massive FS performance, Docker & Kubernetes support, and a bunch of really clever people behind it. Everyone doing linux development on a Mac should try it
Re: Development on Apple Silicon with UTM
#63Earlier quoted context omitted.
UTM uses Rosetta via qemu. It’s the most direct way of emulating x86 on Apple Silicon, using native Apple emulation layer.
Then you're emulating everything that runs in the VM, as opposed to using an ARM vm and only emulating the x86 program you want to run. This makes things a lot slower.
I would like to see a benchmark of these various methods…
Re: Development on Apple Silicon with UTM
#64Ever since I discovered OrbStack, my M1 has become the perfect laptop for me. OrbStack has great UX, massive FS performance, Docker & Kubernetes support, and a bunch of really clever people behind it. Everyone doing linux development on a Mac should try it
I'm interested in an up-to-date comparison when running the VM with Rosetta 2:
colima start --vm-type=vz --vz-rosetta
⁽¹⁾ https://github.com/abiosoft/colimaEdit to add: While researching OrbStack, I found this comment in a post from 7 months ago that mirrors a lot about my experience with Colima: https://news.ycombinator.com/item?id=41424044
Re: Development on Apple Silicon with UTM
#65Earlier quoted context omitted.
> The issue is that of course Apple computers that are large enough to run VMs are… expensive. Expensive compared to what? UTM uses Apple Virtualization Framework, which lets the guest VM only occupy as much memory as it's actually using (instead of reserving all of its available memory). This means it's viable to run a Linux VM on e.g. an 8GB RAM MacBook Air.
How can I verify that? it definitely looks in htop and Activity Monitor that the RAM is occupied and unavailable. Maybe memory compression helps, but it doesn’t appear so to me right now.
Good question. I was speaking from memory, and all I can find when googling is this: https://docs.getutm.app/settings-apple/virtualization/#ballo...
EDIT: I recall vaguely something about it being a problem with Linux guest VMs because it aggressively uses RAM as a file system cache. So it'll just fill up RAM to the max when reading from disk, and overwrite this if it's later needed by applications.
Re: Development on Apple Silicon with UTM
#66Earlier quoted context omitted.
Building on a virtual x86_64 barely achieves the performance when building on host, if there was an applicable way.
Fair enough, but (speaking as a web developer), running a stack locally on Apple Silicon (especially if it has any "interesting" dependencies such as compiled Rust/C libs and whatnot) and expecting the same stack to run identically in the cloud on x64 can still expose differential behavior At the very least, I could test mock deploys from the Apple Silicon side to the x64 VM running locally (over loopback) as an extr…
Re: Development on Apple Silicon with UTM
#67Earlier quoted context omitted.
With virtualisation you can use Rosetta 2 for Linux to run x86_64 binaries. That's what I do and it's more efficient.
UTM uses Rosetta via qemu. It’s the most direct way of emulating x86 on Apple Silicon, using native Apple emulation layer.
Re: Development on Apple Silicon with UTM
#68Earlier quoted context omitted.
> My thought was why use UTM? Most of this can be achieved with qemu alone :) qemu needs to be studied a bit, UTM is fairly intuitive. I recently decided to learn how to create VMs with bare qemu (using the command-line). As I have an arm macbook for work, UTM helped me a ton with aarch64 virtual machines because I could enable debug log and see what qemu options/flags/switches would UTM use. Unrelated: I have some i…
Here is some advice: Theoretically the entire docker workflow can be translated to VMs. In practice it is a shit show. The biggest problem by far is building a VM image, because it consists of multiple highly irritating steps. 1. Building custom packages for the target distribution. Since we aren't using containers, we would in principle need a full VM per application. This is not a good idea in practice. We want to…
Re: Development on Apple Silicon with UTM
#69Re: Development on Apple Silicon with UTM
#70Ever since I discovered OrbStack, my M1 has become the perfect laptop for me. OrbStack has great UX, massive FS performance, Docker & Kubernetes support, and a bunch of really clever people behind it. Everyone doing linux development on a Mac should try it
What are the real-world benefits over Colima?⁽¹⁾ (Besides having a GUI, which I can do without.) I'm interested in an up-to-date comparison when running the VM with Rosetta 2: colima start --vm-type=vz --vz-rosetta ⁽¹⁾ https://github.com/abiosoft/colima Edit to add: While researching OrbStack, I found this comment in a post from 7 months ago that mirrors a lot about my experience with Colima: https://news.ycombinator…