Skip to content
Closed
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
6 changes: 4 additions & 2 deletions cubedash/generate.py
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,7 @@
from dataclasses import dataclass
from datetime import timedelta
from functools import partial
from os import sched_getaffinity
from textwrap import dedent

import click
Expand Down Expand Up @@ -301,10 +302,11 @@ def convert(self, value, param, ctx):
"-j",
"--jobs",
type=int,
default=3,
default=min(len(sched_getaffinity(0)), 16),
help=dedent(
"""\
Number of concurrent worker subprocesses to use (default: 3)
Number of concurrent worker subprocesses to use
(default: number of cores or 16, whichever is smaller)

This should match how many io-and-cpu-heavy queries your DB would
like to handle concurrently.
Expand Down