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.
Add the following
mount_options on your synced folder in your
vers=3specifies version 3 of the NFS protocol to use
tcpspecifies for the NFS mount to use the TCP protocol.
fscwill make NFS use FS-Cache
actimeo=2absolute time for which file and directory entries are kept in the file-attribute cache after an update
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