freekmurze's avatar

NFS on Homestead 2.0

Hi,

why did Taylor not choose for enabling nfs by default on Homestead 2.0. For almost all projects the performance is greatly improved when using nfs.

What is the cleanest way to enable nfs on Homestead 2.0?

0 likes
7 replies
noeldiaz's avatar
Level 23

I wondered the same thing, but then found out you just need to add "type: nfs" to your folder definition like so:

folders:
    - map: ~/Code/Template
      to: /home/vagrant/Code/template
      type: nfs
10 likes
AlexanderKim's avatar

Also, if u're on Ubuntu then you have to install nfs daemon:

sudo apt-get install nfs-kernel-server

3 likes
fabiandev's avatar

Thanks guys, I was wondering the same and my response time went down from 700ms to 50ms after enabling nfs.

lucasvscn's avatar

NFS is not a option with Windows hosts, so that's the reason why Homestead doesn't come with NFS enabled by default ;)

slave2anubis's avatar

I have found that there is a big nfs performance problem with Homestead 2.0 and Ubuntu 16.04. It is slow as hell, over 20 minutes for a Laravel composer install... I have found the problem, and share it with you here: You need to add o the Homestead.yaml file under the type: nfs options: linux__nfs_options: ['async','rw','no_subtree_check','all_squash']

The important part is the 'async' option!

1 like

Please or to participate in this conversation.