From owner-freebsd-hackers Sat Aug 16 05:26:22 1997 Return-Path: Received: (from root@localhost) by hub.freebsd.org (8.8.5/8.8.5) id FAA21257 for hackers-outgoing; Sat, 16 Aug 1997 05:26:22 -0700 (PDT) Received: from ocean.campus.luth.se (ocean.campus.luth.se [130.240.194.116]) by hub.freebsd.org (8.8.5/8.8.5) with ESMTP id FAA21252 for ; Sat, 16 Aug 1997 05:26:19 -0700 (PDT) Received: (from karpen@localhost) by ocean.campus.luth.se (8.8.5/8.8.5) id OAA01231; Sat, 16 Aug 1997 14:29:10 +0200 (CEST) From: Mikael Karpberg Message-Id: <199708161229.OAA01231@ocean.campus.luth.se> Subject: Re: More info on slow "rm" times with 2.2.1+. In-Reply-To: <199708161207.FAA26252@implode.root.com> from David Greenman at "Aug 16, 97 05:07:22 am" To: dg@root.com Date: Sat, 16 Aug 1997 14:29:10 +0200 (CEST) Cc: hackers@FreeBSD.ORG X-Mailer: ELM [version 2.4ME+ PL31H (25)] MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Sender: owner-freebsd-hackers@FreeBSD.ORG X-Loop: FreeBSD.org Precedence: bulk According to David Greenman: [...] > > It would be trivial for me to verify any slow or fast times - all > >I've got to do is make a big directory... seems that ~300 files is > >enough to run into whatever the problem may be... > > How many files are in the directory isn't important. What is important is > the size of the directory. You can have a 20MB directory and yet have only a > 100 files in it. There is code to free up unused space in directories, but > it only works if the free space is at the end. If the directory is large, > then it will take a large amount of time to search through it. And this cuz it's slow? Or? Isn't there a command (which could be run in daily, or weekly, or something) that goes through a directory (or many) and optimize the space they take? If there isn't... why? And would it be hard to write? /Mikael