ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | ros @ Robotics Stack Exchange |
1 | initial version |
There are two independent dimensions of parallelization:
The maximum number of packages processed in parallel when using the parallel executor. This dimension can be limited with the option --parallel-workers NUMBER
. It can also be limited to 1 by selecting the sequential executor with --executor sequential
.
The maximum number of threads used for a specific package using make
. This can be controlled using the environment variable MAKEFLAGS. By setting e.g. export MAKEFLAGS="-j 4"
only four threads are used to build a single package. By default colcon-cmake uses the number of available CPU cores (including hyper threading) to limit the number of threads (-j
) as well as the system load (-l
).
As a result the overall number of threads is the product of packages processed in parallel and maximum number of threads per package.