Scroll to navigation

guess_concurrency(1) User Contributed Perl Documentation guess_concurrency(1)

NAME

guess_concurrency - Estimate suitable workload concurrency

SYNOPSIS

guess_concurrency [-h] [--detect METHOD] [--max N] [--min N] [--require-mem MEMLIST]

DESCRIPTION

Guess a suitable concurrency level given constraints from the runtime environment. Environment variables such as DEB_BUILD_OPTIONS, RPM_BUILD_NCPUS and CMAKE_BUILD_PARALLEL_LEVEL are consulted for initial guesses falling back to querying the operating system in order to guess a suitable concurrency level. A user may further restrict the emitted concurrency by specifying a minimum or maximum and by requiring sufficient memory to support a level of concurreny to be available.

OPTIONS

supply a processor count or select a detection method (nproc, python or cores)
limit the number of detected cores to a given maximum
limit the number of detected cores to a given minimum
specify per-core required memory as a comma separated list. Each entry indicates how much additional RAM is needed for the next process. Numbers can be given as floating point number optionally suffixed with a case-insensitive binary suffix (k/m/g/t/e). A completely empty spot copies the previous number. A concurrency N is considered acceptable if the sum of the first N entries of this list does not exceed the available RAM.

EXAMPLES

Ensure that there is at least 4GB per used core.

    guess_concurrency --require-mem 4G

Two linker processes may consume 6GB each and they may run concurrently. All other concurrent processes are expected to not use more than 2GB each.

    guess_concurrency --require-mem 6G,,2G

SEE ALSO

    dpkg-buildpackage(1)
2026-05-11 perl v5.40.1