Date: Fri, 24 Jan 2003 15:31:14 -0800 From: Darren Pilgrim <dmp@pantherdragon.org> To: Craig Reyenga <creyenga@connectmail.carleton.ca> Cc: questions@freebsd.org Subject: Re: Filesystem tuning for lots of small files (a Maildir)? Message-ID: <3E31CCC2.2050601@pantherdragon.org> In-Reply-To: <3E312DCE.8010607@pantherdragon.org> References: <3E312DCE.8010607@pantherdragon.org> <003b01c2c3d2$b65382f0$0200000a@sewer.org>
next in thread | previous in thread | raw e-mail | index | archive | help
Craig Reyenga wrote: > ----- 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 filesystem has about 1.4m free inodes, so I guess that's not really going to be a problem. What's the max. number of inodes I can have? 2^32? >> 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. I know that one inode is used for every file (for arguement's sake we'll say everything that uses an inode is a file) in a filesystem. So the number of inodes is the number of files you can have. But what happens when the file is larger than the inode size? It still uses one inode, but the filesystem has to allocate space in blocks. I'm trying to determine the size of that block, if it's adjustable, and if I even should be adjusting it. To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-questions" in the body of the message
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?3E31CCC2.2050601>