Slow vagrant box, how to improve this? Slow vagrant box, how to improve this? symfony symfony

Slow vagrant box, how to improve this?


Late to the game. For newcomers there are 2 plugins which will increase the speed of the vagrant box right of the bat.

vagrant-cachier

InstallationMake sure you have Vagrant 1.4+ and run: vagrant plugin install vagrant-cachier

Vagrant-faster

vagrant plugin install vagrant-faster

I'm also using MySQL-tuner-perl which is quite good for MySQL fine tuning.

I hope it helps


You need also to don't share vendor folder between host and vagrant, if you are doing that. Because reading of shared files are slow. Take look at this link. In order to do that you will need to change composer.json file inside you symfony2 project :

"config": {  ...,  "vendor-dir": "/some_new_location/vendor"},

and also change app/autoload.php.

$loader = require '/some_new_location/vendor/autoload.php';

After doing that run composer install.

There are also some resources for reading :

  1. http://www.erikaheidi.com/blog/optimizing-symfony-applications-on-vagrant-boxes/
  2. http://www.whitewashing.de/2013/08/19/speedup_symfony2_on_vagrant_boxes.html
  3. Symfony2 Slow Initialization Time


If you work with Phpstorm you can use deployement module to syncing files from base machine to virtual

Then every change on local machine will upload file to virtual machine. This will shoot up your performance. I tried a lot of solutions, but every was not enough for me such as. move cache folder away, unshare vendor folder...