how to speed up mock?

Tony Nelson tonynelson at georgeanelson.com
Mon Jan 18 20:30:08 UTC 2010


On 10-01-18 11:34:44, Ville Skyttä wrote:
 ...
> So instead of modifying specfiles, one can do something like this in 
> /etc/mock/site-defaults.cfg:
>
> config_opts['macros']['%_smp_mflags'] = '-j3'

Unless `rpmbuild --showrc` shows a bad definition for _smp_mflags, 
you're probably better off letting the macro decide.  IME, using a 
number larger than the actual number of CPUs slows the build a lot, due 
to cache thrashing.  Modern CPUs perform well only with hot caches, and 
each switch to the "other" build process will replace the cache 
contents.

The OP said that rpmbuild was using the CPUs properly and ran fast, but 
earlier parts of mock were not and ran slowly, and take most of the 
time.  He indicated that most of the time is spent extracting the build 
root from the cache.

-- 
____________________________________________________________________
TonyN.:'                       <mailto:tonynelson at georgeanelson.com>
      '                              <http://www.georgeanelson.com/>



More information about the devel mailing list