From owner-freebsd-ports@FreeBSD.ORG Fri Mar 21 06:21:16 2008 Return-Path: Delivered-To: freebsd-ports@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id EDC6C1065672 for ; Fri, 21 Mar 2008 06:21:15 +0000 (UTC) (envelope-from peterjeremy@optushome.com.au) Received: from mail06.syd.optusnet.com.au (mail06.syd.optusnet.com.au [211.29.132.187]) by mx1.freebsd.org (Postfix) with ESMTP id 757B68FC15 for ; Fri, 21 Mar 2008 06:21:15 +0000 (UTC) (envelope-from peterjeremy@optushome.com.au) Received: from server.vk2pj.dyndns.org (c220-239-20-82.belrs4.nsw.optusnet.com.au [220.239.20.82]) by mail06.syd.optusnet.com.au (8.13.1/8.13.1) with ESMTP id m2L6LBit027667 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Fri, 21 Mar 2008 17:21:12 +1100 Received: from server.vk2pj.dyndns.org (localhost.vk2pj.dyndns.org [127.0.0.1]) by server.vk2pj.dyndns.org (8.14.2/8.14.1) with ESMTP id m2L6LBdR086334; Fri, 21 Mar 2008 17:21:11 +1100 (EST) (envelope-from peter@server.vk2pj.dyndns.org) Received: (from peter@localhost) by server.vk2pj.dyndns.org (8.14.2/8.14.2/Submit) id m2L6LAxq086333; Fri, 21 Mar 2008 17:21:10 +1100 (EST) (envelope-from peter) Date: Fri, 21 Mar 2008 17:21:10 +1100 From: Peter Jeremy To: Doug Barton Message-ID: <20080321062110.GB85901@server.vk2pj.dyndns.org> References: <20080320001048.GA39125@lpthe.jussieu.fr> <20080320094246.GA40807@lpthe.jussieu.fr> <47E2BF70.2050109@FreeBSD.org> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="i9LlY+UWpKt15+FH" Content-Disposition: inline In-Reply-To: <47E2BF70.2050109@FreeBSD.org> X-PGP-Key: http://members.optusnet.com.au/peterjeremy/pubkey.asc User-Agent: Mutt/1.5.17 (2007-11-01) Cc: Michel Talon , freebsd-ports@freebsd.org Subject: Re: Utility for safe updating of ports in base system X-BeenThere: freebsd-ports@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Porting software to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 21 Mar 2008 06:21:16 -0000 --i9LlY+UWpKt15+FH Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Thu, Mar 20, 2008 at 12:48:00PM -0700, Doug Barton wrote: >Michel Talon wrote: >> Since the compilation will take most of the >> time, it is not relevant to consider performance questions on the >> portmaster side. > >Having spent a substantial amount of time doing performance tuning on >portmaster, I beg to differ. I also agree with Doug here. Compilation may take most of the time but any time used by the ports upgrading infrastructure will directly add to the total time taken by an upgrade. And, with the switch to "modular X.org", systems are likely to have lots more ports than before so any per-port overhead is much more of issue than before. The "compilation will take most of the time so don't worry about anything else" approach leads to the GNU configure and libtool idiocy - where the port spends several minutes determining the system configuration and then 30 seconds compiling the port. >> Several causes of slowness have already been identified. Parsing >> /var/db/pkg is slow, > >s/is/can be/. There are some things I need to dig out of /var/db/pkg >that are relatively slow, yes. By far the most expensive is >determining the name of an installed port by grep'ing for ORIGIN in >all the +CONTENTS files. =2E.. >Now, would having some kind of database be better? Maybe, maybe not. Note that UFS is a database: If I've understood you correctly, the main problem is that there is no appropriate index to map a port directory to an installed package name. This could be fixed... There are regular discussions about moving more configuration information into some sort of database format. We already use Berkeley DB for some things and importing SQLite has been suggested on at least one occasion. It would be interesting to see if changing /var/db/pkg into a "traditional" database will improve performance without adversely affecting administration. >> this is why the idea of using a database has been >> advocated. Much worse, running make in a port directory, even only to >> get the value of a variable is slow. > >Now on that I agree with you completely. But now you're talking about >a much more fundamental redesign issue that is way outside the scope >of the project we're discussing. One option here might be to restrict port Makefiles to a subset of pmake's functionality and move much of the configuration data currently embedded in /usr/ports/Mk/* into separate files so that 'make describe' can be implemented using an alternative tool that doesn't need to parse most of /usr/ports/Mk/*. >Doing N number of downloads in parallel (where N should be user >configurable) is preferable. ... OTOH, I've >never had a user complain that I'm swamping their machine with >distfile downloads, so it's not been a high priority. I've seen a couple of FTP mirror sites that explicitly state "no more than one client connection at a time is allowed from a single computer" as part of their conditions of use. Swamping a mirror site with parallel downloads may be seen as unfriendly by the site admins. >> Probably the present package management system doesn't keep enough state >> on each installed package so that an upgrade system works reliably. =2E.. >Here you and I are in agreement. I doubt we will ever manage to move to a totally binary upgrade approach for all ports - for licensing reasons if nothing else. This means that an end user will probably wind up building some ports. It's also unlikely that the "one-size-fits-all" approach implied by the package system will suit everyone - my favourite gotcha is the lack of mod_php when you use the php and Apache packages. I also occasionally say "make -DWITH_foo -DWITHOUT_bar" and it would be handy to know what options I actually used when I go to rebuild the port (or try to work out why a dependency isn't working as expected). --=20 Peter Jeremy Please excuse any delays as the result of my ISP's inability to implement an MTA that is either RFC2821-compliant or matches their claimed behaviour. --i9LlY+UWpKt15+FH Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.8 (FreeBSD) iEYEARECAAYFAkfjU9YACgkQ/opHv/APuIfKHgCeJHqNP+Rfn2aLPz8orefX3UIr ffoAoMKLjbRem6p5yqFR1IjSsyvHYua7 =ObVU -----END PGP SIGNATURE----- --i9LlY+UWpKt15+FH--