Subject: Re: pkgsrc on SMP machines
To: Lars Nordlund <firstname.lastname@example.org>
From: Manuel Bouyer <email@example.com>
Date: 12/20/2005 19:22:30
On Tue, Dec 20, 2005 at 12:43:14AM +0100, Lars Nordlund wrote:
> On Mon, 19 Dec 2005 23:03:40 +0100
> Manuel Bouyer <firstname.lastname@example.org> wrote:
> > You'll have to statically define how many jobs you want to have in parallel,
> > and create a sandbox for each for them. Then the scheduler will have
> > to start partial buils in each of them. This approach has several benefits:
> The number of jobs in parallel would be the -j N argument to make?
I'm not sure you can use make for that.
> What is a sandbox? A pkg_comp-chroot thingy? A chroot which offers both
> ssh access and NFS exports? A virtual machine setup with all required
> packages and a work directory ready to be built in by the remote system?
See mksandbox in pkgsrc/mk/bulk
> The sandbox must be cheap enough to create so the host system can
> create 5000 of them rather fast.
Each require several null mounts, I'm not sure a system would support
that much. You certainly don't want one sandbox per package, but
one per jobs (if you can run 4 jobs in parallel, you want 4 sandboxes)
> As you can see in my patch, I basically do 'make install clean' in each
> target in the generated makefile. This can be changed into something
> that sets up a sandbox and tickles a remote system into starting to
> build inside the sandbox with the help of a distcc compiler (which of
> course can get CPU power from some other place). This make-rule should
> not return until a package has been created and the sandbox has been
I'm not sure your system can be used for bulk builds. The scripts in
pkgsrc/mk/bulk do much more than that (like making sure only the required
packages are installed)
> Well, it depends upon the sandboxes. I do not know how cheaply they can
> be made and still offer full protection between two package builds. Or
> what kind of functionality they can offer.
> > - if we carefully choose the way the scheduler starts builds in different
> > sandbox, we can have parallel build on a cluster of systems for free.
> For free?
> The scheduler? You mean make(1)? Or what do you have in mind?
what mk/bulk/build currently, but adjusted for parallel builds. Maybe this
can use make to start the jobs, but I'm not sure.
Manuel Bouyer <email@example.com>
NetBSD: 26 ans d'experience feront toujours la difference