druphpet
druphpet copied to clipboard
Better performance with NFS shared folder
By using the application cachefilesd it's posibble to get performance on NFS shared folder by caching lots of NFS calls.
To install it: sudo apt-get install cachefilesd sudo echo "RUN=yes" > /etc/default/cachefilesd
This cache for NFS must be also enabled in Vagrantfile too: config.vm.synced_folder "#{folder['source']}", "#{folder['target']}", id: "#{i}", type: 'nfs', mount_options: ['rw', 'vers=3', 'udp', 'fsc']
PS: I have read somewhere else than using udp instead of tcp is faster for NFS. Not sure about this one.
To check the benefit of this app with the NFS windows plugin for Vagrant, just add this line to vagrantfile, which will log all NFS calls:
config.winnfsd.logging = 'on'
I just tested new settings for NFS, it's just bluffing ! I just added those 2 settings : 'nocto', 'actimeo=3600' to the mount_options. So the complete line is: config.vm.synced_folder "#{folder['source']}", "#{folder['target']}", id: "#{i}", type: 'nfs', mount_options: ['rw', 'vers=3', 'udp', 'nocto', 'actimeo=3600', 'fsc'] Now the second time i use a file I don't have anymore "NFS GETADDR" requests on all drupal files ! It's just blazzing fast. all my pages are loading in less than 200ms in logged in mode. In anonymous mode it's just instant :-) But I have to test this mode more further, to see if it's not blocking in development phase. Drush dl a_module is working as expected in SSH.