#How to compile source code without reaching 100% CPU usage?

10 messages · Page 1 of 1 (latest)

sly leaf
#

I am trying to build a Github project that uses waf from source while having limited resource usage, regardless if it would take longer to finish or not.
OS: Manjaro
Processors: 8 × AMD Ryzen 5 2500U with Radeon Vega Mobile Gf

I have tried:
-running nice -15 ./waf
-limiting the CPU usage of the Konsole process in question using limitcpu from AUR
These didn't seem to have any effect.

Story time:
The reason I don't want the compiling to be heavy on resources is that I have some CPU-related bug which makes my system freeze randomly, especially when there is heavy CPU usage. My OS always freezes when ~75% of the compiling has finished. Normally, one should get to the root of the problem, yet I did try so in the past and found out it is related to AMD Ryzen processors on ASUS laptops, and that to fix it I would need to update my BIOS and activate some setting, yet I am already on the latest official version for my laptop and the setting isn't there. I have tried some other solutions I found online unsuccessfully.

So, I'm looking for a band-aid solution at the moment.

twilit pier
sly leaf
#

As an addition to point 1, that bug is not distro-specific.

twilit pier
twilit pier
#

Can't help rn

sly leaf
twilit pier
sly leaf
#

Tried adding * hard priority 25 to /etc/security/limits/limits.conf and restarting. No effects.
I discoverered that running limitcpu -l -10 -p konsole_process_id -m does limit the CPU usage of the whole compiling process. I have added the --monitor-forks flag which works for the Konsole child processes, but it does not limit the ones that have later been started.