-
-
Notifications
You must be signed in to change notification settings - Fork 4
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Try NFS or another Docker sync solution for faster performance #22
Comments
I first edited my NFS exports file:
I added the following line:
(When I saved the file macOS popped a permissions prompt which I had to accept to allow Terminal access to write to this file.) I also edited my NFS config file:
I added the following line:
Then I restarted
Then I added the following to my ---
version: '3'
services:
drupal:
[...]
volumes:
- 'nfsmount:/var/www/html'
volumes:
nfs:
driver: local
driver_opts:
type: nfs
o: addr=host.docker.internal,rw,nolock,hard,nointr,nfsvers=3
device: ":${PWD}"
To my Note that I have my project in Some of this info I picked up from this gist and it's comments, especially the comment from egobude about the changes required for Catalina. |
The first time I tried this I got:
So I dug through docker/for-mac#2965, and tried a suggestion or two. None worked, so I went ahead and completely reset Docker for Mac to factory defaults. This took a few minutes, but after it was done, I tried again. |
I'm still not getting anywhere with the above error. Tried |
Got things working, we'll see how this does! |
NFS makes for a lot better performance. More than 2x faster in all benchmarks in #18... Going to compare to docker-sync next. Need to figure out if I can get the same |
Commit/branch above is for NFS support. Probably won't pass CI though — yet. Testing docker-bg-sync now. |
With
|
Now trying docker-sync. First I installed it on my Mac:
Then I added a ---
version: "2"
options:
compose-file-path: 'docker-compose.yml'
verbose: false
max_attempt: 5
project_root: 'pwd'
syncs:
docker-sync:
sync_strategy: 'native_osx'
src: './'
host_disk_mount_mode: 'cached' And I set the drupal container volume like so: volumes:
- docker-sync:/var/www/html:nocopy And added volumes:
docker-sync:
external: true It took 2 min 15 sec on the first run to sync everything. Testing performance now. |
Performance is on par with bg-sync and NFS... NFS is by far the least intrusive (besides |
Issue #22: Use NFS for local mount for better performance.
I tried a bunch of different local environments in #18, and found that Drupal VM was the fastest all-around, but had some inconveniences compared to my current setup.
So now I would like to see if I can get things running (both locally and in CI) using an NFS native mount (see https://www.firehydrant.io/blog/nfs-with-docker-on-macos-catalina/), or using docker-sync or something like that:
The text was updated successfully, but these errors were encountered: