Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Restrict pylint parallelism to available RAM
pylint uses *lots* of RAM (more than 1 GiB per process), and the `jobs=0` default runs `nproc` parallel processes by default. This exceeds the available memory in many standard environments (such as m1.medium == 2 CPUs/4 GiB RAM, or m1.large == 4 CPUs/8 GiB RAM) and causes eternal hangs of the pylintrc test when one job process gets OOM-killed. Instead, set the parallelism depending on the amount of free memory -- one job for each 2 GB of available RAM. This is an underestimation, but let's not use up the entire system memory. Also still cap it to the number of available CPUs, just in case this runs on a system with lots of RAM and only few CPUs. Cherry-picked from master commit be12ca7 Related: rhbz#1885635
- Loading branch information