Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Increase default [python-setup].resolver_jobs to cpu_count / 2 #11006

Merged
merged 1 commit into from
Oct 21, 2020
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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."
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It didn't seem worth it to mention the edge cases where you want this low vs. high. Way too much detail.

Expand Down