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

Update NFS configuration to improve download speed #250

Closed
gitressa opened this Issue Aug 29, 2016 · 4 comments

Comments

Projects
None yet
2 participants
@gitressa

gitressa commented Aug 29, 2016

When downloading projects with many files using NFS synced folders, the process can get really slow. I found a page with some suggestions (https://www.jverdeyen.be/vagrant/speedup-vagrant-nfs/) and adding those settings made it a lot faster:

OLD, SLOW CONFIG
config.vm.synced_folder ".", "/var/www", :nfs => { :mount_options => ["dmode=777","fmode=666"] }

FASTER CONFIG
config.vm.synced_folder ".", "/var/www", :nfs => { :mount_options => ["dmode=777","fmode=666", 'vers=3', 'tcp', 'fsc' ,'actimeo=2'] }

@whatnickcodes

This comment has been minimized.

Member

whatnickcodes commented May 15, 2017

Nice! Let me look into this. If I don't add this to the actual Vagrantfile, I'll add it to the docs

@gitressa

This comment has been minimized.

gitressa commented May 15, 2017

I am very much looking forward to the new Scotchbox, thanks a lot for working on it!

I just did some benchmarking with some standard Drupal commands, and adding those parameters don't seem to make much difference, so perhaps it's better to just leave the Vagrantfile as it is?

ORIGINAL config.vm.synced_folder
config.vm.synced_folder ".", "/var/www", :nfs => { :mount_options => ["dmode=777","fmode=666"] }
$ drush dl drupal --debug
Returned from hook drush_pm_download [100.45 sec, 10.36 MB][debug]
Command dispatch complete [100.45 sec, 10.32 MB]

$ drush dl redirect --debug
Returned from hook drush_pm_download [1.05 sec, 11.7 MB][debug]
Command dispatch complete [1.05 sec, 11.66 MB]

$ rm drupal-8.3.2/ -rf
9 sekunder

config.vm.synced_folder with vers and tcp
config.vm.synced_folder ".", "/var/www", :nfs => { :mount_options => ["dmode=777","fmode=666", 'vers=3', 'tcp', 'fsc' ,'actimeo=2'] }
$ drush dl drupal --debug
Returned from hook drush_pm_download [97.76 sec, 10.36 MB] [debug]
Command dispatch complete [97.77 sec, 10.32 MB] [notice]

$ drush dl redirect --debug
Returned from hook drush_pm_download [1.29 sec, 11.7 MB] [debug]
Command dispatch complete [1.29 sec, 11.66 MB]

$ rm drupal-8.3.2/ -rf
14 seconds

@whatnickcodes

This comment has been minimized.

Member

whatnickcodes commented May 15, 2017

Nice. Can you explain though what your config is differently? Like what the params do?

The most important thing for Scotch Box to work on as many systems out of the box as possible. Just want to make sure

@gitressa

This comment has been minimized.

gitressa commented May 15, 2017

My config is just the default, so with parameters I just meant the unnecessary 'vers=3', 'tcp', 'fsc' ,'actimeo=2' from below. Sorry if I wasn't clear about that.

config.vm.synced_folder ".", "/var/www", :nfs => { :mount_options => ["dmode=777","fmode=666", 'vers=3', 'tcp', 'fsc' ,'actimeo=2'] }

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment