VMWare virtual machine mounts Homestead NFS for maintenance of old projects (based on Brophp)

environment:

Laravel/homestead + winnfsd

VMWare workstation

background:

As we all know, when Homestead is successfully configured for development on windows, in order to solve the IO efficiency of the file system, the vagrant-winnfsd plug-in is installed.

After experiments, the speed improvement of the Laravel project is relatively obvious, and each request will not exceed 200ms. However, the running speed of old projects based on Brophp is still as slow as a snail. If the old project code is copied into the Vmware virtual machine to run, the speed is normal. Judging from this: it is still a problem of IO efficiency.

To sum up, in order to maintain the old Brophp project, try to mount NFS in the VMWare virtual machine.

step:

1 Start vagrant

$ vagrant up

2 View the relevant information from the server NFS exports in the VMware virtual machine

AppWeb:/home/leo# showmount -e 192.168.245.1
Export list for 192.168.245.1:
/C/Users/leo/Code *

3 Mount

AppWeb:/home/leo# mount -t nfs -o vers=3 192.168.245.1:/C/Users/leo/Code /var/www/app

Check the mount status,

AppWeb:/home/leo# mount -l|grep 192
192.168.245.1:/C/Users/leo/Code on /var/www/app type nfs (rw,relatime,vers=3,rsize=32768,wsize=32768,namlen=255,hard,proto=tcp,timeo=600,retrans=2,sec=sys,mountaddr=192.168.245.1,mountvers=3,mountport=1058,mountproto=udp,local_lock=none,addr=192.168.245.1)

So far, the mount is successful!

Tested to be much faster than on a VirtualBox virtual machine.

Guess you like

Origin http://43.154.161.224:23101/article/api/json?id=324975519&siteId=291194637