3 ms·
I'm curious why file system performance from the VM through the hypervisor to the host is so slow on macOS. Is this some sort of fundamental limitation or is it
by bradgessler 3y ago
I'm curious why file system performance from the VM through the hypervisor to the host is so slow on macOS. Is this some sort of fundamental limitation or is it a case of "Apple hasn't made this a priority"?
My knowledge could be out of date and maybe this is fixed, but I've tried using Docker on macOS and it's almost unusable for dev environments with lots of files because of the file system performance.
- JonathonW 3y agoHow recently have you tried it? The current best-performance option for bind mounts in Docker Desktop on macOS (VirtioFS, using Hypervisor.framework) didn't become the default until June (for new installs) or September (for existing installs), and wasn't available at all prior to December 2022.
- bradgessler 3y agoI haven't tried it on a large project recently. How good is it?
- 9dev 3y agoBetter, but still a pain. Nothing compared to running Docker on Linux.
- ithkuil 3y agoBut docker on Linux doesn't involve any virtualization whatsoever so filesystem performance is 100% native
- jbverschoor 3y agoHave you tried OrbStack?
- omederos 3y agoDid you have VirtioFS enabled when you tried it?
- rtpg 3y agoFile performance in itself isn’t bad per se, but keeping two file trees in sync is a mess with Docker because every file operation needs to be duplicated or something. There’s some async stuff as well but ultimately most programs meant for Linux assume file access to be super fast so any sort of intermediate steps end up being slow (see also: git on Windows being dog slow) You want super speedy docker on Mac? Run docker _inside_ a Linux vm. Even better, just use Linux!
- alanfranz 3y agoCross-OS fs performance is a problem, especially latency wise. It’s the same with parallels, virtualbox, vmware, across just any fs. Or, you can have problems with hardlinks as well. I personally use mutagen to sync host and vm and it works great.