perform builds on a different drive

Ion-Mihai Tetcu itetcu at FreeBSD.org
Fri Sep 10 10:08:00 EDT 2010


On Fri, 10 Sep 2010 13:17:51 +0200
Dominic Fandrey <kamikaze at bsdforen.de> wrote:

> On 09/09/2010 23:22, Ion-Mihai Tetcu wrote:
> > On Thu, 09 Sep 2010 22:08:50 +0200
> > olli hauer <ohauer at gmx.de> wrote:
> > 
> >> On 2010-09-09 16:02, Dominic Fandrey wrote:
> >>> I intend to perform builds on a different drive similar to
> >>> setting WRKDIRPREFIX on a regular system. I have a drive I want
> >>> to dedicate to the task and which is mounted async, this is why
> >>> I don't want the more permanent files stored there.
> >>>
> >>> On this list I found the suggestion to just make ${tb}/<BUILD>
> >>> a symlink. However whenever I start a new build the symlink is
> >>> removed and the directory recreated.
> >>>
> >>> Is there any /working/ way to perform the builds somewhere else?
> >>>
> >>
> >> If you have enough RAM try the following (my actual layout)
> >>
> >> drive 1:
> >>  /usr/ports
> >>  /data/distfiles
> >>
> >> drive 2:
> >>  /tinderbox
> >>    /jails
> >>      /8.1        => md10 (200MB swap)
> >>      /8.1.bin    => copy of relX will be copied back to relX in
> >> ramdisk /8.1-FreeBSD  => md11 (1400MB swap), buildspace_relX
> >>
> >>
> >> With this layout and the help of the ramdisks I need in duration
> >> ~50-60% the time for a build with my ~400 favorite ports.
> >> I build all my ports used in prod. regularly and it is quit a
> >> difference if the build needs 4 hours instead 8-10 hours without
> >> ramdisks.
> >>
> >> On my wish list is to mark a port build done if the port is build
> >> as decency for another port and have a higher queue id. I guess
> >> this can bring complete build time to 2 hours instead of 4.
> >>
> >> PS:
> >> In all my builds I never hit the 1400MB limit for md11.
> > 
> > A 2GB for the build md is usually safe. But the biggest port needs
> > about 10 times as much.
> 
> The machine has 8GB of RAM, but my impression is that the hard disk
> load is not very great. Shouldn't async be close to a memory disk in
> performance?

Depending on the disks, controller, etc.

Also tindy spends much time extracting the jail tarball, especially
when the build is on the same disk as the tarball (on QAT, for 60-70%
this takes longer that the actually build); and in this case async
doesn't help.

> Next question, wouldn't tmpfs be a more obvious choice, because it
> expands as needed? I know it's supposed to be experimental, but I
> tried to put one under massive load and wasn't able to panic the
> system.
> 
> I might benchmark this memory disk thing, but I remember I did
> some buildworld buildkernel tests in memory disks and the difference
> was very small (way below 5%).

For local port builds, I'm using this, except when building OOo:
mountWRKDIR     (mdmfs -s 3000m -m 1 -S -o async -o noatime 10 /home/itetcu/wrk)

> Also, I'm considering building OpenOffice in there ... my 8GB RAM
> wouldn't suffice in that case.
> 
> Thanks for the suggestions. I might test the alternatives once
> more pressing problems are resolved.
 
If you have a fixed set of ports build them once and then check the DB
to get the maximun amount of space you need
 select max(total_size) from build_ports;
and add some 100-200MB to it and use it as size for your md backed fs.
(or do it in a hook before each build).


-- 
IOnut - Un^d^dregistered ;) FreeBSD "user"
  "Intellectual Property" is   nowhere near as valuable   as "Intellect"
FreeBSD committer -> itetcu at FreeBSD.org, PGP Key ID 057E9F8B493A297B
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 196 bytes
Desc: not available
URL: <http://marcuscom.com/pipermail/tinderbox-list/attachments/20100910/835e7b10/attachment.bin>


More information about the tinderbox-list mailing list