From owner-cvs-all Tue Dec 11 20:57:40 2001 Delivered-To: cvs-all@freebsd.org Received: from netau1.alcanet.com.au (ntp.alcanet.com.au [203.62.196.27]) by hub.freebsd.org (Postfix) with ESMTP id E720637B41D; Tue, 11 Dec 2001 20:57:24 -0800 (PST) Received: from mfg1.cim.alcatel.com.au (mfg1.cim.alcatel.com.au [139.188.23.1]) by netau1.alcanet.com.au (8.9.3 (PHNE_22672)/8.9.3) with ESMTP id PAA06242; Wed, 12 Dec 2001 15:57:11 +1100 (EDT) Received: from gsmx07.alcatel.com.au by cim.alcatel.com.au (PMDF V5.2-32 #37640) with ESMTP id <01KBSBIB8NWGVLVV90@cim.alcatel.com.au>; Wed, 12 Dec 2001 15:57:09 +1100 Received: (from jeremyp@localhost) by gsmx07.alcatel.com.au (8.11.6/8.11.6) id fBC4v8P28997; Wed, 12 Dec 2001 15:57:08 +1100 Content-return: prohibited Date: Wed, 12 Dec 2001 15:57:07 +1100 From: Peter Jeremy Subject: Re: cvs commit: src/sbin/newfs newfs.8 In-reply-to: <200112101846.fBAIkee47815@apollo.backplane.com>; from dillon@apollo.backplane.com on Mon, Dec 10, 2001 at 10:46:40AM -0800 To: Matthew Dillon Cc: Maxim Sobolev , Sheldon Hearn , cvs-committers@FreeBSD.ORG, cvs-all@FreeBSD.ORG Mail-Followup-To: Matthew Dillon , Maxim Sobolev , Sheldon Hearn , cvs-committers@FreeBSD.ORG, cvs-all@FreeBSD.ORG Message-id: <20011212155707.A27238@gsmx07.alcatel.com.au> MIME-version: 1.0 Content-type: multipart/mixed; boundary="4Ckj6UjgE2iN1+kY" Content-disposition: inline User-Agent: Mutt/1.2.5i References: <200111271953.fARJrFc88452@freefall.freebsd.org> <3C10F171.FEE996EB@FreeBSD.org> <200112101846.fBAIkee47815@apollo.backplane.com> Sender: owner-cvs-all@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG --4Ckj6UjgE2iN1+kY Content-Type: text/plain; charset=us-ascii Content-Disposition: inline On 2001-Dec-10 10:46:40 -0800, Matthew Dillon wrote: > Interesting. I just ran a test using VN for /usr/ports: ... > So /usr/ports alone will eat 100MB of additional disk space on a > 2K/16K filesystem, which is quite significant. > > > /usr/src has these characteristics: > >Filesystem 1K-blocks Used Avail Capacity Mounted on (1K/8K) >/dev/vn0c 4065694 1002597 2737842 27% /mnt >Filesystem 1K-blocks Used Avail Capacity Mounted on (2K/16K) >/dev/vn0c 4129310 1046374 2752592 28% /mnt This is about 3 times the size I got. Are you sure this is a standard /usr/src? I've just done something similar: /usr/doc, /usr/ports, -CURRENT /usr/src, /usr/www and an i386 -STABLE /usr/obj, for each of 4/.5, 8/1, 16/2 and 32/4 block sizes, using a 2048MB VN filesystem. Apart from /usr/obj, all the files were checked out from a CVS repository and include CVS metadata (it might be interesting to see the difference with the metadata deleted, but I didn't think of that until later). All filesystems were freshly created using "-i 8192". The script I used is attached. Size: 4096/512 % 8K/1K 16K/2K % 32K/4K % inodes Available 2030712 2032623 2031598 2029532 /usr/doc 33471 -6.87 35940 40648 13.10 50068 39.31 6089 /usr/obj [1] 1136121 1163554 2.41 1222868 7.64 42136 /usr/ports 105662 -31.33 153868 256562 66.74 468208 204.29 108516 /usr/src 355361 -4.88 373586 411666 10.19 489496 31.03 52467 /usr/www 11146 -7.48 12047 13980 16.05 17992 49.35 2422 The % columns are wastage compared to the 8K/1K filesystem. Apart from /usr/ports, the cost of moving to 16K/2K seems fairly small. Whether any of these are "typical" filesystems is arguable. IMHO, the cases that will suffer badly from 2K frags are: - /usr/ports. - Older one-file-per-article news servers - /var/spool/mqueue on big mailservers I don't see that any of these will bite a novice sysadmin: Building /usr/ports is more a "FreeBSD developer" environment. And anyone running a large news or mail server needs to have some ideas about what they are doing. [1] I did a kernel build part-way through and this figure isn't accurate. Peter --4Ckj6UjgE2iN1+kY Content-Type: application/x-sh Content-Disposition: attachment; filename="space.sh" #!/bin/sh # # Check space wastage on a variety of filesystems for a variety of # block and frag sizes FILE=/usr/tmp/foo SIZE=2048 # Checkout FS from CVS into vn1 check_cvs() { echo "############## Checking $1/$2 cvs: $3 ###################" newfs -b $1 -f $2 -i 4096 /dev/vn1c mount -o async,noatime /dev/vn1c /foo df -ki /foo cd /foo cvs -Q -R -d /usr/ncvs checkout $3 df -ki /foo cd umount /foo } # Check filesystems for given block/frag size check_size() { echo "############## Checking $1/$2 FS ###################" check_cvs $1 $2 doc check_cvs $1 $2 ports check_cvs $1 $2 src check_cvs $1 $2 www echo "############## Checking $1/$2 /usr/obj ###################" newfs -b $1 -f $2 -i 4096 /dev/vn1c mount -o async,noatime /dev/vn1c /foo df -ki /foo cd /usr find obj | cpio -pd /foo df -ki /foo cd umount /foo } dd if=/dev/zero of=$FILE bs=1m count=$SIZE || echo $? vnconfig -e -s labels vn1 $FILE || exit $? disklabel -wr vn1 auto || exit $? check_size 4096 512 check_size 8192 1024 check_size 16384 2048 check_size 32768 4096 vnconfig -u vn1 rm -f $FILE --4Ckj6UjgE2iN1+kY-- To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe cvs-all" in the body of the message