According to reference docs, each container is provided with 2 vCpus. However when we run nproc or any other command to get cpu count, it is greater than 2.
Below are cpu counts displayed by nproc:
s390x: 4
ppc64le: 8
arm64: 32
This leads to OOM kill for nodejs build & test tools which by default depend on cpu counts for parallel threads.
Example:
che-thiea builds: here arm & ppc builds fail with OOM kill. The build uses lerna & jest tools which by default creates concurrent threads equal to number of cpus and there is no easy way to limit it.
Note: Most of nodejs build & test tools depend upon nodejs’s os library to get cpu counts which internally reads this information from procfs.