Navigation Menu

Skip to content

Commit

Permalink
yum: use more CPUs
Browse files Browse the repository at this point in the history
Because we may need to build MariaDB. It is a large software.
  • Loading branch information
kou committed Aug 14, 2014
1 parent 87792d9 commit 79d61ac
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions packages/yum/Vagrantfile
Expand Up @@ -33,6 +33,18 @@ Vagrant.configure(VAGRANTFILE_API_VERSION) do |config|
node.vm.box = vm[:id]
node.vm.box_url = vm[:box_url]
node.vm.provision(:shell, :path => "build-rpm.sh")
node.vm.provider("virtualbox") do |virtual_box|
system_n_cpus = 1
if File.exist?("/proc/cpuinfo")
system_n_cpus = File.readlines("/proc/cpuinfo").grep(/^processor/).size
end
if system_n_cpus > 1
vm_n_cpus = system_n_cpus / 2
else
vm_n_cpus = 1
end
virtual_box.cpus = vm_n_cpus
end
end
end
end

0 comments on commit 79d61ac

Please sign in to comment.