From owner-freebsd-fs@FreeBSD.ORG Thu Oct 23 10:19:33 2003 Return-Path: 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 D712F16A4B3 for ; Thu, 23 Oct 2003 10:19:33 -0700 (PDT) Received: from mail.vicor-nb.com (bigwoop.vicor-nb.com [208.206.78.2]) by mx1.FreeBSD.org (Postfix) with ESMTP id D01C543FA3 for ; Thu, 23 Oct 2003 10:19:32 -0700 (PDT) (envelope-from julian@vicor.com) Received: by mail.vicor-nb.com (Postfix, from userid 1058) id 9F36C7A425; Thu, 23 Oct 2003 10:19:32 -0700 (PDT) To: kmarx@vicor.com, mckusick@beastie.mckusick.com In-Reply-To: <200310222337.h9MNbseN005704@beastie.mckusick.com> Message-Id: <20031023171932.9F36C7A425@mail.vicor-nb.com> Date: Thu, 23 Oct 2003 10:19:32 -0700 (PDT) From: julian@vicor.com (Julian Elischer) X-Mailman-Approved-At: Sat, 25 Oct 2003 07:10:35 -0700 cc: freebsd-fs@freebsd.org cc: cburrell@vicor.com cc: davep@vicor.com cc: julian@vicor.com cc: VicPE@aol.com cc: jpl@vicor.com cc: gluk@ptci.ru cc: jrh@vicor.com cc: julian@vicor-nb.com Subject: Re: 4.8 ffs_dirpref problem X-BeenThere: freebsd-fs@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Filesystems List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 23 Oct 2003 17:19:34 -0000 > From mckusick@beastie.mckusick.com Wed Oct 22 22:30:03 2003 > X-Original-To: julian@vicor-nb.com > Delivered-To: julian@vicor-nb.com > To: Ken Marx > Subject: Re: 4.8 ffs_dirpref problem > Cc: freebsd-fs@freebsd.org, cburrell@vicor.com, davep@vicor.com, > jpl@vicor.com, jrh@vicor.com, julian@vicor-nb.com, VicPE@aol.com, > julian@vicor.com, Grigoriy Orlov > In-Reply-To: Your message of "Wed, 22 Oct 2003 12:57:53 PDT." > <20031022195753.27C707A49F@mail.vicor-nb.com> > Date: Wed, 22 Oct 2003 16:37:54 -0700 > From: Kirk McKusick > I believe that you can dsolve your problem by tuning the existing > algorithm using tunefs. There are two parameters to control dirpref, > avgfilesize (which defaults to 16384) and filesperdir (which defaults > to 50). I suggest that you try using an avgfilesize of 4096 and > filesperdir of 1500. This is done by running tunefs on the unmounted > (or at least mounted read-only) filesystem as: > tunefs -f 4096 -s 1500 /dev/ On the same filesystem are directories that contain 1GB files and others that contain maybe 100 100K files (images) > Note that this affects future layout, so needs to be done before you > put any data into the filesystem. If you are building the filesystem > from scratch, you can use: would this have an effect on an existing filesystem with respect to new data being added to it? > newfs -g 4096 -h 1500 ... > > to set these fields. Please let me know if this solves your problem. > If it does not, I will ask Grigoriy Orlov if he has > any ideas on how to proceed. > Kirk McKusick > =-=-=-=-=-=-=