Skip to content

Commit

Permalink
Increase default [python-setup].resolver_jobs to cpu_count / 2
Browse files Browse the repository at this point in the history
# Rust tests and lints will be skipped. Delete if not intended.
[ci skip-rust]

# Building wheels and fs_util will be skipped. Delete if not intended.
[ci skip-build-wheels]
  • Loading branch information
Eric-Arellano committed Oct 21, 2020
1 parent 56b2562 commit 6d9ca5f
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 @@ -110,11 +111,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 6d9ca5f

Please sign in to comment.