From owner-freebsd-hackers@FreeBSD.ORG Sat May 12 12:37:48 2007 Return-Path: X-Original-To: freebsd-hackers@freebsd.org Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 3559316A404 for ; Sat, 12 May 2007 12:37:48 +0000 (UTC) (envelope-from michel@lpthe.jussieu.fr) Received: from shiva.jussieu.fr (shiva.jussieu.fr [134.157.0.129]) by mx1.freebsd.org (Postfix) with ESMTP id D92FC13C447 for ; Sat, 12 May 2007 12:37:47 +0000 (UTC) (envelope-from michel@lpthe.jussieu.fr) Received: from parthe.lpthe.jussieu.fr (parthe.lpthe.jussieu.fr [134.157.10.1]) by shiva.jussieu.fr (8.13.8/jtpda-5.4) with ESMTP id l4CCbk9v092074 for ; Sat, 12 May 2007 14:37:46 +0200 (CEST) X-Ids: 165 Received: by parthe.lpthe.jussieu.fr (Postfix, from userid 10096) id 62246BF6A0; Sat, 12 May 2007 14:37:45 +0200 (CEST) X-Spam-Checker-Version: SpamAssassin 3.1.8 (2007-02-13) on parthe.lpthe.jussieu.fr X-Spam-Level: X-Spam-Status: No, score=-2.2 required=5.0 tests=AWL,BAYES_00 autolearn=ham version=3.1.8 Received: from niobe.lpthe.jussieu.fr (niobe.lpthe.jussieu.fr [134.157.10.41]) by parthe.lpthe.jussieu.fr (Postfix) with ESMTP id 7B88BBF621 for ; Sat, 12 May 2007 14:37:44 +0200 (CEST) Received: by niobe.lpthe.jussieu.fr (Postfix, from userid 2005) id 66F8588; Sat, 12 May 2007 14:37:44 +0200 (CEST) Date: Sat, 12 May 2007 14:37:44 +0200 From: Michel Talon To: freebsd-hackers@freebsd.org Message-ID: <20070512123744.GA14586@lpthe.jussieu.fr> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.4.2.2i X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-3.0 (shiva.jussieu.fr [134.157.0.165]); Sat, 12 May 2007 14:37:46 +0200 (CEST) X-Virus-Scanned: ClamAV 0.88.7/3230/Sat May 12 12:34:18 2007 on shiva.jussieu.fr X-Virus-Status: Clean X-Miltered: at shiva.jussieu.fr with ID 4645B51A.000 by Joe's j-chkmail (http://j-chkmail.ensmp.fr)! X-Mailman-Approved-At: Sat, 12 May 2007 12:41:46 +0000 Subject: Re: New FreeBSD package system (a.k.a. Daemon Package System (dps)) X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 12 May 2007 12:37:48 -0000 Ivan Voras wrote: > In my (limited) experience, this sort of task should not depend much on > the speed of the language. The most CPU-intensive task portupgrade does > is resolving dependencies, and on a running system this is a DAG forest > of about 500 nodes. I know portupgrade has some highly unoptimal code in > it (if I understand the code correctly, there's a brute force check for > cyclic dependancies in it!), but still, in itself, I think the choice of > Ruby isn't performance-critical. If i remember well, portupgrade uses a reasonable algorithm to sort the DAG in question. But from time to time, it runs make depends or something of the sort in some ports directory, and this is the slow step which kills any package manager whatsoever, be it written in super fast C or superslow ruby. This is because as soon as you run "make" in such a directory it has to read and interpret the 4000 lines file bsd.ports.mk. This takes 1/10 s on my old laptop and perhaps 5 times faster on a powerful machine. Add to that the natural slowness of ruby, the fact that portupgrade constantly does queries in the Berkeley pkgdb.db, portsdb.db etc. while it could cache the whole content in memory without any problem in modern machines, and you have something which is slow as a mollasse. Then you have more structural problems such as the "guessing facilities" of portupgrade, which aim at guessing what is the new origin of a port whose old origin has disappeared. To do that it counts similarities on names, adds some snake oil and other satanic ingredients and comes out with a guess. For some time i was impressed by the exactness of these guesses, but recently i have seen incredibly hilarious results. As a consequence i think that portupgrade is a completely inadequate tool to maintain a FreeBSD machine in an automated way in spite of the remarkable insight which is coded in it, and that Debian like systems run circles around FreeBSD for ease of maintenance. Yes the FreeBSD system is very good for initial installation of software and the flexibility it allows to do that. But it sucks completely as soon as one wants to upgrade stuff. The best way by far is wipe out every port and reinstall. This will take 1/3 of the time to run portupgrade -a and with a much better chance of success and coherency at the end. Note that these innocent looking facts have little consequences: FreeBSD was in position 11 on Distrowatch in 2005, it is now in position 17 and falling like a brick. -- Michel TALON