From owner-freebsd-current@FreeBSD.ORG Sat Sep 4 06:45:18 2004 Return-Path: Delivered-To: freebsd-current@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id B2CED16A4CE; Sat, 4 Sep 2004 06:45:18 +0000 (GMT) Received: from apollo.backplane.com (apollo.backplane.com [216.240.41.2]) by mx1.FreeBSD.org (Postfix) with ESMTP id 68B1B43D3F; Sat, 4 Sep 2004 06:45:18 +0000 (GMT) (envelope-from dillon@apollo.backplane.com) Received: from apollo.backplane.com (localhost [127.0.0.1]) i846jHla041385; Fri, 3 Sep 2004 23:45:18 -0700 (PDT) (envelope-from dillon@apollo.backplane.com) Received: (from dillon@localhost) by apollo.backplane.com (8.12.9p2/8.12.9/Submit) id i846jHwn041383; Fri, 3 Sep 2004 23:45:17 -0700 (PDT) (envelope-from dillon) Date: Fri, 3 Sep 2004 23:45:17 -0700 (PDT) From: Matthew Dillon Message-Id: <200409040645.i846jHwn041383@apollo.backplane.com> To: "Marc G. Fournier" References: <200409032158.i83LwdWg030214@gw.catspoiler.org> <20040904003222.J812@ganymede.hub.org> cc: Don Lewis cc: freebsd-current@freebsd.org Subject: Re: what is fsck's "slowdown"? X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 04 Sep 2004 06:45:18 -0000 There may be some tricks you can use to improve your fsck times on that large partition. The first thing you can try is to compile up an fsck with a much larger in-program disk buffer cache. cd into /usr/src/sbin/fsck and edit fsck_ffs/fsck.h. Significantly increase MAXBUFSPACE and INOBUFSIZE. e.g. try increasing MAXBUFSPACE from 40MB to 200MB, and INOBUFSIZE from 56MB to 200MB. Another possibility would be to try to improve disk I/O linearity by modifying getdatablk() in fsutil.c to read-ahead several blocks rather then just one. This would require some programming. The remaining tricks involve reformatting the large partition to increase the block size and/or increase the number of bytes/inode (thus reducing the number of inodes). The larger the block size, the easier it is for fsck to track down indirect blocks. The fewer inodes the partition has, the less work fsck has to do. But, of course, to do this you have to backup all the data on the partition, newfs it with the new parameters, and restore all the data back. Maximizing the number of cylinders/group also helps a great deal but I think newfs already does that by default. -Matt Matthew Dillon