docker / for-mac

Bug reports for Docker Desktop for Mac
https://www.docker.com/products/docker#/mac
2.44k stars 118 forks source link

VirtioFS vs gRPC FUSE performance on Ventura 13.1 #6667

Open gulios opened 1 year ago

gulios commented 1 year ago

macOs: 13.1 CPU: 2,4 GHz 8-Core Intel Core i9 Docker: 4.15.0 (93002)

I've been using "VirtioFS" with "Use Virtualization framework" but i saw that simple requests from Laravel project takes a lot of time. e.g simple routing to API takes ~0.8s When i switched it to "gRPC FUSE" and turned off "Use Virtualization framework" average time is ~0.07s so it looks like ~10 times faster than VirtioFS.

I've reinstalled docker, checked it many times and every time gRPC FUSE is faster than VirtioFS. Checked on different laptops with Intel CPU with same results. Read many blogs/news and VirtioFS should be the fastest option, right ?

gulios commented 1 year ago

same behaviour different machine

macOs: 12.6.2 (21G320) proc: 2,2 GHz Quad-Core Intel Core i7 Docker Desktop 4.15.0 (93002)

melcarthus commented 1 year ago

Strange, I found that gRPC FUSE was a little bit slower (only 60ms) vs VirtoFS, VirtoFS gave me te best performance on the latest MacOS Ventura after a complete format op my drive and fresh install of MacOs. I installed all programs manually and installed everything I needed for local development, so no time-machine backups whatsoever, I am not experiencing slower performance, nor faster, on VirtuoFS really...

But before it WAS slower. MacOs really did not do my MacBook Pro a solid after upgrading from Big Sur to Monterey to Ventura...

kevincerro commented 1 year ago

I've encountered this issue after upgrading to Docker 4.15.0 I'm using previous version (4.14.1) because VirtioFS with "Use Virtualization framework" works better (at least for me)

carvemerson commented 1 year ago

I get a macBook pro M1 recently, and honestly, this docker performance is unbelivable. :( I was expecting more from docker and mac. It is 5 times more SLOW than my old computer with linux. Hope that something is comming in a near future...

macOs: 13.1 docker: v4.15.0

carvemerson commented 1 year ago

With the lastest version of docker (4.16.1) they introduced a new beta feature that improved a lot the speed. Give a try with the gRPC FUSE and virtualization enabled.

gulios commented 1 year ago

With the lastest version of docker (4.16.1) they introduced a new beta feature that improved a lot the speed. Give a try with the gRPC FUSE and virtualization enabled.

I've upgraded to latest 4.16.1 (95567) and gRPC FUSE + virtualization enabled is similar(a little faster) than 4.15.0 (93002) VirtioFS still not usable.

kkevindev commented 1 year ago

Haven't seen any noticeable difference between gRPC FUSE (+Use Virtualization framework) and VirtioFS with Docker version 4.16.1 on a Apple M1 Pro + macOS Ventura 13.0.1. Both seem to have about the same speed.

petri-lipponen-movesense commented 1 year ago

I'm experiencing the same with Docker for mac 4.15 and higher. Tested my c++ builds and the 4.16.2 is 4x slower than 4.14.1 (even though 4.14.1 was tested after clean docker install and 4.16 after multiple runs filling caches).

Macbook Pro quad core i7 with Ventura 13.0.1

ps. either is much slower than Linux or Windows...

olosegres commented 1 year ago

VirtioFS doing good, my webpack build is much faster with VirtioFS

gRPC FUSE - 42 sec VirtioFS - 7 sec

Ventura 13.2, Docker 4.16.2 M1 Max

docker-robott commented 1 year ago

There hasn't been any activity on this issue for a long time. If the problem is still relevant, mark the issue as fresh with a /remove-lifecycle stale comment. If not, this issue will be closed in 30 days.

Prevent issues from auto-closing with a /lifecycle frozen comment.

/lifecycle stale

kevincerro commented 1 year ago

/remove-lifecycle stale

aytigra commented 1 year ago

When VirtioFS is enabled it adds severe slowdown on web requests to the server(puma) running on Docker. Judging by the server logs It adds ~600ms to the processing time, like a lag, usually at the beginning of the request, but sometimes in the middle of it. With gRPC FUSE there is no such lag.

M1 pro laptop, Ventura 13.3.1, Docker 4.19

amok commented 1 year ago

In my case VirtioFS performs faster then gRPC FUSE, but

When VirtioFS is enabled it adds severe slowdown on web requests ... ~600ms to the processing time, like a lag, usually at the beginning of the request,

I confirm this too @aytigra

Tested on NextJS 13

So on gRPC FUSE fs watch (hot reload) is slower then on VirtioFS and on VirtioFS page reload is slower 😢

M1 Air 16gb Ventura 13.4 Kernel: 22.5.0 Docker 4.19.0

BjoAce commented 1 year ago

I had to go to gRPC Fuse because NGINGX Proxy Manager had a problem on my M2. With VIrtoFS: nginx-proxy-manager | sed: couldn't open temporary file /data/nginx/proxy_host/sedPqIE2H: Permission denied With gRPC it runs fine. VirtoFS somehow caused temp files were no-one (000) had access and root user ownership. User ID and group id ENVs weren't obeyed.

xAqweRx commented 1 year ago

Still a problem with Ventura 13.5 (22G74)

gulios commented 1 year ago

macOs: 13.5.1 CPU: 2,4 GHz 8-Core Intel Core i9 Docker 4.22.0 (117440)

Checked today VirtioFS + Use Virtualization framework and now it seems to be faster that gRPC FUSE Didn't check changelog between 4.15<>4.22 but definitely something has changed in plus.

ebuildy commented 8 months ago

I had to go to gRPC Fuse because NGINGX Proxy Manager had a problem on my M2. With VIrtoFS: nginx-proxy-manager | sed: couldn't open temporary file /data/nginx/proxy_host/sedPqIE2H: Permission denied With gRPC it runs fine. VirtoFS somehow caused temp files were no-one (000) had access and root user ownership. User ID and group id ENVs weren't obeyed.

Well you should never share temporary / cache files from container with the host FS!

jacktsin1 commented 4 weeks ago

macOs: 13.5.1 CPU: 2,4 GHz 8-Core Intel Core i9 Docker 4.22.0 (117440)

Checked today VirtioFS + Use Virtualization framework and now it seems to be faster that gRPC FUSE Didn't check changelog between 4.15<>4.22 but definitely something has changed in plus.

The same MacBook, VirtioFS was abusing my Mackbook's CPU so hard to the point where I couldn't concentrate due to the noise of the fans...

Checked with EtreCheck to find what the issue was, and I found out that with Virtualization Framework enabled, together with VirtioFS my machine was indeed abused:

Top Processes Snapshot by CPU:
    Process (count) CPU (Source - Location)
    com.apple.Virtualization.VirtualMachine 809.96 % (Apple)
    com.docker.backend (2) 137.16 % (Docker Inc)

I changed to gRPC FUSE and restarted docker and the noise left for good. Regarding performance, the difference is not noticeable so I won't run checks for an in-depth comparison, but gRPC also feels faster.