Has anyone been able to solve the filesystem performance issues with mounted volumes on OSX?
Iām running time du -d0
in some directory, and my baseline (on the host) is this:
> time du -d0
117496 .
________________________________________________________
Executed in 87.45 millis fish external
usr time 7.43 millis 88.00 micros 7.34 millis
sys time 75.34 millis 735.00 micros 74.60 millis
When doing that inside a container, on a mounted volume:
> docker run -ti --rm -v $PWD:$PWD -w $PWD alpine:3.11 time du -d0
58748 .
real 0m 6.42s
user 0m 0.06s
sys 0m 0.29s
After reading this, I also tried the :cached
and :delegated
options, to no avail:
> docker run -ti --rm -v $PWD:$PWD:cached -w $PWD alpine:3.11 time du -d0
58748 .
real 0m 6.09s
user 0m 0.06s
sys 0m 0.36s
> docker run -ti --rm -v $PWD:$PWD:delegated -w $PWD alpine:3.11 time du -d0
58748 .
real 0m 5.28s
user 0m 0.06s
sys 0m 0.49s
Tested on: macOS Catalina 10.15.6 Docker desktop 2.3.0.4 Docker engine: 19.03.12