From owner-freebsd-current Thu Sep 27 14: 6:55 2001 Delivered-To: freebsd-current@freebsd.org Received: from freebie.xs4all.nl (freebie.xs4all.nl [213.84.32.253]) by hub.freebsd.org (Postfix) with ESMTP id 22DE037B40E for ; Thu, 27 Sep 2001 14:06:50 -0700 (PDT) Received: (from wkb@localhost) by freebie.xs4all.nl (8.11.6/8.11.6) id f8RL6dA97988; Thu, 27 Sep 2001 23:06:39 +0200 (CEST) (envelope-from wkb) Date: Thu, 27 Sep 2001 23:06:39 +0200 From: Wilko Bulte To: Julian Elischer Cc: current@FreeBSD.ORG Subject: Re: RFC: mod for 'du' Message-ID: <20010927230639.A97964@freebie.xs4all.nl> References: <3BB3936A.D1E1F6B3@vicor-nb.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.2.5i In-Reply-To: <3BB3936A.D1E1F6B3@vicor-nb.com>; from julian@vicor-nb.com on Thu, Sep 27, 2001 at 02:00:26PM -0700 X-OS: FreeBSD 4.4-STABLE X-PGP: finger wilko@freebsd.org 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 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? -- | / 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