Bundle install in parallel

Gave a shot to the new Bundler 1.4.0RC1 during the weekend and found out it now supports gem installation in parallel. To invoke you need to pass --jobs parameter with number of threads you want it to run – for me the best performance was achieved by specifying the number physical CPU cores.

I've tested on the AppFab Archive app. In my case (CPU with 2-core i7 with HT) the speedup was 50%. I've also tried with a number greater than the number of physical cores but the performance was 15%-20% worse.

Bundler 1.3.5

➜  appfab git:(master) bundle --version
Bundler version 1.3.5

➜  appfab git:(master) time bundle install --path=vendor/
      483.44 real       126.23 user        39.96 sys

Bundler 1.4.0RC1

gem update bundler —pre

➜  appfab git:(master) bundle --version 
Bundler version 1.4.0.rc.1 

➜  appfab git:(master) time bundle install --jobs 2 --path=vendor/ 
      234.65 real       136.37 user        42.40 sys 

Happy coding.

Tadej over 8 years ago
This website uses short-lived cookies to improve usability.
Accept or learn more