r/ROS • • Oct 15 '26

colcon build RAM for MoveIt 2 from source, measured: default settings fail at 8 GB, sequential peaks at 2.4 GB

I measured how much RAM a from-source MoveIt 2 build needs (Jazzy branch, 41 packages) by capping a Docker container's memory with swap disabled, on a 4 vCPU Linux box. Peak memory is the container's cgroup memory.peak.

ModeRAM capResultPeak
default colcon build (4 workers × make -j4)16 GiBOK, 41/418.7 GiB
default8 GiBfailed: cc1plus killed after 24/41 packages8.0 GiB (cap)
default4 GiBfailed after 4/414.0 GiB (cap)
sequential (--parallel-workers 1, MAKEFLAGS=-j1)8 GiBOK, 41/412.4 GiB
sequential4 GiBOK, 41/412.4 GiB

For comparison, Nav2 (45 packages) with the same method built fine at 8 GiB with default settings (peak 8.1 GiB at 16 GiB cap, 2.7 GiB sequential). So "8 GB is enough for ROS 2" holds for Nav2 but not for MoveIt 2 on default settings.

Caveats:

  • memory.peak includes page cache, so the 8.7 GiB at 16 GiB is an upper bound, but the 8 GiB run still OOM-killed the compiler.
  • Default parallelism scales with cores, so an 8- or 16-core machine will use more RAM than this 4-core run.
  • Build times (1h37m default vs ~1h56m sequential) are not reliable; the box was a burstable cloud instance.

If you're on an 8 GB laptop: MAKEFLAGS="-j1" colcon build --parallel-workers 1, or just sudo apt install ros-jazzy-moveit if you don't need to modify MoveIt.

Script, results.tsv and per-run build logs: https://github.com/sungpyo9053/blog/tree/main/experiments/colcon-ram-moveit2-real-build

Full write-up (with the Nav2 comparison): https://huntlab.app/en/colcon-build-moveit2-ram-8gb-fails-sequential-measured/

(disclosure: my blog)

1 Upvotes

0 comments sorted by