From owner-freebsd-fs Fri Nov 8 10:35:29 2002 Delivered-To: freebsd-fs@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 2A27237B401 for ; Fri, 8 Nov 2002 10:35:28 -0800 (PST) Received: from elvis.mu.org (elvis.mu.org [192.203.228.196]) by mx1.FreeBSD.org (Postfix) with ESMTP id E397143E6E for ; Fri, 8 Nov 2002 10:35:27 -0800 (PST) (envelope-from bright@elvis.mu.org) Received: by elvis.mu.org (Postfix, from userid 1192) id A6277AE265; Fri, 8 Nov 2002 10:35:27 -0800 (PST) Date: Fri, 8 Nov 2002 10:35:27 -0800 From: Alfred Perlstein To: vishal mittal Cc: freebsd-fs@FreeBSD.ORG Subject: Re: Question regarding filesystem performance Message-ID: <20021108183527.GN39178@elvis.mu.org> References: <20021108182420.5418.qmail@web13207.mail.yahoo.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20021108182420.5418.qmail@web13207.mail.yahoo.com> User-Agent: Mutt/1.4i Sender: owner-freebsd-fs@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.org * vishal mittal [021108 10:24] wrote: > Hi, > > I am working on a 4.4-RELEASE. I have about 30,000 1K > files in a directory. Any delete or move operation on > a file in this directory introduces unacceptable > delays in some other time-critical processes that I am > running on the machine. > > I am assuming that the delay is because of the large > number of files due to which it takes a longer time to > update the inode information and, delete and move > being atomic operations, they do not relinquish the > CPU for the other processes during that time. No. The problem is that each operation causes linear searches on the directory contents which is expensive. > If the problem is what I think it is then is there a > way to overcome this problem by tuning some parameter > or something? Yes, by using the UFS_DIRHASH kernel option, however I really recommend that you upgrade to a more recent version of FreeBSD 4, (4.7) because the version of the code for UFS_DIRHASH in 4.4 is marked experimental and may not be stable. -- -Alfred Perlstein [alfred@freebsd.org] 'Instead of asking why a piece of software is using "1970s technology," start asking why software is ignoring 30 years of accumulated wisdom.' To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-fs" in the body of the message