Vagrant: Virtualbox vs Parallels Performance for PHP development

I've tried to compare the providers fairly. Of course these benchmarks are specific to my machine and environment. So please don't take them as set in stone.

TLDR; The vagrant parallels provider is much faster than the virtualbox provider.

Using Vagrant 1.7.2:

Provider Version Request/Sec Notes
virtualbox Virtualbox 4.3.26 17.24 nginx 1.6.2
parallels Parallels Desktop 9.0.24251 38.96 nginx 1.6.2
parallels Parallels Desktop 10.2.0 (28956) 44.41 nginx 1.6.2
parallels Parallels Desktop 11.0.1 (31277) 47.65 nginx 1.8.0 (*)

(*) coudn't get nginx 1.6.2 installed on a current ubuntu trusty, can't find the package anymore.

Code

The tests are using a demo installation of the Symfony2 Framework running in development mode including xdebug. To see the code and run tests yourself use:

  1. git clone git@github.com:adri/vagrant-virtualbox-vs-parallels.git && cd vagrant-virtualbox-vs-parallels
  2. git checkout virtualbox && composer install && vagrant up --provider virtualbox and access vagrant-symfony-virtualbox.dev
  3. git checkout parallels && composer install && vagrant up --provider parallels and access vagrant-symfony-parallels.dev

View changes between the two setups.

What is benchmarked

The login page in the Symfony2 demo installation is benchmarked with Apache benchmark.

sf-demo-page

VM Configuration

  • memory: 1024 Mbyte
  • cpu(s): 8
  • php 5.6 with xdebug and opcode cache
  • php fpm
  • nginx

System

Tests were run on a Macbook Pro 15" late 2013

  • 2.0GHz
  • 16 GB memory
  • 250 GB SSD
  • OSX 10.10