VirtioFS is not enabled by default as per documentation, cannot be enabled on the UX and fails if enabled manually

Docker for Mac has serious performance problems causing 10x times response times due to its VM.

My system

  • MAC OS Sonoma 14.0 (23A344)
  • Docker Desktop for Mac 4.37.1 (178610)

VirtioFS is present online and referenced as a possible solution. As per documentation

Change settings | Docker Docs.

VirtioFS is only available for macOS 12.5 and later, and is turned on by default.

However, checking configuration this does not seem to be true.

 cat ~/Library/Group\ Containers/group.com.docker/settings.json | grep irtio
  "useVirtualizationFrameworkVirtioFS": false,

So i changed it

“useVirtualizationFramework”: true,
“useVirtualizationFrameworkVirtioFS”: true, // i tried this alone first but yields the same result

And then i get this result … docker just doesnts work.

docker pull node:lts
lts: Pulling from library/node
Digest: sha256:0e910f435308c36ea60b4cfd7b80208044d77a074d16b768a81901ce938a62dc
Status: Image is up to date for node:lts
docker.io/library/node:lts

What's next:
    View a summary of image vulnerabilities and recommendations → docker scout quickview node:lts
export UID && docker-compose run --rm node npm install
[+] Running 1/1
 ✔ node Pulled                                                                                                                                                         3.4s 
Error response from daemon: {"message":"No such image: node:lts"}

Note the overall objective is for Docker to perform on Mac as closely as possible to how it does natively on linux where i dont have all these problems but I still think documentation should be also consistent and provide correct guidance,

Any suggestions welcome…

What do you mean by “cannot be enabled on the UX”?

If you can’t switch to Apple Virtualization framework, then maybe there is some features that work only with the current setting. The legacy QEMU and Docker VMM don’t support virtiofs. (Docker VMM supposed to be faster, but I haven’t tested enough to see the difference)

I see that useVirtualizationFramework is set in your json, but it the json contains another setting incompatible with it, it could be reset to false or just ignored.

Either way, I don’t know why any of the settings would have the result you experience. The image should be available regardless of which virtualization method you use. Maybe there is something wrong with the compose file. Can you start the container without compose from the same image?

The compose file is fine, you can see it here wix-app-template-custom-shipping-rates/docker-compose.yml at dockerised · bizmate/wix-app-template-custom-shipping-rates · GitHub - notice i use make to run docker compose commands, but i managed to find the VirtioFS thanks to your screenshot. I could not find it before as i thought, based on docs/other posts on forums, it was supposed to be in the experimental section.

I think the error i experienced before was something weird. I had to undo the flag changes i made and close and open Docker Desktop again, a restart would not fix it.

Despite enabling VirtioFS i still do not see a great deal of improvement TBH
This is the timing it takes to call the http://localhost:3000/dashboard resource

  • on Mac with VirtioFS node-1 | ✓ Compiled /dashboard in 25.5s (10316 modules)
  • on ubuntu node-1 | ✓ Compiled /dashboard in 3.1s (10316 modules)

Also in the config it still shows "useVirtualizationFrameworkVirtioFS": false, despite being selected in the UX config (saved, I have event closed it and opened it again, not just a restart)

The difference is massive, others have suggested Orbstack but if i can fix these problems with Desktop I rather avoid it

What about Docker VMM? Was that the previous method you used? Docker VMM is supposed to make IO operations faster: Virtual Machine Manager | Docker Docs

Docker Desktop also has a file sync feature: Synchronized file shares | Docker Docs
But that requires a PRO subscription.

Accessing files in a folder mounted from the phyiscal host into a virtual machine will always be slower than just mounting a file from the same host into a container’s mount namespace.

So I guess you either use the default named volumes ans store the data in the virtual machine directly, or synchronize the files so the copied files will be used in the VM.

The previous setting for the virtualisation was Hyperkit. I am not sure why but VMM is not enabled on my Mac, it is an intel Air, just before M chips were released.I have installed OrbStack but dont see a great difference in compile perfomance there too … i ll have to test a bit further

Then because Docker VMM is only available for Apple Silicon. I guess I always forget that macOS is not only for the M series since my first Mac was with an M1 :slight_smile:

So you don’t have many options. A named volume would mean the data is in the VM, so you won’t see it on the host (unless you mace it availabl through network fileshare for example) or use the synchronized file share which requires a pro subscription and which has other limitations (listed in the documentation)

Or depending on whether you need the Desktop features or not, you can try to simply create a virtual machine and install Docker CE in it.

You can also try searching for similar issues on GitHub assuming this is a “bug” or just a topic discussed before. I’m not sure how the hardware is supported. I know about the OS support, but you have a recent major version. Maybe you can try to update to a newer minor version?

This topic was automatically closed 10 days after the last reply. New replies are no longer allowed.