I’ve fallen in love with everything about trellis except for one thing, it’s performance on windows.
After looking at other threads on the forum I’ve tried to enable nfs on windows by installing the vagrant-winnfsd plugin. Haven’t really noticed much of a performance increase from this, not sure if I need to run any reprovisioning commands to make this active? Is there a way to check if it’s active and working?
Looking at top in the VM I can see that a standard pageload on the wordpress site is easily chewing up 50-70% of the CPU on the VM via the php5-fpm process. Trying to do multitask with two wp-admin tabs open and the VM cpu easily hits 100%.
Is it worth bumping up the resources given to the VM? If so, does anyone have some recommendations?
I wouldn’t expect your CPU to get hammered so much as your disk. But I could be wrong.
Trellis by default attempts to set the VM to the same number of cores you have on your machine. But up until recently, it was setting VMs hosted by Windows to 2 cores.
What happens when you run vagrant ssh -c nproc? Does it display the number of cores you have on your computer?
Alternatively, if you have an Intel CPU, make sure that VT-x is enabled in your system’s BIOS/UEFI. (If you have an AMD CPU, you don’t have to worry about this; AMD-V is always enabled.)
So it looks like on windows the vagrantfile just uses the else statement for CPU cores (default 2). I’ve changed this to 4.
With regards the NFS I had incorrectly edited the VagrantFile so it wasn’t attempting to mount using nfs.
I’ve now run into an issue with winnfsd.exe crashing on vagrant up which I’m trying to troubleshoot.
Running vagrant up with a single site configured in wordpress_sites.yml works fine but trying to vagrant up with my full 3 sites currently configured causes a crash
My dev environment works fine, i used Trellis + Bedrock and a random premium theme (not sage for this project ;))
The problem is, when i click for going on another page (backend or frontend), it’s very slowly. Like 30 or 40 sec.
The theme is new with no content.
I have Windows 10 and SSD, Virtualbox 5.0.10, Vagrant 1.7.4, vagrant-bindfs, winnfsd, and hostsupdater up to date.
I can confirm. Changing the line in the Vagrantfile worked like a charm for me. Pages are now loading in about 2 seconds on my machine.
It’s important to make the change after shutting down the vm.
The only other step I needed to make it work was to install the vagrant WinNFSd plugin by running:
vagrant plugin install vagrant-winnfsd
The network settings in the Vagrantfile are also correctly set by default to work with NFS.