From 441c58b4f878c9957f588106c3c8bb54c04ff409 Mon Sep 17 00:00:00 2001 From: Eric Arellano <14852634+Eric-Arellano@users.noreply.github.com> Date: Wed, 21 Oct 2020 15:03:13 -0700 Subject: [PATCH] Increase default `[python-setup].resolver_jobs` to `cpu_count / 2` (#11006) (#11011) [ci skip-rust] [ci skip-build-wheels] --- src/python/pants/python/python_setup.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/python/pants/python/python_setup.py b/src/python/pants/python/python_setup.py index 9bf5dc79640..751b10a1820 100644 --- a/src/python/pants/python/python_setup.py +++ b/src/python/pants/python/python_setup.py @@ -2,6 +2,7 @@ # Licensed under the Apache License, Version 2.0 (see LICENSE). import logging +import multiprocessing import os import subprocess from enum import Enum @@ -168,11 +169,11 @@ def register_options(cls, register): register( "--resolver-jobs", type=int, - default=2, + default=multiprocessing.cpu_count() // 2, advanced=True, help=( "The maximum number of concurrent jobs to build wheels with. Because Pants " - "can run multiple subprocesses in parallel, the total parallelism will be " + "can run multiple subprocesses in parallel, the maximum total parallelism will be " "`--process-execution-{local,remote}-parallelism x --python-setup-resolver-jobs`. " "Setting this option higher may result in better parallelism, but, if set too " "high, may result in starvation and Out of Memory errors."