Skip to content

Instantly share code, notes, and snippets.

@dlip
Created June 5, 2013 08:14
Show Gist options
  • Save dlip/5712371 to your computer and use it in GitHub Desktop.
Save dlip/5712371 to your computer and use it in GitHub Desktop.
vagrant increase memory / enable multicore
config.vm.customize ["modifyvm", :id, "--memory", "1024", "--ioapic", "on"]
# Set cpu cores
if not RUBY_PLATFORM.downcase.include?("mswin")
config.vm.customize ["modifyvm", :id, "--cpus",
`awk "/^processor/ {++n} END {print n}" /proc/cpuinfo 2> /dev/null || sh -c 'sysctl hw.logicalcpu 2> /dev/null || echo ": 2"' | awk \'{print \$2}\' `.chomp ]
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment