NFS on Homestead 2.0

Published 2 years ago by freekmurze

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?

Best Answer (As Selected By freekmurze)
noeldiaz

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
floristenhove

Wondering the same!

noeldiaz

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
heihachi88

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

sudo apt-get install nfs-kernel-server

fabiandev

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

lucasvscn

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

slave2anubis

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!

mixa_ru

Thanks @slave2anubis !

Sign In or create a forum account to participate in this discussion.