On 06/04/2018 15:52, Tomas Chvatal wrote:
Hello all,
For use in libreoffice, chromium and others I've created macro that should allow you to limit jobs based on some constraints you can set later on in the spec to avoid OOM crashes.
The usage is pretty straight forward (Once it is accepted in Tumbleweed):
=== BuildRequires: memory-constraints
%build # require 2GB mem per thread %limit_build -m 2000 make %{?_smp_mflags} ====
Here the _smp_mflags vaule for 8GB machine would be 4 while default is number of cores (lets say 16)...
Both macros %jobs and %_smp_mflags are overriden as such the integration should be really painless if you need to do something like this.
Tom
Somebody used this macro in my graphics/blender package as a replacement for a conditional that I had to decrease the number of build threads. They used -m 800 which appeared to work but intermittent failures due to oom are hard to trouble shoot. The person that had been testing blender git prior to the update to blender 2.80 informed me that there were intermittent oom build failures so I reduced -m to 600 but it's failing more now. I've increased it to 2G -m 2000 because it appears to me that requesting 2G per thread should result in less threads but I wonder why the original user made such a small value in the beginning? Am I right to assume that the higher the -m value the less resulting build threads and the less consumed memory? Thanks, Dave P -- To unsubscribe, e-mail: opensuse-packaging+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse-packaging+owner@opensuse.org