<div dir="ltr"><div class="gmail_extra"><div class="gmail_quote">On Fri, Feb 7, 2014 at 2:09 PM, Antonio Terceiro <span dir="ltr"><<a href="mailto:terceiro@debian.org" target="_blank">terceiro@debian.org</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div class="im">On Sun, Jan 26, 2014 at 06:09:51PM +0100, Martin Pitt wrote:<br>
> I advise to use the schroot runner instead. schroots are easy to set<br>
> up these days with mk-sbuild, and with some additional love (like<br>
> installing and configuring apt-cacher-ng and symlinking<br>
> /var/lib/schroot/union/overlay/ and /var/lib/schroot/unpack/ to /tmp/,<br>
> and having /tmp on a tmpfs),  set up, tear down, and package<br>
> installation are extremely fast.<br>
<br>
</div>This schroot tip is precious! I have just reduced the build time (which<br>
was mostly spent installing dependencies -- I was already using<br>
apt-cacher-ng) of a package from ~4min to ~30s!<br>
<br>
But instead of symlinking /var/lib/schroot/union/overlay/¹ , I configured<br>
my sbuild chroots adding<br>
<br>
  union-overlay-directory=/dev/shm<br>
<br>
<span class=""><font color="#888888"><br></font></span></blockquote><div><br></div><div>you can archive similar speeds without a tmpfs using eatmydata, just stick<br>LD_PRELOAD=/usr/lib/libeatmydata/libeatmydata.so<br></div>
<div>in your rc equivalent.<br>This is also significantly faster than using dpkg --force-unsafe-io.<br><br></div><div>Using mount options that reduce failure safety on the partition/subvolume holding the chroot build folder also helps a bit (nobarrier, data=writeback, commit=3600 etc.)<br>
</div></div></div></div>