Skip to content

Commit

Permalink
Increase default [python-setup].resolver_jobs to cpu_count / 2 (p…
Browse files Browse the repository at this point in the history
…antsbuild#11006) (pantsbuild#11011)

[ci skip-rust]
[ci skip-build-wheels]
  • Loading branch information
Eric-Arellano authored Oct 21, 2020
1 parent 209d3b8 commit 441c58b
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/python/pants/python/python_setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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."
Expand Down

0 comments on commit 441c58b

Please sign in to comment.