From owner-freebsd-current Thu Sep 27 14:12:33 2001 Delivered-To: freebsd-current@freebsd.org Received: from mail.vicor-nb.com (bigwoop.vicor-nb.com [208.206.78.2]) by hub.freebsd.org (Postfix) with ESMTP id 6DCA237B40D for ; Thu, 27 Sep 2001 14:12:26 -0700 (PDT) Received: from vicor-nb.com (dhcp122.vicor-nb.com [208.206.78.122]) by mail.vicor-nb.com (Postfix) with ESMTP id 0C11C1B219; Thu, 27 Sep 2001 14:12:26 -0700 (PDT) Message-ID: <3BB3963A.D714606@vicor-nb.com> Date: Thu, 27 Sep 2001 14:12:26 -0700 From: Julian Elischer Organization: VICOR X-Mailer: Mozilla 4.76 [en] (X11; U; FreeBSD 4.3-RELEASE i386) X-Accept-Language: en MIME-Version: 1.0 To: Wilko Bulte Cc: current@FreeBSD.ORG Subject: Re: RFC: mod for 'du' References: <3BB3936A.D1E1F6B3@vicor-nb.com> <20010927230639.A97964@freebie.xs4all.nl> Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Sender: owner-freebsd-current@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG Wilko Bulte wrote: > > On Thu, Sep 27, 2001 at 02:00:26PM -0700, Julian Elischer wrote: > > 'du' keeps an array of files it has encountered that have > 1 link. > > Whenever it encounters another, it checks to see if it's one it has > > already seen > > and thus can avoid counting its space twice.. > > > > This is ok for small filesystems, however VICOR maintains > > 500GB filesystems on which much of the data has several links. > > > > The following patch to replace the linear array (which it realocs if too > > small) > > (which it scans linearly) with a hash-table can makle a DRASTIC change > > to how DU perfomrs for us in this environment. > > > > In a small test, we made a linked copy of /usr/src > > > > the run times were: > > old: 0.410u 2.221s 1:55.41 2.2% 12+1355k 6325+0io 2pf+0w > > new: 8.610u 2.665s 2:09.23 8.7% 10+718k 6367+0io 2pf+0 > > swap(old,new) I suppose? uh.... yeah > > -- > | / o / /_ _ email: wilko@FreeBSD.org > |/|/ / / /( (_) Bulte Arnhem, The Netherlands To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-current" in the body of the message