Subject: Re: pkgsrc on SMP machines
To: Lars Nordlund <lars.nordlund@hem.utfors.se>
From: Manuel Bouyer <bouyer@antioche.eu.org>
List: tech-pkg
Date: 12/17/2005 16:58:39
On Sat, Dec 17, 2005 at 01:40:57PM +0100, Lars Nordlund wrote:
> On Sat, 17 Dec 2005 04:10:12 +0100 (CET)
> Hubert Feyrer <feyrer@cs.stevens.edu> wrote:
> > I'm sort of bored of repeating this again and again.
>
> This is an example of the level of parallelism that exist in pkgsrc.
>
> On my machine I have 395 packages installed. But I am not using KDE, so
> most of the KDE packages are not installed. Now suppose I want to
> install meta-pkgs/kde3 on my system. And also suppose that each package
> takes 4 seconds to build. :-)
>
> I do not have the machines required to run real tests right now.
>
> # cd /usr/pkgsrc/meta-pkgs/kde3; make parallel
>
> will give me the dependency tree in makefile syntax. I save it to a
> file and use sed to change build commands to '@echo $@; sleep 4'.
>
> make -j32 0.11s user 0.14s system 0% cpu 28.210 total
> make -j16 0.12s user 0.15s system 0% cpu 28.218 total
> make -j8 0.09s user 0.14s system 0% cpu 32.189 total
> make -j4 0.13s user 0.10s system 0% cpu 44.226 total
> make -j2 0.09s user 0.13s system 0% cpu 1:12.28 total
> make 0.09s user 0.10s system 0% cpu 2:08.33 total
>
> Do you want to wait 28 seconds for KDE, or more than 2 minutes? :-)
> [...]
> Q: Why generate the makefile on the fly all the time?
> A: To get an updated view of the current machine. If leaves are built
> which are already installed, the install step will fail and the
> top-level make will consider that part of the build tree a failure.
Q: How would this play with pkgsrc/mk/bulk (which is the way buidling
packages I'm the most interested) ?
--
Manuel Bouyer <bouyer@antioche.eu.org>
NetBSD: 26 ans d'experience feront toujours la difference
--