{"action":"created","issue":{"url":"https://api.github.com/repos/Varying-Vagrant-Vagrants/VVV/issues/741","labels_url":"https://api.github.com/repos/Varying-Vagrant-Vagrants/VVV/issues/741/labels{/name}","comments_url":"https://api.github.com/repos/Varying-Vagrant-Vagrants/VVV/issues/741/comments","events_url":"https://api.github.com/repos/Varying-Vagrant-Vagrants/VVV/issues/741/events","html_url":"https://github.com/Varying-Vagrant-Vagrants/VVV/issues/741","id":105307407,"number":741,"title":"painfully slow in everything","user":{"login":"ianrobertdouglas","id":1595541,"avatar_url":"https://avatars.githubusercontent.com/u/1595541?v=3","gravatar_id":"","url":"https://api.github.com/users/ianrobertdouglas","html_url":"https://github.com/ianrobertdouglas","followers_url":"https://api.github.com/users/ianrobertdouglas/followers","following_url":"https://api.github.com/users/ianrobertdouglas/following{/other_user}","gists_url":"https://api.github.com/users/ianrobertdouglas/gists{/gist_id}","starred_url":"https://api.github.com/users/ianrobertdouglas/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ianrobertdouglas/subscriptions","organizations_url":"https://api.github.com/users/ianrobertdouglas/orgs","repos_url":"https://api.github.com/users/ianrobertdouglas/repos","events_url":"https://api.github.com/users/ianrobertdouglas/events{/privacy}","received_events_url":"https://api.github.com/users/ianrobertdouglas/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/Varying-Vagrant-Vagrants/VVV/labels/question","name":"question","color":"cc317c"}],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":4,"created_at":"2015-09-08T05:58:51Z","updated_at":"2015-12-15T16:04:12Z","closed_at":null,"body":"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:\r\n\r\n    # -*- mode: ruby -*-\r\n    # vi: set ft=ruby :\r\n    \r\n    vagrant_dir = File.expand_path(File.dirname(__FILE__))\r\n    \r\n    Vagrant.configure(\"2\") do |config|\r\n    \r\n      # Store the current version of Vagrant for use in conditionals when dealing\r\n      # with possible backward compatible issues.\r\n      vagrant_version = Vagrant::VERSION.sub(/^v/, '')\r\n    \r\n      # Configurations from 1.0.x can be placed in Vagrant 1.1.x specs like the following.\r\n      config.vm.provider :virtualbox do |v|\r\n        v.customize [\"modifyvm\", :id, \"--memory\", 2048]\r\n        v.customize [\"modifyvm\", :id, \"--cpus\", 2]\r\n        v.customize [\"modifyvm\", :id, \"--natdnshostresolver1\", \"on\"]\r\n        v.customize [\"modifyvm\", :id, \"--natdnsproxy1\", \"on\"]\r\n    \r\n        # Set the box name in VirtualBox to match the working directory.\r\n        vvv_pwd = Dir.pwd\r\n        v.name = File.basename(vvv_pwd)\r\n      end\r\n    \r\n      # Configuration options for the Parallels provider.\r\n      config.vm.provider :parallels do |v|\r\n        v.update_guest_tools = true\r\n        v.optimize_power_consumption = false\r\n        v.memory = 1024\r\n        v.cpus = 1\r\n      end\r\n    \r\n      # Configuration options for the VMware Fusion provider.\r\n      config.vm.provider :vmware_fusion do |v|\r\n        v.vmx[\"memsize\"] = \"1024\"\r\n        v.vmx[\"numvcpus\"] = \"1\"\r\n      end\r\n    \r\n      # Vagrant provision caching.\r\n      Vagrant.configure(\"2\") do |config|\r\n      config.vm.box = 'ubuntu/trusty64'\r\n      if Vagrant.has_plugin?(\"vagrant-cachier\")\r\n        # Configure cached packages to be shared between instances of the same base box.\r\n        # More info on the \"Usage\" link above\r\n        config.cache.scope = :box\r\n    \r\n        # OPTIONAL: If you are using VirtualBox, you might want to use that to enable\r\n        # NFS for shared folders. This is also very useful for vagrant-libvirt if you\r\n        # want bi-directional sync\r\n        config.cache.synced_folder_opts = {\r\n          type: :nfs,\r\n          # The nolock option can be useful for an NFSv3 client that wants to avoid the\r\n          # NLM sideband protocol. Without this option, apt-get might hang if it tries\r\n          # to lock files needed for /var/cache/* operations. All of this can be avoided\r\n          # by using NFSv4 everywhere. Please note that the tcp option is not the default.\r\n          mount_options: ['rw', 'vers=3', 'tcp', 'nolock']\r\n        }\r\n      end\r\n    end\r\n    \r\n      # SSH Agent Forwarding\r\n      #\r\n      # Enable agent forwarding on vagrant ssh commands. This allows you to use ssh keys\r\n      # on your host machine inside the guest. See the manual for `ssh-add`.\r\n      config.ssh.forward_agent = true\r\n    \r\n      # Default Ubuntu Box\r\n      #\r\n      # This box is provided by Ubuntu vagrantcloud.com and is a nicely sized (332MB)\r\n      # box containing the Ubuntu 14.04 Trusty 64 bit release. Once this box is downloaded\r\n      # to your host computer, it is cached for future use under the specified box name.\r\n      config.vm.box = \"ubuntu/trusty64\"\r\n    \r\n      # The Parallels Provider uses a different naming scheme.\r\n      config.vm.provider :parallels do |v, override|\r\n        override.vm.box = \"parallels/ubuntu-14.04\"\r\n      end\r\n    \r\n      # The VMware Fusion Provider uses a different naming scheme.\r\n      config.vm.provider :vmware_fusion do |v, override|\r\n        override.vm.box = \"netsensia/ubuntu-trusty64\"\r\n      end\r\n    \r\n      # VMWare Workstation can use the same package as Fusion\r\n      config.vm.provider :vmware_workstation do |v, override|\r\n        override.vm.box = \"netsensia/ubuntu-trusty64\"\r\n      end\r\n    \r\n      config.vm.hostname = \"vvv\"\r\n    \r\n      # Local Machine Hosts\r\n      #\r\n      # If the Vagrant plugin hostsupdater (https://github.com/cogitatio/vagrant-hostsupdater) is\r\n      # installed, the following will automatically configure your local machine's hosts file to\r\n      # be aware of the domains specified below. Watch the provisioning script as you may need to\r\n      # enter a password for Vagrant to access your hosts file.\r\n      #\r\n      # By default, we'll include the domains set up by VVV through the vvv-hosts file\r\n      # located in the www/ directory.\r\n      #\r\n      # Other domains can be automatically added by including a vvv-hosts file containing\r\n      # individual domains separated by whitespace in subdirectories of www/.\r\n      if defined?(VagrantPlugins::HostsUpdater)\r\n        # Recursively fetch the paths to all vvv-hosts files under the www/ directory.\r\n        paths = Dir[File.join(vagrant_dir, 'www', '**', 'vvv-hosts')]\r\n    \r\n        # Parse the found vvv-hosts files for host names.\r\n        hosts = paths.map do |path|\r\n          # Read line from file and remove line breaks\r\n          lines = File.readlines(path).map(&:chomp)\r\n          # Filter out comments starting with \"#\"\r\n          lines.grep(/\\A[^#]/)\r\n        end.flatten.uniq # Remove duplicate entries\r\n    \r\n        # Pass the found host names to the hostsupdater plugin so it can perform magic.\r\n        config.hostsupdater.aliases = hosts\r\n        config.hostsupdater.remove_on_suspend = true\r\n      end\r\n    \r\n      # Private Network (default)\r\n      #\r\n      # A private network is created by default. This is the IP address through which your\r\n      # host machine will communicate to the guest. In this default configuration, the virtual\r\n      # machine will have an IP address of 192.168.50.4 and a virtual network adapter will be\r\n      # created on your host machine with the IP of 192.168.50.1 as a gateway.\r\n      #\r\n      # Access to the guest machine is only available to your local host. To provide access to\r\n      # other devices, a public network should be configured or port forwarding enabled.\r\n      #\r\n      # Note: If your existing network is using the 192.168.50.x subnet, this default IP address\r\n      # should be changed. If more than one VM is running through VirtualBox, including other\r\n      # Vagrant machines, different subnets should be used for each.\r\n      #\r\n      config.vm.network :private_network, ip: \"192.168.50.4\"\r\n    \r\n      # Use NFS for shared folders for better performance\r\n      config.vm.synced_folder '.', '/vagrant', nfs: true\r\n    \r\n      # Public Network (disabled)\r\n      #\r\n      # Using a public network rather than the default private network configuration will allow\r\n      # access to the guest machine from other devices on the network. By default, enabling this\r\n      # line will cause the guest machine to use DHCP to determine its IP address. You will also\r\n      # be prompted to choose a network interface to bridge with during `vagrant up`.\r\n      #\r\n      # Please see VVV and Vagrant documentation for additional details.\r\n      #\r\n      # config.vm.network :public_network\r\n    \r\n      # Port Forwarding (disabled)\r\n      #\r\n      # This network configuration works alongside any other network configuration in Vagrantfile\r\n      # and forwards any requests to port 8080 on the local host machine to port 80 in the guest.\r\n      #\r\n      # Port forwarding is a first step to allowing access to outside networks, though additional\r\n      # configuration will likely be necessary on our host machine or router so that outside\r\n      # requests will be forwarded from 80 -> 8080 -> 80.\r\n      #\r\n      # Please see VVV and Vagrant documentation for additional details.\r\n      #\r\n      # config.vm.network \"forwarded_port\", guest: 80, host: 8080\r\n    \r\n      # Drive mapping\r\n      #\r\n      # The following config.vm.synced_folder settings will map directories in your Vagrant\r\n      # virtual machine to directories on your local machine. Once these are mapped, any\r\n      # changes made to the files in these directories will affect both the local and virtual\r\n      # machine versions. Think of it as two different ways to access the same file. When the\r\n      # virtual machine is destroyed with `vagrant destroy`, your files will remain in your local\r\n      # environment.\r\n    \r\n      # /srv/database/\r\n      #\r\n      # If a database directory exists in the same directory as your Vagrantfile,\r\n      # a mapped directory inside the VM will be created that contains these files.\r\n      # This directory is used to maintain default database scripts as well as backed\r\n      # up mysql dumps (SQL files) that are to be imported automatically on vagrant up\r\n      config.vm.synced_folder \"database/\", \"/srv/database\"\r\n    \r\n      # If the mysql_upgrade_info file from a previous persistent database mapping is detected,\r\n      # we'll continue to map that directory as /var/lib/mysql inside the virtual machine. Once\r\n      # this file is changed or removed, this mapping will no longer occur. A db_backup command\r\n      # is now available inside the virtual machine to backup all databases for future use. This\r\n      # command is automatically issued on halt, suspend, and destroy if the vagrant-triggers\r\n      # plugin is installed.\r\n      if File.exists?(File.join(vagrant_dir,'database/data/mysql_upgrade_info')) then\r\n        if vagrant_version >= \"1.3.0\"\r\n          config.vm.synced_folder \"database/data/\", \"/var/lib/mysql\", :mount_options => [ \"dmode=777\",     \"fmode=777\" ]\r\n        else\r\n          config.vm.synced_folder \"database/data/\", \"/var/lib/mysql\", :extra => 'dmode=777,fmode=777'\r\n        end\r\n    \r\n        # The Parallels Provider does not understand \"dmode\"/\"fmode\" in the \"mount_options\" as\r\n        # those are specific to Virtualbox. The folder is therefore overridden with one that\r\n        # uses corresponding Parallels mount options.\r\n        config.vm.provider :parallels do |v, override|\r\n          override.vm.synced_folder \"database/data/\", \"/var/lib/mysql\", :mount_options => []\r\n        end\r\n      end\r\n    \r\n      # /srv/config/\r\n      #\r\n      # If a server-conf directory exists in the same directory as your Vagrantfile,\r\n      # a mapped directory inside the VM will be created that contains these files.\r\n      # This directory is currently used to maintain various config files for php and\r\n      # nginx as well as any pre-existing database files.\r\n      config.vm.synced_folder \"config/\", \"/srv/config\"\r\n    \r\n      # /srv/log/\r\n      #\r\n      # If a log directory exists in the same directory as your Vagrantfile, a mapped\r\n      # directory inside the VM will be created for some generated log files.\r\n      config.vm.synced_folder \"log/\", \"/srv/log\", :owner => \"www-data\"\r\n    \r\n      # /srv/www/\r\n      #\r\n      # If a www directory exists in the same directory as your Vagrantfile, a mapped directory\r\n      # inside the VM will be created that acts as the default location for nginx sites. Put all\r\n      # of your project files here that you want to access through the web server\r\n      if vagrant_version >= \"1.3.0\"\r\n        config.vm.synced_folder \"www/\", \"/srv/www/\", :owner => \"www-data\", :mount_options => [ \"dmode=775\", \"fmode=774\" ]\r\n      else\r\n        config.vm.synced_folder \"www/\", \"/srv/www/\", :owner => \"www-data\", :extra => 'dmode=775,fmode=774'\r\n      end\r\n\r\n      config.vm.provision \"fix-no-tty\", type: \"shell\" do |s|\r\n        s.privileged = false\r\n        s.inline = \"sudo sed -i '/tty/!s/mesg n/tty -s \\\\&\\\\& mesg n/' /root/.profile\"\r\n      end\r\n    \r\n      # The Parallels Provider does not understand \"dmode\"/\"fmode\" in the \"mount_options\" as\r\n      # those are specific to Virtualbox. The folder is therefore overridden with one that\r\n      # uses corresponding Parallels mount options.\r\n      config.vm.provider :parallels do |v, override|\r\n        override.vm.synced_folder \"www/\", \"/srv/www/\", :owner => \"www-data\", :mount_options => []\r\n      end\r\n\r\n      # Customfile - POSSIBLY UNSTABLE\r\n      #\r\n      # Use this to insert your own (and possibly rewrite) Vagrant config lines. Helpful\r\n      # for mapping additional drives. If a file 'Customfile' exists in the same directory\r\n      # as this Vagrantfile, it will be evaluated as ruby inline as it loads.\r\n      #\r\n      # Note that if you find yourself using a Customfile for anything crazy or specifying\r\n      # different provisioning, then you may want to consider a new Vagrantfile entirely.\r\n      if File.exists?(File.join(vagrant_dir,'Customfile')) then\r\n        eval(IO.read(File.join(vagrant_dir,'Customfile')), binding)\r\n      end\r\n    \r\n      # Provisioning\r\n      #\r\n      # Process one or more provisioning scripts depending on the existence of custom files.\r\n      #\r\n      # provison-pre.sh acts as a pre-hook to our default provisioning script. Anything that\r\n      # should run before the shell commands laid out in provision.sh (or your provision-custom.sh\r\n      # file) should go in this script. If it does not exist, no extra provisioning will run.\r\n      if File.exists?(File.join(vagrant_dir,'provision','provision-pre.sh')) then\r\n        config.vm.provision :shell, :path => File.join( \"provision\", \"provision-pre.sh\" )\r\n      end\r\n    \r\n      # provision.sh or provision-custom.sh\r\n      #\r\n      # By default, Vagrantfile is set to use the provision.sh bash script located in the\r\n      # provision directory. If it is detected that a provision-custom.sh script has been\r\n      # created, that is run as a replacement. This is an opportunity to replace the entirety\r\n      # of the provisioning provided by default.\r\n      if File.exists?(File.join(vagrant_dir,'provision','provision-custom.sh')) then\r\n        config.vm.provision :shell, :path => File.join( \"provision\", \"provision-custom.sh\" )\r\n      else\r\n        config.vm.provision :shell, :path => File.join( \"provision\", \"provision.sh\" )\r\n      end\r\n    \r\n      # provision-post.sh acts as a post-hook to the default provisioning. Anything that should\r\n      # run after the shell commands laid out in provision.sh or provision-custom.sh should be\r\n      # put into this file. This provides a good opportunity to install additional packages\r\n      # without having to replace the entire default provisioning script.\r\n      if File.exists?(File.join(vagrant_dir,'provision','provision-post.sh')) then\r\n        config.vm.provision :shell, :path => File.join( \"provision\", \"provision-post.sh\" )\r\n      end\r\n    \r\n      # Always start MySQL on boot, even when not running the full provisioner\r\n      # (run: \"always\" support added in 1.6.0)\r\n      if vagrant_version >= \"1.6.0\"\r\n        config.vm.provision :shell, inline: \"sudo service mysql restart\", run: \"always\"\r\n        config.vm.provision :shell, inline: \"sudo service nginx restart\", run: \"always\"\r\n      end\r\n    \r\n      # Vagrant Triggers\r\n      #\r\n      # If the vagrant-triggers plugin is installed, we can run various scripts on Vagrant\r\n      # state changes like `vagrant up`, `vagrant halt`, `vagrant suspend`, and `vagrant destroy`\r\n      #\r\n      # These scripts are run on the host machine, so we use `vagrant ssh` to tunnel back\r\n      # into the VM and execute things. By default, each of these scripts calls db_backup\r\n      # to create backups of all current databases. This can be overridden with custom\r\n      # scripting. See the individual files in config/homebin/ for details.\r\n      if defined? VagrantPlugins::Triggers\r\n        config.trigger.before :halt, :stdout => true do\r\n          run \"vagrant ssh -c 'vagrant_halt'\"\r\n        end\r\n        config.trigger.before :suspend, :stdout => true do\r\n          run \"vagrant ssh -c 'vagrant_suspend'\"\r\n        end\r\n        config.trigger.before :destroy, :stdout => true do\r\n          run \"vagrant ssh -c 'vagrant_destroy'\"\r\n        end\r\n      end\r\n    end\r\n\r\nCan anyone see a problem there, or advise how to troubleshoot this?\r\n "},"comment":{"url":"https://api.github.com/repos/Varying-Vagrant-Vagrants/VVV/issues/comments/164808821","html_url":"https://github.com/Varying-Vagrant-Vagrants/VVV/issues/741#issuecomment-164808821","issue_url":"https://api.github.com/repos/Varying-Vagrant-Vagrants/VVV/issues/741","id":164808821,"user":{"login":"jmarceli","id":4281333,"avatar_url":"https://avatars.githubusercontent.com/u/4281333?v=3","gravatar_id":"","url":"https://api.github.com/users/jmarceli","html_url":"https://github.com/jmarceli","followers_url":"https://api.github.com/users/jmarceli/followers","following_url":"https://api.github.com/users/jmarceli/following{/other_user}","gists_url":"https://api.github.com/users/jmarceli/gists{/gist_id}","starred_url":"https://api.github.com/users/jmarceli/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jmarceli/subscriptions","organizations_url":"https://api.github.com/users/jmarceli/orgs","repos_url":"https://api.github.com/users/jmarceli/repos","events_url":"https://api.github.com/users/jmarceli/events{/privacy}","received_events_url":"https://api.github.com/users/jmarceli/received_events","type":"User","site_admin":false},"created_at":"2015-12-15T16:04:11Z","updated_at":"2015-12-15T16:04:11Z","body":"So it seems to be perfect solution :)"}}