Skip to content

Commit

Permalink
Add cgroup2 support
Browse files Browse the repository at this point in the history
  • Loading branch information
Maria Mozgunova committed Jul 25, 2022
1 parent 7ae0add commit 909bb14
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions reference/tools.rst
Expand Up @@ -28,9 +28,11 @@ tools.cpu_count()
def tools.cpu_count()
Returns the number of CPUs available, for parallel builds. If processor detection is not enabled, it will safely return 1. When
running in Docker, it reads cgroup to detect the configured number of CPUs. It Can be overwritten with the environment variable
:ref:`env_vars_conan_cpu_count` and configured in the :ref:`conan_conf`.
Returns the number of CPUs available, for parallel builds. If processor detection is not enabled, it will safely return 1.
When running in Docker, it reads cgroup to detect the configured number of CPUs.
In the case of cgroupv2 the number of CPUs is determined based on `/sys/fs/cgroup/cpu.max` file.
When no limit is set, all CPUs detected by the processor are used. The number of CPUs available can be overwritten with
the environment variable :ref:`env_vars_conan_cpu_count` and configured in the :ref:`conan_conf`.

.. _tools_vcvars_command:

Expand Down

0 comments on commit 909bb14

Please sign in to comment.