m2-farzan / ros2-galactic-PKGBUILD

AUR Package for ROS 2 Galactic
11 stars 11 forks source link

disabling parallel build makes building process painfully slow #30

Open AnthonyMichaelTDM opened 1 year ago

AnthonyMichaelTDM commented 1 year ago

16gb is way more than enough to build the package stably. I've done it with as little as 3gb in a VM with no issues (building ros2 galactic from source, not w/ this package), even when setting the --parallel-work flag to 10 (which builds the source in ~30 minutes on my machine compared to ~4hours w/o parallel build)

maybe I'm missing something but I think the ram requirement can be safely lowered to a much lower value w/o issue

perhaps basing it on available CPU cores would be better?

m2-farzan commented 1 year ago

Thanks for your suggestion and supporting information. The 16GB criteria was originally introduced following a report on an 8GB machine running out of memory during the build process. So I'm not too sure whether or not lowering the bar is safe. Let's keep this issue open in the hope of receiving a few more reports. Until then, I'm gonna err on the side of stability.

wojciechmadry commented 1 year ago

I know this issue is different from my problem, but it relates to parallel build. Maybe instead of using free at line 88, better command will be: grep MemTotal /proc/meminfo | grep -Po "MemTotal:\s+\K\d+". Why? When your system has a different language system than the English free command returns translated value.

My output of free command:

               razem       użyte       wolne    dzielone   buf/cache    dostępne
Pamięć:   32792452     3422640    22699636       56960     6670176    28847684
Wymiana:     2097148           0     2097148

Pull request with fix: #33