Nproc reports 32 cores on arm64

We use -j$(nproc) to determine parallelism for compilation and testing. On arm64, this reports 32. As this is a lot more than on other builders (which only have 2 cores), I wanted to check whether the value is accurate. If it is, great! If it isn’t it would be good to report a lower number to avoid excessive parallelism.

1 Like

Hi @nikic!

Thanks for testing out arm64 builds and your feedback!
So basically, at the moment, arm64 builds are run within LXD container on LXD host. This LXD host, in case of arm64, has 32-core cpu. The basic LXD container setup is as per CI Overview - with 2 vCPUs and ca 4GB of RAM at the moment of writing this answer. The way it’s configured it allows to allocate more resources per container if required and cpu time available.

The nproc on arm64 indeed does report full amount of cores of underlying host, however the actual amount available for build running within LXD container is min 2vCPU + possibly some additional cpu time.

Hope it helps?

Happy building!

Imprint