VirtualBox performance

Hi and thanks for your work developing the Bedrock system, It looks very useful and I hope it will improve the quality of my work. I haven’t tested it yet but am planning to within the next few hours.

One thing that came up when researching Vagrant, and more specifically VirtualBoxes is that there seems to be quite a noticeable performance hit when running sites in Virtualbox.

My understanding of Bedrock and Vagrant might be flawed so please correct me if I am wrong. Vagrant is used to deploy a complete stack for running WordPress, with all the dependencies etc (via Composer). This relies on using Virtualbox. Many people say that Virtualbox is for ‘Development’ environments.

Does this mean that when using Vagrant to deploy the WP stack to a production server, that Virtualbox is not used? Is VirtualBox really necessary to use on a new production server?

Having WP run inside a VM, inside a new Ubuntu installation seems somewhat strange - running a secondary OS inside an OS would use unnecessary resources, especially on a small VPS.

How do you overcome the performance limitations of using a VM on your production servers? I would be using Bedrock for ‘live’ sites, not just dev sites.

Thanks!

Vagrant and Virtualbox are used locally during development only. The staging and production environments are provisioned using Ansible. See https://github.com/roots/bedrock-ansible for more.

Ok I see. So Vagrant is never actually executed on the production server - it just creates a clone of the Ansible setup, inside a VM on a dev machine.

Thanks Foxaii

Almost. Ansible is a provisioning tool, so it does the same thing on your local Vagrant box as it does on a Digital Ocean droplet. It goes in via SSH and sets everything up, same as you could do by installing and setting everything up manually.

1 Like