it's not really an improvement if you have to run your dev environment inside a VM, with the inconvenience of not having access to the files in the host.
Improve Docker performance on macOS by 20x
11–18 of 18 posts
Re: Improve Docker performance on macOS by 20x
#12Can you retest with experimental virtualization enabled? At least on my M1 this boosted performance a LOT (in addition to using gRPC FUSE mounts, as a other commenter also posted)
Re: Improve Docker performance on macOS by 20x
#13it's not really an improvement if you have to run your dev environment inside a VM, with the inconvenience of not having access to the files in the host.
I use ssh and vim so it works for me, but agreed it doesn't work for everyone.
The biggest issue I've found with this kind of setup is that file change events from the host don't cascade to the virtual machine using VirtualBox's shared folders. NFS handles this better (still seconds delay based on cache values) but that is then a problem for Windows users.
It's been a few years since I switched to using Linux natively so my knowledge on Docker for Desktop Mac mount strategies may be out of date, but at one point docker introduced options such as :cached and :delegated which can have a considerable improvement to container file access speeds. Additionally, I've heard of people using mutagen and nfs for significant improvements, but I've never tried that setup. Here's a long discussion about it: https://github.com/docker/for-mac/issues/1592#issuecomment-6...
Re: Improve Docker performance on macOS by 20x
#14Earlier quoted context omitted.
I use ssh and vim so it works for me, but agreed it doesn't work for everyone.
From looking over your Vagrantfile it looks like the project files are mounted from the host into the VM so ssh would only be required for tunneling to the db connection? (Although that can also be avoided by exposing a port or using bridged networking). The biggest issue I've found with this kind of setup is that file change events from the host don't cascade to the virtual machine using VirtualBox's shared folders.…
As you said (and others in comments) bidirectional syncing with docker-rsync, or using NFS, is one way to have files synchronising but it always ends up being a pain.
I did use cached and delegated but it's nowhere near close to the ideal solution: removing macOS of the equation. At least until Docker find a real fix for those performance issues, if anytime.
Re: Improve Docker performance on macOS by 20x
#15See: https://medium.com/@sean.handley/how-to-set-up-docker-for-ma...
Re: Improve Docker performance on macOS by 20x
#16Maybe a dumb question, but are they running M1 with the ARM version of Docker & Ruby? I imagine it’s probably difficult to accidentally get the AMD64 version, but I didn’t see that detail in the benchmark
author here. M1 was running arm images, but as far as I know Docker Desktop on M1 use Qemu which is super slow anyway.
Re: Improve Docker performance on macOS by 20x
#17Can you retest with experimental virtualization enabled? At least on my M1 this boosted performance a LOT (in addition to using gRPC FUSE mounts, as a other commenter also posted)
Re: Improve Docker performance on macOS by 20x
#18Hate its popularity at my job.. it’s fine if you want to use it for a tech stack in the background like a db or cloud emulation.. but call me old fashioned I think if you’re walking around calling yourself a software engineer, loading up software and tools is part of the job.