Closed ianrobertdouglas closed 7 years ago
Maybe the vagrant-faster plugin is creating conflicts with the modifyvm VirtualBox options? You could try disabling the plugin and editing the Vagrantfile for the same allocated memory and cores.
I've got similar performance problems (my www/
dir has around 40GB). I'm currently testing one of possible solutions and it seems to do the job (everything works now as fast as I expect). Try to enable nfs
for your www/
dir. Change:
config.vm.synced_folder "www/", "/srv/www/", :owner => "www-data", :mount_options => [ "dmode=775", "fmode=774" ]
To:
config.vm.synced_folder "www/", "/srv/www/", nfs: true
This solution may have some drawbacks which I'm not aware of but for now it's really nice change.
@jmarceli I believe the only real drawback of this is that it doesn't work on Windows. It's specific to OSX and can be installed on Linux.
So it seems to be perfect solution :)
In addition to the other suggestions here, I found that turning off XDebug saved about 2500ms
from each request, which sucks, because I love XDebug.
I was hoping that setting xdebug.remote_autostart
or even xdebug.remote_enable
to 0
would fix it, but it didn't. None of the other settings helped, either.
I was hoping that setting xdebug.remote_autostart or even xdebug.remote_enable to 0 would fix it, but it didn't. None of the other settings helped, either.
Er, actually, that may still be it, but I'm having some trouble with it and can't test reliably right now. I'll have to spend some more time to figure out for sure.
Resetting the following XDebug values to their defaults seemed to help performance.
xdebug.collect_params = 0
xdebug.remote_autostart = 0
xdebug.var_display_max_children = 128
xdebug.var_display_max_data = 512
xdebug.var_display_max_depth = 3
Switching to NFS for the www
share also helped. I initially ran into the caching problems alluded to in other VVV issues, but tweaking the mount options seems to have solved that.
rsync is another option for shares, and it's a bit faster than NFS, but it's annoying because you have to manually run vagrant rsync-auto
while editing files.
This is a good related read for when using vagrant
commands - https://jaco.by/2016/05/05/slow-vagrant/
Turning off xdebug.profiler_enable
, if you've got it in for any reason, will also make a big difference.
This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.
I've been struggling for a few months with horrible performance, including lagging of up to a few minutes on page loads and sometimes total failure. It's also random, with bottlenecks arising for no particular reason, it seems. I hope to resolve this. I have around 25 domains (i.e., Wordpress projects) working under VVV. Vagrant-hostsupdater plugin is installed, along with vvv-site-wizard which I use to create new projects. I also use vagrant-faster to set memory to 4 cores and around 4GB RAM. Maybe it's the number of projects I have archived under VVV, or the size of the resulting VM (around 3GB). Or other VMs I have (I've been trying other boxes too, for performance sake), though I try not to run them at the same time. I'm on a Macbook Pro with 16GB RAM. I've tried several things from advice I could find online on improving Vagrant performance. This is my current VVV Vagrantfile:
Can anyone see a problem there, or advise how to troubleshoot this?