So is there some canonical guide to running a docker compose style app on Mac m1 machines that has good filesystem performance? It seems like there’s many ways to approach the topic now so it’s hard to tell which one is “winning”. I’d love to containerize all of my local development efforts (scripts and rails apps) but the slow ass filesystem always ruined it in the past.
LXD containers on macOS at near-native speeds
41–50 of 134 posts
Re: LXD containers on macOS at near-native speeds
#42Earlier quoted context omitted.
Wait, what? QEMU can pass x86 instructions directly to Rosetta without emulating an entire host OS?
No, QEMU runs an ARM VM. Inside that VM, Rosetta for Linux can be used to run x86 executables, just like on macOS.
it's still surprising to me that they did this as i always got the sense that developer word of mouth helped drive a lot of macbook adoption in the 2000s.
Re: LXD containers on macOS at near-native speeds
#43This is good news. I come from the development background and the number one use case of containers on macOS is development enviroments, as on Windows too. For this use case, file system IO has always been bottleneck, not CPU. I do not know if there is some silver bullet in the horizon that could make this faster.
I am personally slowly moving back to Docker after having used limactl for a long time. It's just a pain in the ass.
A Linux laptop is better for all intents and purposes, except the shitty battery life...
Re: LXD containers on macOS at near-native speeds
#44Does QEMU emulate the CPU on macOS?
Re: LXD containers on macOS at near-native speeds
#45Earlier quoted context omitted.
Not if you’re running x86 emulation on an ARM host. It’s terribly slow. EDIT: This is from experience. When I started using a M1 mac, our docker builds on x86 images took up to 5x or 10x longer vs running on an arm64 image. Had slightly faster, but similar results running my own docker host on Lima, or podman, or building without docker inside a UTM host which also uses qemu.
No, it's decent performance. Minimum 25% of native, and even more using Rosetta: https://news.ycombinator.com/item?id=32149080
Re: LXD containers on macOS at near-native speeds
#46So is there some canonical guide to running a docker compose style app on Mac m1 machines that has good filesystem performance? It seems like there’s many ways to approach the topic now so it’s hard to tell which one is “winning”. I’d love to containerize all of my local development efforts (scripts and rails apps) but the slow ass filesystem always ruined it in the past.
They all use the underlying OS hypervisor so I’m not sure you can get perceivable performance out of one solution over the other.
Re: LXD containers on macOS at near-native speeds
#47Re: LXD containers on macOS at near-native speeds
#48Earlier quoted context omitted.
Depends. QEMU can use Apple's Hypervisor virtualization framework to run ARM64 operating systems on Apple Silicon without emulation. It seems to be possible to then use Rosetta 2 to run x64-code on those operating systems.
Can confirm this works, but some applications will be slow. Seen a magnitude of difference with x86 JVM containers between Rosetta 2 and native ARM64.
Re: LXD containers on macOS at near-native speeds
#49So is there some canonical guide to running a docker compose style app on Mac m1 machines that has good filesystem performance? It seems like there’s many ways to approach the topic now so it’s hard to tell which one is “winning”. I’d love to containerize all of my local development efforts (scripts and rails apps) but the slow ass filesystem always ruined it in the past.
I believe multipass uses SSHFS (https://discourse.ubuntu.com/t/how-to-improve-mounts-perform...) to mount filesystems between the host and the VM. Performance has been excellent.
Re: LXD containers on macOS at near-native speeds
#50So is there some canonical guide to running a docker compose style app on Mac m1 machines that has good filesystem performance? It seems like there’s many ways to approach the topic now so it’s hard to tell which one is “winning”. I’d love to containerize all of my local development efforts (scripts and rails apps) but the slow ass filesystem always ruined it in the past.
Lately I’ve been trying https://devenv.sh/ and it works great!
I haven’t tried it for ruby, though I have used vanilla nix shell for ruby projects before and it worked quite well after I over-rode GEM_PATH and GEM_HOME to the correct values.