Skip to content

Instantly share code, notes, and snippets.

@tknerr
Last active January 18, 2016 21:55
Show Gist options
  • Save tknerr/4d586e9f81bfe11e2367 to your computer and use it in GitHub Desktop.
Save tknerr/4d586e9f81bfe11e2367 to your computer and use it in GitHub Desktop.
Benchmark: comparing Vagrant VirtualBox vs VMWare Provider

Environment

  • vagrant 1.7.4
  • vagrant-vmware-workstation 4.0.5

Minimal with Synced Folders Disabled

Vagrant.configure(2) do |config|

  config.vm.box = "hashicorp/precise64"

  config.vm.provider "vmware_workstation" do |v|
    v.vmx["memsize"] = "1024"
    v.vmx["numvcpus"] = "4"
  end
  config.vm.provider "virtualbox" do |v|
    v.memory = 1024
    v.cpus = 4
  end

  # disable synced_folder
  config.cache.disable!
  config.vm.synced_folder ".", "/vagrant", disabled: true
end
  • vmware: 30s
  • vbox: 40s

=> mostly because vagrant-vmware-workstation plugin uses linked clones already

Variations

Using insecure key

  # don't generate new keypair
  config.ssh.insert_key = false

=> saves 2-3s

More CPU and Memory

  config.vm.provider "vmware_workstation" do |v|
    v.vmx["memsize"] = "4096"
    v.vmx["numvcpus"] = "8"
  end

=> woah, this unexpectedly slows things down by ~10s

=> and it seems to be definitely memory bound, CPU setting does not seem to have an impact at all

=> 512mb vs 1024mb does not make a difference

With Default Shared Folders

  # disable synced_folder
  #config.ssh.insert_key = false
  config.cache.disable!
  #config.vm.synced_folder ".", "/vagrant", disabled: true
  • vmware: 43s
  • vbox: 42s

=> woah, plus 12-14s with vmware, vbox nearly the same...

With Default + Cachier Shared Folders

  # disable synced_folder
  #config.ssh.insert_key = false
  config.cache.disable!
  #config.vm.synced_folder ".", "/vagrant", disabled: true
  • vmware: 43s
  • vbox: 47s

=> woah, plus 5-6s with vbox ...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment