Skip to content

Commit

Permalink
More aggressive pylint downscaling
Browse files Browse the repository at this point in the history
pylint hits 2 GiB per process pretty often [1], thus still causing OOM
failures [2]. Bump the divisor.

[1] pylint-dev/pylint#1495
[2] pylint-dev/pylint#3899

Cherry-picked from master PR rhinstaller#2923

Related: rhbz#1885635
  • Loading branch information
martinpitt committed Oct 14, 2020
1 parent 4744633 commit 8a4f65d
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions tests/pylint/censorship.py
Expand Up @@ -125,8 +125,8 @@ def _prepare_args(self):
avail_mem_kb = int(line.split()[1])
break
num_cpus = multiprocessing.cpu_count()
# each process uses ~ 1.5 GiB RAM, leave some breathing space
jobs = max(1, avail_mem_kb // 2000000)
# each process uses ~ 2 GiB RAM, leave some breathing space
jobs = max(1, avail_mem_kb // 3000000)
# but also clip to nproc
jobs = min(jobs, num_cpus)
print("Using", jobs, "parallel jobs based on", avail_mem_kb, "kB available RAM and",
Expand Down

0 comments on commit 8a4f65d

Please sign in to comment.