File access in mounted volumes extremely slow
continued from https://forums.docker.com/t/file-access-in-mounted-volumes-extremely-slow-cpu-bound/8076/178
Expected behavior
File-system performance in the container not significantly slower than on the host or docker-machine.
Actual behavior
Running a composer (PHP) update in a container takes much longer than on the host. In the container we usually hit timeouts when updating huge git repos like twbs/bootstrap.
Information & Steps to reproduce the behavior
See link above
Same for npm install, bundle install, browserify, etc.
Hi
Ok, that's why a Symfony application is very slow in a Docker container! I load a page in ~ 150 ms when I'm running my local Symfony server (on my host) VS ~ 2000 ms when the config files have been serialized in the cache directory within a Docker container. It seems the IO in the vendors and the cache / logs directories are very slow...
Same here with rails and its friends (rails, rake, rspec...)
Please let me know what information I can provide to help you guys out.
Same here as well. We're looking into using IntelliJ IDEA and git on the Mac and compiling & running our product in a container, from the shared filesystem. Development cycles are considerably longer and our devs not happy with the proposed switch. Currently evaluating workarounds to still enable the switch to Docker and in particular Docker for Mac.
For those who look for a workaround and didn't read the whole thread, here is the solution : https://github.com/EugenMayer/docker-sync
Same with PHP (Symfony, Nette, Composer deps...). I can confirm https://github.com/EugenMayer/docker-sync is usable workaround.
We're experiencing this as well. We have our API dockerized and sometimes endpoints time out on our local machines (only in docker for mac). We're using Rails 5.
In my team, some developers use a Mac, others use Linux... Docker sync is not the solution for me because the project configuration will not be the same for all environments. I hope that the OSXFS issues will be fixed quickly.
@MartialGeek Off topic : https://github.com/EugenMayer/docker-sync/wiki/Keep-you-docker-compose.yml-portable But you should create a makefile to handle the environment properly.
@wadjeroudi Thank you, I will read that ASAP ;)
Same issue here, takes +30 sec to run my babel build using a mounted volume vs. 5 sec using container's fs.
👍 Same issue with Git in docker, very slow ! Unusable compare to Docker Machine (with NFS) Docker For Mac released too fast ! Need to be reviews !!!
Whole team is having issues with Magento, 3 minute page loads vs 8 seconds using docker-sync
I'm also experiencing this issue. Hitting the cache takes no less than 1 second for each file.
Will this issue eventually be addressed?
Here's the latest reply from Docker Team: https://forums.docker.com/t/file-access-in-mounted-volumes-extremely-slow-cpu-bound/8076/158
It's been quite a while since then. We all hope that they have something new to share.
Just checked on latest Docker for Mac update : Version 1.12.1 (build: 12133)
seems to be still an issue.
Latest posts on the alternatives are interesting - https://forums.docker.com/t/alternatives-to-osxfs-performant-shares-under-osx/19565/14 - which points to https://github.com/cweagans/docker-bg-sync (minimal changes to compose file for developer allow a significant speed improvement for mounted source files)
Yeah, I've gone the UNISON approach (also mentioned a couple times in the original thread) : see here https://github.com/4AllDigital/DockerDrupal-lite/blob/master/docker-compose.yml#L7
using this container : https://github.com/4AllDigital/drupaldev-unison
if anyone needs an example to copy and want to use UNISON too.
Same issue with Magento. Major performance issues. We are moving to Unison now as well.