From owner-freebsd-fs@FreeBSD.ORG Mon Nov 14 18:49:05 2005 Return-Path: X-Original-To: freebsd-fs@freebsd.org 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 9635A16A41F for ; Mon, 14 Nov 2005 18:49:05 +0000 (GMT) (envelope-from anderson@centtech.com) Received: from mh2.centtech.com (moat3.centtech.com [207.200.51.50]) by mx1.FreeBSD.org (Postfix) with ESMTP id E563B43D46 for ; Mon, 14 Nov 2005 18:49:04 +0000 (GMT) (envelope-from anderson@centtech.com) Received: from [10.177.171.220] (neutrino.centtech.com [10.177.171.220]) by mh2.centtech.com (8.13.1/8.13.1) with ESMTP id jAEIn3GF054172 for ; Mon, 14 Nov 2005 12:49:03 -0600 (CST) (envelope-from anderson@centtech.com) Message-ID: <4378DC18.2070103@centtech.com> Date: Mon, 14 Nov 2005 12:48:56 -0600 From: Eric Anderson User-Agent: Mozilla/5.0 (X11; U; FreeBSD i386; en-US; rv:1.7.12) Gecko/20051021 X-Accept-Language: en-us, en MIME-Version: 1.0 To: freebsd-fs@freebsd.org References: <200511141044.jAEAi8bg020303@lurza.secnetix.de> In-Reply-To: <200511141044.jAEAi8bg020303@lurza.secnetix.de> Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit X-Virus-Scanned: ClamAV 0.82/1169/Fri Nov 11 15:28:05 2005 on mh2.centtech.com X-Virus-Status: Clean Subject: Re: UFS2 snapshots on large filesystems X-BeenThere: freebsd-fs@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Filesystems List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 14 Nov 2005 18:49:05 -0000 Oliver Fromme wrote: > Eric Anderson wrote: > > Oliver Fromme wrote: > > > I just accidentally pulled the wrong power cord ... > > > So now I can give you first-hand numbers. :-} > > > > > > This is a 250 Gbyte data disk that has been newfs'ed > > > with -i 65536, so I get about 4 million inodes: > > > > > > Filesystem iused ifree %iused > > > /dev/ad0s1f 179,049 3,576,789 5% > > > > > > So I still have 95% of free inodes, even though the > > > filesystem is fairly good filled: > > > > > > Filesystem 1K-blocks Used Avail Capacity > > > /dev/ad0s1f 237,652,238 188,173,074 30,466,986 86% > > > > > > fsck(8) took about 2 minutes, which is acceptable, I > > > think. Note that I always disable background fsck > > > (for me personally, it has more disadvantages than > > > advantages). > > > > > > This is what fsck(8) reported when the machin came > > > back up: > > > > > > /dev/ad0s1f: 179049 files, 94086537 used, 24739582 free > > > (26782 frags, 3089100 blocks, 0.0% fragmentation) > > > > 180k inodes seems like a pretty small amount to me. > > It's my multimedia disk. It contains mainly multimedia > files, such as images, audio and video files. > > > Here's some info from some of my filesystems: > > > > # df -i > > Filesystem 1K-blocks Used Avail Capacity iused ifree %iused Mounted on > > /dev/amrd0s1d 13065232 1109204 10910810 9% 663 1695079 0% /var > > /dev/label/vol1 1891668564 1494254268 246080812 86% 68883207 175586551 28% /vol1 > > /dev/label/vol2 1891959846 924337788 816265272 53% 59129223 185364087 24% /vol2 > > /dev/label/vol3 1892634994 1275336668 465887528 73% 31080812 213506706 13% /vol3 > > > > Even /var has over 1million. > > No. Your /var has just 663 inodes in use, and it has about > 1.7 million unused inodes which is just a waste. Oops! Thanks for the correction - I misread it in my pasting frenzy. :) It may be a waste, but perhaps the right answer would be in the form of a patch to make sysinstall create /var partitions with different settings, if you feel strongly about it. Me personally, in this case, I don't care about the space I lose here, since to me it is negligable. > Your other file systems use much more inodes, but they're > also much bigger (2 Tbyte) than mine, and they seem to > contain different kind of data. Right, this is typical for the types of data I store, which often average 8-16k per file, which I think is the default expectation for UFS2 filesystems, so I'm making a generalization that a majority of users also have a ~16k average filesize. > > I think your tests are interesting, > > however not very telling of many real-world scenarios. > > As mentioned above, my "test" was done on my multimedia > file system with an average file size of roughly 1 Mbyte. > Such file systems are quite real-world. :-) > > On a file system containing exclusively video files, innd > cycle buffers or similarly large files, the inode density > can be reduced even further. If you have a 2 Tbyte file > system that contains only a few thousand files, then you're > wasting 60 Gbytes for unused inode data. True - agreed, however I'm assuming most users of FreeBSD's UFS2 filesystem are in the 16k average filesize range. If the average users' average file size is larger, than the default newfs parameters should be changed, I just don't have any data or research to support that, so I'm not certain. > Of course, if you design a file system for different > purposes, your requirements might be completely different. > A maildir server or squid proxy server definitely requires > a much higher inode density, for example. If a filesystem were to be designed from scratch, having the inode density variable or automatically grow to fulfill the needs, would be the most efficient probably. Eric -- ------------------------------------------------------------------------ Eric Anderson Sr. Systems Administrator Centaur Technology Anything that works is better than anything that doesn't. ------------------------------------------------------------------------