how to speed up mock

Paul Howarth paul at city-fan.org
Wed May 30 08:48:19 UTC 2012


On 05/30/2012 12:03 AM, Farkas Levente wrote:
> hi,
> i've to ask it again what i already asked a few times. is there any way
> to speed up mock build?
> here is a simple example when i build gstreamer-plugins-bad-free on
> rhel-6.2:
> -----------------------
> 2012-05-30 00:45:24,367 - Mock Version: 1.1.22
> 2012-05-30 00:45:24,377 - State Changed: unpacking root cache
> 2012-05-30 00:45:27,610 - State Changed: cleaning yum metadata
> 2012-05-30 00:45:27,639 - State Changed: running yum
> 2012-05-30 00:45:30,914 - State Changed: unlock buildroot
> 2012-05-30 00:45:31,026 - State Changed: setup
> 2012-05-30 00:50:09,980 - State Changed: build
> 2012-05-30 00:52:34,094 - State Changed: end
> -----------------------
> as you can see it takes about 5 minutes to setup the buildroot
> environment, while it takes 2.5 minutes to build it. so it's still 2
> times more the extra stuff compared to the build. even in a case of a
> 'long' build package (some other package build less then a minutes).
>
> disk space and cache size is not a problem.
>
> any kind of tipp would be welcome.

Are you using the tmpfs plugin? That improves things significantly if 
you can spare the RAM. Here's the mock config options I use:

config_opts['plugin_conf']['tmpfs_enable']                   = True
config_opts['plugin_conf']['tmpfs_opts']['required_ram_mb']  = 4096
config_opts['plugin_conf']['tmpfs_opts']['max_fs_size']      = '2048m'


Paul.


More information about the buildsys mailing list