Speed up your Vagrant NFS mount
When mounting a project folder with a +1000 files (i.e. git repository), file access can become really slow. There are some easy fixes to speed things up.
mount_options
Add the following mount_options
on your synced folder in your Vagrantfile
vers=3
specifies version 3 of the NFS protocol to usetcp
specifies for the NFS mount to use the TCP protocol.fsc
will make NFS use FS-Cacheactimeo=2
absolute time for which file and directory entries are kept in the file-attribute cache after an update
cachefilesd
Install cachefilesd, a Linux service that caches NFS file access.1
extra: Sublime Text 3
A default setting in Sublime Text 3 can also create an issue.
Turning off atomic_save did the trick for me.
Sublime Text > Preferences > Settings > User
-
I only tested this on Ubuntu 14.04 ↩
Thanks for reading
Feel free to leave a comment if you have remarks or like this post