From owner-freebsd-questions Fri Jan 24 10: 2:14 2003 Delivered-To: freebsd-questions@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 19DBD37B401 for ; Fri, 24 Jan 2003 10:02:12 -0800 (PST) Received: from wabakimi.chat.carleton.ca (wabakimi.chat.carleton.ca [134.117.1.98]) by mx1.FreeBSD.org (Postfix) with ESMTP id 2389943E4A for ; Fri, 24 Jan 2003 10:02:11 -0800 (PST) (envelope-from creyenga@connectmail.carleton.ca) Received: from fireball (resnet-89-057.cavern.carleton.ca [134.117.89.57]) by wabakimi.chat.carleton.ca (8.11.1/8.11.1) with SMTP id h0OI22k19556; Fri, 24 Jan 2003 13:02:02 -0500 (EST) Message-ID: <003b01c2c3d2$b65382f0$0200000a@sewer.org> From: "Craig Reyenga" To: "Darren Pilgrim" Cc: References: <3E312DCE.8010607@pantherdragon.org> Subject: Re: Filesystem tuning for lots of small files (a Maildir)? Date: Fri, 24 Jan 2003 13:02:08 -0500 MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit X-Priority: 3 X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook Express 6.00.2600.0000 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2600.0000 Sender: owner-freebsd-questions@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG ----- Original Message ----- From: "Darren Pilgrim" To: Sent: Friday, January 24, 2003 07:13 Subject: Filesystem tuning for lots of small files (a Maildir)? > I'm currently facing a problem of having used Netscape (now Mozilla) for > years in Windows and now trying to find something I can regularly use in > FreeBSD without losing Mozilla in Windows. > > I've mostly settled on IMAP (courier) with procmail filters, but that > raises the issue of filesystem performance for directories with large > numbers of files/subdirectories in them. I have more than 32,000 emails > stored. How do I calculate/see the number of available inodes? ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ df -i /filesystem-in-question > The > existing filesystem was newfs'd with the sysinstall defaults. Should I > re-newfs it with different values? What would I want to set them at? I > know I'd need to adjust things to make sure I have enough inodes for > 40,000+ files, but what about the block and fragment size? Should I use > smaller values like 8192/1024 or 4096/512 or is the default 16384/2048 > best? Higher values would just increase slack space, right? What are > the impacts of lower values? > The number of inodes varies with the filesystem size and bytes per inode. So if you're talking about a huge filesystem, you're probably all set as it is. However, I needed a /usr that has many inodes, so I doubled the default by doing this: newfs -b 16384 -f 2048 -i 4096 /usr -i 4096 is half as many bytes per inode compared to the default 8192, therefore, I have 2X as many inodes. See newfs(8) for more info. tuning(7) also. > Some folders, like the one for the postfix-users list, can have > 3000-4000 messages in them. For growth, we'll say 5000 messages. The > IMAP layout with Courier means all the folders sit all on one level > under ~/Maildir, which means I'd have 200 or so subdirectories in one > place. I have the UFS_DIRHASH option enabled for the my MP3 collection, > but that's as case of 300 subdirecories in one directory, not 5000 > files. What else can I do to tune for this kind of (ab)use? > Not sure. I hope at least part of this message was somewhat-kinda-sorta-maybe helpful. [Snipping mail questions; I have no idea.] -Craig To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-questions" in the body of the message