From owner-freebsd-fs@FreeBSD.ORG Wed Feb 14 14:51:38 2007 Return-Path: X-Original-To: freebsd-fs@freebsd.org Delivered-To: freebsd-fs@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 8A61D16A406 for ; Wed, 14 Feb 2007 14:51:38 +0000 (UTC) (envelope-from anderson@centtech.com) Received: from mh1.centtech.com (moat3.centtech.com [64.129.166.50]) by mx1.freebsd.org (Postfix) with ESMTP id 61BC913C467 for ; Wed, 14 Feb 2007 14:51:38 +0000 (UTC) (envelope-from anderson@centtech.com) Received: from [10.177.171.220] (neutrino.centtech.com [10.177.171.220]) by mh1.centtech.com (8.13.8/8.13.8) with ESMTP id l1EEpbOE059016 for ; Wed, 14 Feb 2007 08:51:37 -0600 (CST) (envelope-from anderson@centtech.com) Message-ID: <45D321F8.2000808@centtech.com> Date: Wed, 14 Feb 2007 08:51:36 -0600 From: Eric Anderson User-Agent: Thunderbird 1.5.0.9 (X11/20070204) MIME-Version: 1.0 To: "freebsd-fs@freebsd.org" Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Virus-Scanned: ClamAV 0.88.4/2566/Wed Feb 14 05:44:20 2007 on mh1.centtech.com X-Virus-Status: Clean X-Spam-Status: No, score=-2.5 required=8.0 tests=AWL,BAYES_00 autolearn=ham version=3.1.6 X-Spam-Checker-Version: SpamAssassin 3.1.6 (2006-10-03) on mh1.centtech.com Subject: fsck times/memory sizes/etc 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: Wed, 14 Feb 2007 14:51:38 -0000 I just did some quick playing around, doing newfs and fsck's on fresh file systems. I did one set on a 1Gb malloc'ed md, and another on a 65GB real disk device. The disk was only being used for this test, nothing else. I don't claim these numbers are perfect, but I did run each test 3-4 times to make sure they were consistent. I found it interesting that the fsck times didn't reduce once all the files/directories were deleted. ################################################ # mdconfig -a -t malloc -s 1024m # time fsck_ufs -f /dev/md0 ** /dev/md0 ** Last Mounted on ** Phase 1 - Check Blocks and Sizes ** Phase 2 - Check Pathnames ** Phase 3 - Check Connectivity ** Phase 4 - Check Reference Counts ** Phase 5 - Check Cyl groups 2 files, 2 used, 506485 free (21 frags, 63308 blocks, 0.0% fragmentation) real 0m0.014s user 0m0.009s sys 0m0.002s # mount it # fill it full of directories and empty files # df -i /mnt Filesystem 1K-blocks Used Avail Capacity iused ifree %iused Mounted on /dev/md0 1012974 2340 929598 0% 141310 0 100% /mnt # umount it # time fsck_ufs -f /dev/md0 ** /dev/md0 ** Last Mounted on /mnt ** Phase 1 - Check Blocks and Sizes ** Phase 2 - Check Pathnames ** Phase 3 - Check Connectivity ** Phase 4 - Check Reference Counts ** Phase 5 - Check Cyl groups 141310 files, 1170 used, 505317 free (21 frags, 63162 blocks, 0.0% fragmentation) real 0m0.266s user 0m0.103s sys 0m0.015s # mount it, rm all the files # umount it # time fsck_ufs -f /dev/md0 ** /dev/md0 ** Last Mounted on /mnt ** Phase 1 - Check Blocks and Sizes ** Phase 2 - Check Pathnames ** Phase 3 - Check Connectivity ** Phase 4 - Check Reference Counts ** Phase 5 - Check Cyl groups 2 files, 2 used, 506485 free (21 frags, 63308 blocks, 0.0% fragmentation) real 0m0.151s user 0m0.045s sys 0m0.024s ################################################## # newfs -U /dev/ad2s2a /dev/ad2s2a: 65397.4MB (133933888 sectors) block size 16384, fragment size 2048 using 356 cylinder groups of 183.77MB, 11761 blks, 23552 inodes. with soft updates # time fsck -f /dev/ad2s2a ** /dev/ad2s2a ** Last Mounted on ** Phase 1 - Check Blocks and Sizes ** Phase 2 - Check Pathnames ** Phase 3 - Check Connectivity ** Phase 4 - Check Reference Counts ** Phase 5 - Check Cyl groups 2 files, 2 used, 32429667 free (19 frags, 4053706 blocks, 0.0% fragmentation) real 0m9.673s user 0m0.449s sys 0m0.000s [root@neutrino ~]# mount /dev/ad2s2a /mnt [root@neutrino ~]# df -i /mnt Filesystem 1K-blocks Used Avail Capacity iused ifree %iused Mounted on /dev/ad2s2a 64859338 4 59670588 0% 2 8384508 0% /mnt # fill it full of directories and empty files # df -i /mnt Filesystem 1K-blocks Used Avail Capacity iused ifree %iused Mounted on /dev/ad2s2a 64859338 138346 59532246 0% 8384510 0 100% /mnt # umount it # time fsck -f /dev/ad2s2a ** /dev/ad2s2a ** Last Mounted on /mnt ** Phase 1 - Check Blocks and Sizes ** Phase 2 - Check Pathnames ** Phase 3 - Check Connectivity ** Phase 4 - Check Reference Counts ** Phase 5 - Check Cyl groups 8384510 files, 69173 used, 32360496 free (24 frags, 4045059 blocks, 0.0% fragmentation) real 1m57.315s user 0m6.046s sys 0m0.811s # memory usage for fsck maxed at 56448kb (~55MB) # mount, rm -rf all created files/dirs # df -i /mnt Filesystem 1K-blocks Used Avail Capacity iused ifree %iused Mounted on /dev/ad2s2a 64859338 6 59670586 0% 2 8384508 0% /mnt # umount it # time fsck -f /dev/ad2s2a ** /dev/ad2s2a ** Last Mounted on /mnt ** Phase 1 - Check Blocks and Sizes ** Phase 2 - Check Pathnames ** Phase 3 - Check Connectivity ** Phase 4 - Check Reference Counts ** Phase 5 - Check Cyl groups 2 files, 3 used, 32429666 free (18 frags, 4053706 blocks, 0.0% fragmentation) real 1m37.347s user 0m3.054s sys 0m0.693s # memory usage for fsck (on this empty fs) maxed at 9344kb (about 9MB) ################################################## Eric -- ------------------------------------------------------------------------ Eric Anderson Sr. Systems Administrator Centaur Technology An undefined problem has an infinite number of solutions. ------------------------------------------------------------------------