Created
June 5, 2013 08:14
-
-
Save dlip/5712371 to your computer and use it in GitHub Desktop.
vagrant increase memory / enable multicore
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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