diff --git a/build/fbcode_builder/getdeps/buildopts.py b/build/fbcode_builder/getdeps/buildopts.py index 480d8d799..83295b06d 100644 --- a/build/fbcode_builder/getdeps/buildopts.py +++ b/build/fbcode_builder/getdeps/buildopts.py @@ -83,6 +83,14 @@ class BuildOptions(object): import multiprocessing num_jobs = multiprocessing.cpu_count() + if is_windows(): + # On Windows the cpu count tends to be the HT count. + # Running with that level of concurrency tends to + # swamp the system and make hard to perform other + # light work. Let's halve the number of cores here + # to win that back. The user can still specify a + # larger number if desired. + num_jobs = int(num_jobs / 2) if not install_dir: install_dir = os.path.join(scratch_dir, "installed")