[Groonga-mysql-commit] mroonga/mroonga at 79d61ac [master] yum: use more CPUs

Back to archive index

Kouhei Sutou null+****@clear*****
Thu Aug 14 10:28:09 JST 2014


Kouhei Sutou	2014-08-14 10:28:09 +0900 (Thu, 14 Aug 2014)

  New Revision: 79d61ac2ad11a6686edbc2a4ecb0e497e3571b0b
  https://github.com/mroonga/mroonga/commit/79d61ac2ad11a6686edbc2a4ecb0e497e3571b0b

  Message:
    yum: use more CPUs
    
    Because we may need to build MariaDB. It is a large software.

  Modified files:
    packages/yum/Vagrantfile

  Modified: packages/yum/Vagrantfile (+12 -0)
===================================================================
--- packages/yum/Vagrantfile    2014-08-14 10:27:39 +0900 (4238d67)
+++ packages/yum/Vagrantfile    2014-08-14 10:28:09 +0900 (aeee1ce)
@@ -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
-------------- next part --------------
HTML����������������������������...
Télécharger 



More information about the Groonga-mysql-commit mailing list
Back to archive index